Hi guys, having an issue running a subprocess in python.
Code:
if (__name__ == "__main__"):
D = subprocess.Popen(args=sys.argv[1],
stdout=subprocess.PIPE,
stdin=subprocess.PIPE)
Whenever I try to execute the script involving this code I get the following error:
Code:
Traceback (most recent call last):
File "./attack.py", line 152, in <module>
stdin=subprocess.PIPE)
File "/usr/lib/python2.7/[/FONT]subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/[FONT=arial]subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I then altered it to include shell = True, and then I get this issue:
Code:
/bin/sh: 1: 5.D: not found
where 5.D is argv[1].
I'm new to Ubuntu so any help would be appreciated