mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-02-11 07:56:36 +00:00
Implementation for an Issue #2485
This commit is contained in:
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.1.4.35"
|
||||
VERSION = "1.1.4.36"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
||||
@@ -73,11 +73,19 @@ def tableExists(tableFile, regex=None):
|
||||
errMsg += "to distinguish erroneous results)"
|
||||
raise SqlmapDataException(errMsg)
|
||||
|
||||
tables = getFileItems(tableFile, lowercase=Backend.getIdentifiedDbms() in (DBMS.ACCESS,), unique=True)
|
||||
message = "which common tables (wordlist) file do you want to use?\n"
|
||||
message += "[1] default '%s' (press Enter)\n" % tableFile
|
||||
message += "[2] custom"
|
||||
choice = readInput(message, default='1')
|
||||
|
||||
if choice == '2':
|
||||
message = "what's the custom common tables file location?\n"
|
||||
tableFile = readInput(message) or tableFile
|
||||
|
||||
infoMsg = "checking table existence using items from '%s'" % tableFile
|
||||
logger.info(infoMsg)
|
||||
|
||||
tables = getFileItems(tableFile, lowercase=Backend.getIdentifiedDbms() in (DBMS.ACCESS,), unique=True)
|
||||
tables.extend(_addPageTextWords())
|
||||
tables = filterListValue(tables, regex)
|
||||
|
||||
@@ -180,6 +188,15 @@ def columnExists(columnFile, regex=None):
|
||||
errMsg += "to distinguish erroneous results)"
|
||||
raise SqlmapDataException(errMsg)
|
||||
|
||||
message = "which common columns (wordlist) file do you want to use?\n"
|
||||
message += "[1] default '%s' (press Enter)\n" % columnFile
|
||||
message += "[2] custom"
|
||||
choice = readInput(message, default='1')
|
||||
|
||||
if choice == '2':
|
||||
message = "what's the custom common columns file location?\n"
|
||||
columnFile = readInput(message) or columnFile
|
||||
|
||||
infoMsg = "checking column existence using items from '%s'" % columnFile
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
||||
@@ -766,20 +766,20 @@ def dictionaryAttack(attack_dict):
|
||||
message += "[1] default dictionary file '%s' (press Enter)\n" % dictPaths[0]
|
||||
message += "[2] custom dictionary file\n"
|
||||
message += "[3] file with list of dictionary files"
|
||||
choice = readInput(message, default="1")
|
||||
choice = readInput(message, default='1')
|
||||
|
||||
try:
|
||||
if choice == "2":
|
||||
if choice == '2':
|
||||
message = "what's the custom dictionary's location?\n"
|
||||
dictPaths = [readInput(message)]
|
||||
|
||||
logger.info("using custom dictionary")
|
||||
elif choice == "3":
|
||||
_ = readInput(message)
|
||||
if _:
|
||||
dictPaths = [readInput(message)]
|
||||
logger.info("using custom dictionary")
|
||||
elif choice == '3':
|
||||
message = "what's the list file location?\n"
|
||||
listPath = readInput(message)
|
||||
checkFile(listPath)
|
||||
dictPaths = getFileItems(listPath)
|
||||
|
||||
logger.info("using custom list of dictionaries")
|
||||
else:
|
||||
logger.info("using default dictionary")
|
||||
|
||||
Reference in New Issue
Block a user