- Probably fixed buffering problem using stdout stuff.
This commit is contained in:
parent
50ebab504d
commit
a4c5bd399c
@ -112,13 +112,26 @@ class AttackThread(threading.Thread):
|
|||||||
type = "png"
|
type = "png"
|
||||||
ext = ".png"
|
ext = ".png"
|
||||||
|
|
||||||
|
# command to write to temporary file
|
||||||
(fd2,fpname2) = Tempfile.tempcleaned(ext)
|
(fd2,fpname2) = Tempfile.tempcleaned(ext)
|
||||||
pw,pr = os.popen2("dot -T%s -o%s" % (type,fpname2))
|
f = os.fdopen(fd2,'w')
|
||||||
pw.write(attack.scytherDot)
|
cmd = "dot -T%s" % (type)
|
||||||
pw.close()
|
|
||||||
pr.close()
|
# execute command
|
||||||
attack.file = fpname2 # this is where the file name is stored
|
cin,cout = os.popen2(cmd)
|
||||||
|
cin.write(attack.scytherDot)
|
||||||
|
cin.close()
|
||||||
|
|
||||||
|
for l in cout.read():
|
||||||
|
f.write(l)
|
||||||
|
|
||||||
|
cout.close()
|
||||||
|
f.flush()
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# if this is done, store and report
|
||||||
attack.filetype = type
|
attack.filetype = type
|
||||||
|
attack.file = fpname2 # this is where the file name is stored
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user