mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
minor improvement (resuming of already cracked values)
This commit is contained in:
parent
c0cd29f01c
commit
f9bb762d1d
2 changed files with 20 additions and 6 deletions
|
|
@ -40,7 +40,8 @@ class HashDB(object):
|
|||
except:
|
||||
pass
|
||||
|
||||
def hashKey(self, key):
|
||||
@staticmethod
|
||||
def hashKey(key):
|
||||
key = key.encode(UNICODE_ENCODING) if isinstance(key, unicode) else repr(key)
|
||||
retVal = int(hashlib.md5(key).hexdigest()[:8], 16)
|
||||
return retVal
|
||||
|
|
@ -48,7 +49,7 @@ class HashDB(object):
|
|||
def retrieve(self, key):
|
||||
retVal = None
|
||||
if key:
|
||||
hash_ = self.hashKey(key)
|
||||
hash_ = HashDB.hashKey(key)
|
||||
while True:
|
||||
try:
|
||||
for row in self.cursor.execute("SELECT value FROM storage WHERE id=?", (hash_,)):
|
||||
|
|
@ -62,7 +63,7 @@ class HashDB(object):
|
|||
|
||||
def write(self, key, value):
|
||||
if key:
|
||||
hash_ = self.hashKey(key)
|
||||
hash_ = HashDB.hashKey(key)
|
||||
while True:
|
||||
try:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue