mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
Minor refactoring
This commit is contained in:
parent
7a8ace78f9
commit
b7415d36df
|
@ -107,12 +107,12 @@ def main():
|
||||||
kb.threadContinue = False
|
kb.threadContinue = False
|
||||||
kb.threadException = True
|
kb.threadException = True
|
||||||
|
|
||||||
if conf.get("hashDB", None):
|
if conf.get("hashDB"):
|
||||||
try:
|
try:
|
||||||
conf.hashDB.flush(True)
|
conf.hashDB.flush(True)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# 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", None):
|
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
|
|
|
@ -195,7 +195,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
|
||||||
if lock.locked_lock():
|
if lock.locked_lock():
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
if conf.get("hashDB", None):
|
if conf.get("hashDB"):
|
||||||
conf.hashDB.flush(True)
|
conf.hashDB.flush(True)
|
||||||
|
|
||||||
if cleanupFunction:
|
if cleanupFunction:
|
||||||
|
|
|
@ -57,7 +57,7 @@ class HashDB(object):
|
||||||
retVal = None
|
retVal = None
|
||||||
if key and (self._write_cache or os.path.isfile(self.filepath)):
|
if key and (self._write_cache or os.path.isfile(self.filepath)):
|
||||||
hash_ = HashDB.hashKey(key)
|
hash_ = HashDB.hashKey(key)
|
||||||
retVal = self._write_cache.get(hash_, None)
|
retVal = self._write_cache.get(hash_)
|
||||||
if not retVal:
|
if not retVal:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user