diff --git a/lib/core/common.py b/lib/core/common.py index 76f20273e..94994463a 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1213,11 +1213,11 @@ def initCommonOutputs(): fileName = os.path.join(paths.SQLMAP_TXT_PATH, 'common-outputs.txt') cfile = codecs.open(fileName, 'r', conf.dataEncoding) - for line in cfile.xreadlines(): - line = line.strip() + for line in cfile.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used + if line.find('#') != -1: + line = line[:line.find('#')] - if line.startswith('#'): - continue + line = line.strip() if len(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 part in kb.commonOutputs: 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 if item.startswith(prevValue): singleValue = item diff --git a/lib/core/option.py b/lib/core/option.py index ac80e22a7..4f69f20f6 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -931,7 +931,6 @@ def __setKnowledgeBaseAttributes(): kb.cache = advancedDict() kb.cache.regex = {} - kb.cache.md5 = {} kb.commonOutputs = None kb.data = advancedDict() diff --git a/txt/common-outputs.txt b/txt/common-outputs.txt index 6d25092f1..d6611e6af 100644 --- a/txt/common-outputs.txt +++ b/txt/common-outputs.txt @@ -47,14 +47,9 @@ USERS [Passwords] -root -test -testpass -password -abc123 -qwertz -12345 -123456 +#MySQL +*00E247AC5F9AF26AE0194B41E1E769DEE1429A29 #testpass + [Users]