mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-08 21:51:29 +00:00
Minor refactoring (drei stuff)
This commit is contained in:
@@ -956,7 +956,7 @@ def dictionaryAttack(attack_dict):
|
||||
|
||||
if regex and regex not in hash_regexes:
|
||||
hash_regexes.append(regex)
|
||||
infoMsg = "using hash method '%s'" % __functions__[regex].func_name
|
||||
infoMsg = "using hash method '%s'" % __functions__[regex].__name__
|
||||
logger.info(infoMsg)
|
||||
|
||||
for hash_regex in hash_regexes:
|
||||
@@ -1084,7 +1084,7 @@ def dictionaryAttack(attack_dict):
|
||||
if readInput(message, default='N', boolean=True):
|
||||
suffix_list += COMMON_PASSWORD_SUFFIXES
|
||||
|
||||
infoMsg = "starting dictionary-based cracking (%s)" % __functions__[hash_regex].func_name
|
||||
infoMsg = "starting dictionary-based cracking (%s)" % __functions__[hash_regex].__name__
|
||||
logger.info(infoMsg)
|
||||
|
||||
for item in attack_info:
|
||||
|
||||
@@ -11,6 +11,7 @@ from extra.safe2bin.safe2bin import safechardecode
|
||||
from lib.core.agent import agent
|
||||
from lib.core.bigarray import BigArray
|
||||
from lib.core.common import Backend
|
||||
from lib.core.common import filterNone
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import isNoneValue
|
||||
@@ -67,7 +68,7 @@ def pivotDumpTable(table, colList, count=None, blind=True, alias=None):
|
||||
lengths[column] = 0
|
||||
entries[column] = BigArray()
|
||||
|
||||
colList = filter(None, sorted(colList, key=lambda x: len(x) if x else MAX_INT))
|
||||
colList = filterNone(sorted(colList, key=lambda x: len(x) if x else MAX_INT))
|
||||
|
||||
if conf.pivotColumn:
|
||||
for _ in colList:
|
||||
@@ -141,7 +142,7 @@ def pivotDumpTable(table, colList, count=None, blind=True, alias=None):
|
||||
if column == colList[0]:
|
||||
if isNoneValue(value):
|
||||
try:
|
||||
for pivotValue in filter(None, (" " if pivotValue == " " else None, "%s%s" % (pivotValue[0], unichr(ord(pivotValue[1]) + 1)) if len(pivotValue) > 1 else None, unichr(ord(pivotValue[0]) + 1))):
|
||||
for pivotValue in filterNone((" " if pivotValue == " " else None, "%s%s" % (pivotValue[0], unichr(ord(pivotValue[1]) + 1)) if len(pivotValue) > 1 else None, unichr(ord(pivotValue[0]) + 1))):
|
||||
value = _(column, pivotValue)
|
||||
if not isNoneValue(value):
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user