alvinoo
November 11, 2017, 7:07am
1
def gob(url):
print "\n\t[!] Running gobuster on target."
params = " -e -s '307,200,204,301,302' -t 20 -u " + url + " >> /tmp/%s/gobuster.txt" % (ip)
os.system("xterm -e bash -c "tail -f /tmp/%/gobuster.txt"")
for i in bflist:
dirbf = "gobuster -w " + i + params
print "Syntax: " + dirbf
os.system(dirbf)
Hi there,
For this piece of code; I need it to be able to run.
2ndly, I need to code to execute in the foreground and continue execution of the remaining code line.
os.system("xterm -e bash -c "tail -f /tmp/%/gobuster.txt"")
[/FONT]
Try:
os.system("xterm -e bash -c \"tail -f /tmp/%/gobuster.txt\"")
and let us know what happens.
alvinoo
November 11, 2017, 8:20pm
3
The shell does not spawn after I tried.
Well that is a useful reply - NOT!
If it is imperative to use 'xterm' then why not put your single line as a tiny script and call it something like:-
1) The script, say myscript.sh...
#!/bin/bash
tail -f /tmp/%/gobuster.txt
exit
2) And if you want python NOT to wait for it to finish; then...
os.system("xterm -e /your/path/to/myscript.sh &")
3) Or if you DO want python to wait for it to finish; then...
os.system("xterm -e /your/path/to/myscript.sh")
EDIT:
All this assumes you have imported 'os' into your python script...