Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db7ede9

Browse files
committed
more updates/fixes
1 parent 4bb5885 commit db7ede9

3 files changed

Lines changed: 7 additions & 20 deletions

File tree

lib/core/common.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,11 +1213,11 @@ def initCommonOutputs():
12131213
fileName = os.path.join(paths.SQLMAP_TXT_PATH, 'common-outputs.txt')
12141214
cfile = codecs.open(fileName, 'r', conf.dataEncoding)
12151215

1216-
for line in cfile.xreadlines():
1217-
line = line.strip()
1216+
for line in cfile.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used
1217+
if line.find('#') != -1:
1218+
line = line[:line.find('#')]
12181219

1219-
if line.startswith('#'):
1220-
continue
1220+
line = line.strip()
12211221

12221222
if len(line) > 1:
12231223
if line[0] == '[' and line[-1] == ']':
@@ -1260,13 +1260,6 @@ def goGoodSamaritan(part, prevValue, originalCharset):
12601260
# If the header we are looking for has common outputs defined
12611261
if part in kb.commonOutputs:
12621262
for item in kb.commonOutputs[part]:
1263-
#if part == 'Passwords':
1264-
#if prevValue.startswith('*'): #MySQL_160bit
1265-
#return None, None, originalCharset
1266-
#if item not in kb.cache.md5:
1267-
#kb.cache.md5[item] = md5hash(item).upper()
1268-
#item = kb.cache.md5[item]
1269-
12701263
# Check if the common output (item) starts with prevValue
12711264
if item.startswith(prevValue):
12721265
singleValue = item

lib/core/option.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ def __setKnowledgeBaseAttributes():
931931

932932
kb.cache = advancedDict()
933933
kb.cache.regex = {}
934-
kb.cache.md5 = {}
935934

936935
kb.commonOutputs = None
937936
kb.data = advancedDict()

txt/common-outputs.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,9 @@ USERS
4747

4848
[Passwords]
4949

50-
root
51-
test
52-
testpass
53-
password
54-
abc123
55-
qwertz
56-
12345
57-
123456
50+
#MySQL
51+
*00E247AC5F9AF26AE0194B41E1E769DEE1429A29 #testpass
52+
5853

5954
[Users]
6055

0 commit comments

Comments
 (0)