mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
some more speed ups for hash cracking
This commit is contained in:
parent
2f355db230
commit
ea125d820d
|
@ -630,10 +630,14 @@ def dictionaryAttack(attack_dict):
|
||||||
process.terminate()
|
process.terminate()
|
||||||
process.join()
|
process.join()
|
||||||
|
|
||||||
|
finally:
|
||||||
|
if retVal:
|
||||||
|
conf.hashDB.beginTransaction()
|
||||||
while not retVal.empty():
|
while not retVal.empty():
|
||||||
_, hash_, word = item = retVal.get(block=False)
|
_, hash_, word = item = retVal.get(block=False)
|
||||||
conf.hashDB.write(hash_, word)
|
conf.hashDB.write(hash_, word)
|
||||||
results.append(item)
|
results.append(item)
|
||||||
|
conf.hashDB.endTransaction()
|
||||||
|
|
||||||
clearConsoleLine()
|
clearConsoleLine()
|
||||||
|
|
||||||
|
@ -706,10 +710,14 @@ def dictionaryAttack(attack_dict):
|
||||||
process.terminate()
|
process.terminate()
|
||||||
process.join()
|
process.join()
|
||||||
|
|
||||||
|
finally:
|
||||||
|
if retVal:
|
||||||
|
conf.hashDB.beginTransaction()
|
||||||
while not retVal.empty():
|
while not retVal.empty():
|
||||||
_, hash_, word = item = retVal.get(block=False)
|
_, hash_, word = item = retVal.get(block=False)
|
||||||
conf.hashDB.write(hash_, word)
|
conf.hashDB.write(hash_, word)
|
||||||
results.append(item)
|
results.append(item)
|
||||||
|
conf.hashDB.endTransaction()
|
||||||
|
|
||||||
clearConsoleLine()
|
clearConsoleLine()
|
||||||
|
|
||||||
|
|
|
@ -75,3 +75,9 @@ class HashDB(object):
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
def beginTransaction(self):
|
||||||
|
self.cursor.execute('BEGIN TRANSACTION')
|
||||||
|
|
||||||
|
def endTransaction(self):
|
||||||
|
self.cursor.execute('END TRANSACTION')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user