mirror of
https://github.com/sqlmapproject/sqlmap
synced 2025-12-09 09:52:35 +01:00
Minor patch (flushing log file output at the end of program run)
This commit is contained in:
parent
7811a958ae
commit
d4610890ca
2 changed files with 10 additions and 0 deletions
|
|
@ -73,6 +73,13 @@ class Dump(object):
|
|||
|
||||
kb.dataOutputFlag = True
|
||||
|
||||
def flush(self):
|
||||
if self._outputFP:
|
||||
try:
|
||||
self._outputFP.flush()
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
def setOutputFile(self):
|
||||
self._outputFile = os.path.join(conf.outputPath, "log")
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -156,6 +156,9 @@ def main():
|
|||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
if conf.get("dumper"):
|
||||
conf.dumper.flush()
|
||||
|
||||
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
|
||||
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
|
||||
os._exit(0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue