Skip to content

Commit 46c7c28

Browse files
committed
Implementation for an Issue sqlmapproject#2485
1 parent 81e3395 commit 46c7c28

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.4.35"
22+
VERSION = "1.1.4.36"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/utils/brute.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,19 @@ def tableExists(tableFile, regex=None):
7373
errMsg += "to distinguish erroneous results)"
7474
raise SqlmapDataException(errMsg)
7575

76-
tables = getFileItems(tableFile, lowercase=Backend.getIdentifiedDbms() in (DBMS.ACCESS,), unique=True)
76+
message = "which common tables (wordlist) file do you want to use?\n"
77+
message += "[1] default '%s' (press Enter)\n" % tableFile
78+
message += "[2] custom"
79+
choice = readInput(message, default='1')
80+
81+
if choice == '2':
82+
message = "what's the custom common tables file location?\n"
83+
tableFile = readInput(message) or tableFile
7784

7885
infoMsg = "checking table existence using items from '%s'" % tableFile
7986
logger.info(infoMsg)
8087

88+
tables = getFileItems(tableFile, lowercase=Backend.getIdentifiedDbms() in (DBMS.ACCESS,), unique=True)
8189
tables.extend(_addPageTextWords())
8290
tables = filterListValue(tables, regex)
8391

@@ -180,6 +188,15 @@ def columnExists(columnFile, regex=None):
180188
errMsg += "to distinguish erroneous results)"
181189
raise SqlmapDataException(errMsg)
182190

191+
message = "which common columns (wordlist) file do you want to use?\n"
192+
message += "[1] default '%s' (press Enter)\n" % columnFile
193+
message += "[2] custom"
194+
choice = readInput(message, default='1')
195+
196+
if choice == '2':
197+
message = "what's the custom common columns file location?\n"
198+
columnFile = readInput(message) or columnFile
199+
183200
infoMsg = "checking column existence using items from '%s'" % columnFile
184201
logger.info(infoMsg)
185202

lib/utils/hash.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -766,20 +766,20 @@ def dictionaryAttack(attack_dict):
766766
message += "[1] default dictionary file '%s' (press Enter)\n" % dictPaths[0]
767767
message += "[2] custom dictionary file\n"
768768
message += "[3] file with list of dictionary files"
769-
choice = readInput(message, default="1")
769+
choice = readInput(message, default='1')
770770

771771
try:
772-
if choice == "2":
772+
if choice == '2':
773773
message = "what's the custom dictionary's location?\n"
774-
dictPaths = [readInput(message)]
775-
776-
logger.info("using custom dictionary")
777-
elif choice == "3":
774+
_ = readInput(message)
775+
if _:
776+
dictPaths = [readInput(message)]
777+
logger.info("using custom dictionary")
778+
elif choice == '3':
778779
message = "what's the list file location?\n"
779780
listPath = readInput(message)
780781
checkFile(listPath)
781782
dictPaths = getFileItems(listPath)
782-
783783
logger.info("using custom list of dictionaries")
784784
else:
785785
logger.info("using default dictionary")

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ede9841e7cbbe841f41588f149e85789 lib/core/option.py
4646
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4848
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49-
60546a5ba1d6021b0216ec756df4192c lib/core/settings.py
49+
6db254c2297d4b1d77e2a6d8f690f7d0 lib/core/settings.py
5050
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5151
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5252
92e35ddfdf0e9676dd51565bcf4fa5cf lib/core/target.py
@@ -99,12 +99,12 @@ d3da4c7ceaf57c4687a052d58722f6bb lib/techniques/dns/use.py
9999
211e6dc49af6ad6bd3590d16d41e86db lib/techniques/union/test.py
100100
50d4de61ee0692d68bb87462bff37e15 lib/techniques/union/use.py
101101
67f0ad96ec2207d7e59c788b858afd6d lib/utils/api.py
102-
600cbc772943f915b2d5ce6193fdff0b lib/utils/brute.py
102+
7d10ba0851da8ee9cd3c140dcd18798e lib/utils/brute.py
103103
2b6c7f906e5da25bcd8865c1f86a1dfb lib/utils/crawler.py
104104
ba12c69a90061aa14d848b8396e79191 lib/utils/deps.py
105105
3b9fd519164e0bf275d5fd361c3f11ff lib/utils/getch.py
106106
ccfdad414ce2ec0c394c3deaa39a82bf lib/utils/hashdb.py
107-
b36465bd2a1f18e2cd97ced492f91f1f lib/utils/hash.py
107+
7559c3cbfbaaf4812e72c4c7454e31d2 lib/utils/hash.py
108108
e76a08237ee6a4cd6855af79610ea8a5 lib/utils/htmlentities.py
109109
310efc965c862cfbd7b0da5150a5ad36 lib/utils/__init__.py
110110
9d8c858417d356e49e1959ba253aede4 lib/utils/pivotdumptable.py

0 commit comments

Comments
 (0)