more updates/fixes

This commit is contained in:
Miroslav Stampar 2010-05-31 11:11:53 +00:00
parent 4bb5885413
commit db7ede96fd
3 changed files with 7 additions and 20 deletions

View File

@ -1213,11 +1213,11 @@ def initCommonOutputs():
fileName = os.path.join(paths.SQLMAP_TXT_PATH, 'common-outputs.txt') fileName = os.path.join(paths.SQLMAP_TXT_PATH, 'common-outputs.txt')
cfile = codecs.open(fileName, 'r', conf.dataEncoding) cfile = codecs.open(fileName, 'r', conf.dataEncoding)
for line in cfile.xreadlines(): for line in cfile.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used
line = line.strip() if line.find('#') != -1:
line = line[:line.find('#')]
if line.startswith('#'): line = line.strip()
continue
if len(line) > 1: if len(line) > 1:
if line[0] == '[' and line[-1] == ']': if line[0] == '[' and line[-1] == ']':
@ -1260,13 +1260,6 @@ def goGoodSamaritan(part, prevValue, originalCharset):
# If the header we are looking for has common outputs defined # If the header we are looking for has common outputs defined
if part in kb.commonOutputs: if part in kb.commonOutputs:
for item in kb.commonOutputs[part]: for item in kb.commonOutputs[part]:
#if part == 'Passwords':
#if prevValue.startswith('*'): #MySQL_160bit
#return None, None, originalCharset
#if item not in kb.cache.md5:
#kb.cache.md5[item] = md5hash(item).upper()
#item = kb.cache.md5[item]
# Check if the common output (item) starts with prevValue # Check if the common output (item) starts with prevValue
if item.startswith(prevValue): if item.startswith(prevValue):
singleValue = item singleValue = item

View File

@ -931,7 +931,6 @@ def __setKnowledgeBaseAttributes():
kb.cache = advancedDict() kb.cache = advancedDict()
kb.cache.regex = {} kb.cache.regex = {}
kb.cache.md5 = {}
kb.commonOutputs = None kb.commonOutputs = None
kb.data = advancedDict() kb.data = advancedDict()

View File

@ -47,14 +47,9 @@ USERS
[Passwords] [Passwords]
root #MySQL
test *00E247AC5F9AF26AE0194B41E1E769DEE1429A29 #testpass
testpass
password
abc123
qwertz
12345
123456
[Users] [Users]