mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 16:24:25 +03:00
Couple of updates for #2908
This commit is contained in:
parent
aa9b5e4e0c
commit
32e09c8dfb
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.6.57"
|
VERSION = "1.3.6.58"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -18,6 +18,7 @@ from lib.core.common import getFileItems
|
||||||
from lib.core.common import getPageWordSet
|
from lib.core.common import getPageWordSet
|
||||||
from lib.core.common import hashDBWrite
|
from lib.core.common import hashDBWrite
|
||||||
from lib.core.common import isNoneValue
|
from lib.core.common import isNoneValue
|
||||||
|
from lib.core.common import ntToPosixSlashes
|
||||||
from lib.core.common import popValue
|
from lib.core.common import popValue
|
||||||
from lib.core.common import pushValue
|
from lib.core.common import pushValue
|
||||||
from lib.core.common import randomInt
|
from lib.core.common import randomInt
|
||||||
|
@ -298,6 +299,19 @@ def columnExists(columnFile, regex=None):
|
||||||
@stackedmethod
|
@stackedmethod
|
||||||
def fileExists(pathFile):
|
def fileExists(pathFile):
|
||||||
retVal = []
|
retVal = []
|
||||||
|
|
||||||
|
message = "which common files file do you want to use?\n"
|
||||||
|
message += "[1] default '%s' (press Enter)\n" % pathFile
|
||||||
|
message += "[2] custom"
|
||||||
|
choice = readInput(message, default='1')
|
||||||
|
|
||||||
|
if choice == '2':
|
||||||
|
message = "what's the custom common files file location?\n"
|
||||||
|
pathFile = readInput(message) or pathFile
|
||||||
|
|
||||||
|
infoMsg = "checking files existence using items from '%s'" % pathFile
|
||||||
|
logger.info(infoMsg)
|
||||||
|
|
||||||
paths = getFileItems(pathFile, unique=True)
|
paths = getFileItems(pathFile, unique=True)
|
||||||
|
|
||||||
kb.bruteMode = True
|
kb.bruteMode = True
|
||||||
|
@ -321,7 +335,7 @@ def fileExists(pathFile):
|
||||||
while kb.threadContinue:
|
while kb.threadContinue:
|
||||||
kb.locks.count.acquire()
|
kb.locks.count.acquire()
|
||||||
if threadData.shared.count < threadData.shared.limit:
|
if threadData.shared.count < threadData.shared.limit:
|
||||||
path = paths[threadData.shared.count]
|
path = ntToPosixSlashes(paths[threadData.shared.count])
|
||||||
threadData.shared.count += 1
|
threadData.shared.count += 1
|
||||||
kb.locks.count.release()
|
kb.locks.count.release()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -89,7 +89,7 @@ class Filesystem(GenericFilesystem):
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
txtTbl = self.fileTblName
|
txtTbl = self.fileTblName
|
||||||
hexTbl = "%shex" % self.fileTblName
|
hexTbl = "%s%shex" % (self.fileTblName, randomStr())
|
||||||
|
|
||||||
self.createSupportTbl(txtTbl, self.tblField, "text")
|
self.createSupportTbl(txtTbl, self.tblField, "text")
|
||||||
inject.goStacked("DROP TABLE %s" % hexTbl)
|
inject.goStacked("DROP TABLE %s" % hexTbl)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user