0

i have a project that needs to use tools licensed under the GNU/GPL license.
my question is:
must a project that a uses GPL licensed tool like netdiscover be licensed as a GPL project?
if my project contains a line that contains:

def discoverAllNetworks():
  # execute a terminal command and get it's output
  os.popen("arp-scan > output.txt").read()
  # open the file created by command
  file = open("output.txt", "rw")
  fileContents = file.read()
  newFileContents = fileContents.find_ip_addresses()
  file.write(newFileContents)
  args = file.read().split("\n")
  # feed modified output of the modified "gpl_licensed_program"
  # to another gpl licensed program
  output = os.system("nmap" + args).read()
  flash(output)
  redirect('/output_url')

does this require that my project use the GPL license?
as far as i know if i copy GPL code my project needs to use the same license.
but i am not copying the code; i am only using the project.
distribution
i will not bundle the tools this project uses, as most of them are available on most linux package managers.
hopefully will post the project on github when it's mature enough

4
  • Are you distributing (i.e. bundling together) arp-scan and Nmap when you distribute your project to others?
    – Brandin
    Commented Feb 28, 2019 at 7:36
  • no most of the tools are available on most linux package managers hopefully in the future ill distribute it to github! Cheers. Commented Mar 1, 2019 at 14:06
  • GPL (and all licenses, really) is about what code you are distributing not "using", so if you never distribute any GPL code, you don't have to consider its requirements at all. For example, suppose your code "uses" Microsoft code on a Windows machine. Does that mean you have to accept Microsoft's licenses? Not unless you distribute Microsoft code (which is unlikely).
    – Brandin
    Commented Mar 2, 2019 at 7:04
  • that simplifies things the comment above should be the answer Commented Mar 3, 2019 at 8:45

1 Answer 1

4

IANAL/IANYL. In answer to your specific question, it depends on how tightly the two programs are coupled. According to the FSF's GPL FAQ:

A main program that uses simple fork and exec to invoke plug-ins and does not establish intimate communication between them results in the plug-ins being a separate program.

which means that your program doesn't need to be GPLed also. But:

If the main program uses fork and exec to invoke plug-ins, and they establish intimate communication by sharing complex data structures or shipping complex data structures back and forth, [then] that can make them one single combined program.

And then your code would need to be distributed under the GPL also (edits in the above are mine).

Edit: if I read your code correctly (which isn't a given!) you're forking tools to build a list of local IP addresses, forking nmap to run a defaults-only scan of those addresses, and simply displaying the results. My take is this doesn't constitute intimate communication, and thus the works remain at arm's-length.

You say you're not distributing nmap etc., so you won't incur any licence obligations with respect to that GPL code. I can't see that your code would also be required to be GPL. As I said, though, IANAL/IANYL, so if you're betting a business on this, get professional legal advice.

7
  • i will only get some output from "gpl_licensed_program" but what is an intimate connection also if my project requires "gpl_licensed_program" or else it wont work does that make a difference "gpl_licensed_program" will not be modified in any way is a "complex data structure" getting the output of "gpl_licensed_command"? Commented Feb 25, 2019 at 10:14
  • That your program requires the GPL code to function doesn't affect whether or not the combined work is a derivative of the GPL code. "Intimate communication" (not connection) is not well-defined in copyright law, but according to the FSF it means what I have quoted above.
    – MadHatter
    Commented Feb 25, 2019 at 10:16
  • does getting the commands output and using it in my program elsewhere and perhaps even morphing and modifying the output to suit my project considered an intimate communication as that will be the extent of my uses Commented Feb 25, 2019 at 10:19
  • 1
    We don't know, because you haven't told us enough. You would need, at the very least, to show us actual code where your program invokes the GPL code, and what it does with the output. If you're invoking wc to count the words in a text file, and displaying the result to the user, that's probably not intimate communication. If you're invoking an image processing package to do a certain kind of gamma correction on a big image file, and then making decisions about control flow based on some weird gamma-correction coefficient that results, then that might be intimate communication.
    – MadHatter
    Commented Feb 25, 2019 at 10:20
  • @TheLinuxPro your edit above is still no use, because it doesn't tell us which GPL program is being invoked, nor exactly how, nor what is being done with the result. Dodgy metacode is useless; if you want any more detailed advice, you will need to show us actual code.
    – MadHatter
    Commented Feb 26, 2019 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.