mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Minor patch (flushing log file output at the end of program run)
This commit is contained in:
parent
7811a958ae
commit
d4610890ca
|
@ -73,6 +73,13 @@ class Dump(object):
|
||||||
|
|
||||||
kb.dataOutputFlag = True
|
kb.dataOutputFlag = True
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
if self._outputFP:
|
||||||
|
try:
|
||||||
|
self._outputFP.flush()
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
|
||||||
def setOutputFile(self):
|
def setOutputFile(self):
|
||||||
self._outputFile = os.path.join(conf.outputPath, "log")
|
self._outputFile = os.path.join(conf.outputPath, "log")
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -156,6 +156,9 @@ def main():
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if conf.get("dumper"):
|
||||||
|
conf.dumper.flush()
|
||||||
|
|
||||||
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
|
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
|
||||||
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
|
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user