mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-14 15:14:31 +03:00
Minor removal of redundant code
This commit is contained in:
parent
1599b5e37f
commit
caae773b2d
|
@ -768,13 +768,6 @@ def dataToOutFile(filename, data):
|
|||
|
||||
return retVal
|
||||
|
||||
def strToHex(value):
|
||||
"""
|
||||
Converts string value to it's hexadecimal representation
|
||||
"""
|
||||
|
||||
return (value if not isinstance(value, unicode) else value.encode(UNICODE_ENCODING)).encode("hex").upper()
|
||||
|
||||
def readInput(message, default=None, checkBatch=True):
|
||||
"""
|
||||
Reads input from terminal
|
||||
|
|
|
@ -21,8 +21,8 @@ from lib.core.common import isTechniqueAvailable
|
|||
from lib.core.common import parsePasswordHash
|
||||
from lib.core.common import randomStr
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import strToHex
|
||||
from lib.core.common import unArrayizeValue
|
||||
from lib.core.convert import hexencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -187,7 +187,6 @@ class Users:
|
|||
|
||||
if retVal:
|
||||
for user, password in filterPairValues(zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.password" % randStr])):
|
||||
# password = "0x%s" % strToHex(password)
|
||||
if user not in kb.data.cachedUsersPasswords:
|
||||
kb.data.cachedUsersPasswords[user] = [password]
|
||||
else:
|
||||
|
@ -229,7 +228,7 @@ class Users:
|
|||
|
||||
if retVal:
|
||||
for user, password in filterPairValues(zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.password" % randStr])):
|
||||
password = "0x%s" % strToHex(password)
|
||||
password = "0x%s" % hexencode(password).upper()
|
||||
|
||||
if user not in kb.data.cachedUsersPasswords:
|
||||
kb.data.cachedUsersPasswords[user] = [password]
|
||||
|
|
Loading…
Reference in New Issue
Block a user