mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f7a7bed20 | ||
|
|
36b0ece2ad | ||
|
|
7d8fbab035 | ||
|
|
5580db0045 | ||
|
|
3fde205cd4 | ||
|
|
1822cc05f6 | ||
|
|
509bb41b06 | ||
|
|
8ca3287df4 | ||
|
|
60767de2eb | ||
|
|
29e683fb5b | ||
|
|
148d1c9ff9 | ||
|
|
a8cb14ed4a | ||
|
|
c634f0b0d6 | ||
|
|
8605c49911 | ||
|
|
44f6951dfe | ||
|
|
b5b32c951c | ||
|
|
a9c3b59cff | ||
|
|
4528cb014d | ||
|
|
2c5f976993 | ||
|
|
4f2669a45a | ||
|
|
641838ed73 | ||
|
|
2a681b7bd6 | ||
|
|
7f3f1dcdee | ||
|
|
4147f44e63 |
@@ -125,8 +125,12 @@ def main(src, dst):
|
||||
# Have the IP packet contain the ICMP packet (along with its payload)
|
||||
ip.contains(icmp)
|
||||
|
||||
# Send it to the target host
|
||||
sock.sendto(ip.get_packet(), (dst, 0))
|
||||
try:
|
||||
# Send it to the target host
|
||||
sock.sendto(ip.get_packet(), (dst, 0))
|
||||
except socket.error, ex:
|
||||
sys.stderr.write("'%s'\n" % ex)
|
||||
sys.stderr.flush()
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) < 3:
|
||||
|
||||
@@ -47,6 +47,7 @@ from lib.core.common import unArrayizeValue
|
||||
from lib.core.common import urlencode
|
||||
from lib.core.common import wasLastResponseDBMSError
|
||||
from lib.core.common import wasLastResponseHTTPError
|
||||
from lib.core.convert import unicodeencode
|
||||
from lib.core.defaults import defaults
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
@@ -54,6 +55,7 @@ from lib.core.data import logger
|
||||
from lib.core.datatype import AttribDict
|
||||
from lib.core.datatype import InjectionDict
|
||||
from lib.core.decorators import cachedmethod
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.dicts import FROM_DUMMY_TABLE
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import HASHDB_KEYS
|
||||
@@ -452,11 +454,13 @@ def checkSqlInjection(place, parameter, value):
|
||||
boundPayload = agent.prefixQuery(fstPayload, prefix, where, clause)
|
||||
boundPayload = agent.suffixQuery(boundPayload, comment, suffix, where)
|
||||
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
|
||||
|
||||
if reqPayload:
|
||||
if reqPayload in seenPayload:
|
||||
stripPayload = re.sub(r"(\A|\b|_)([A-Za-z]{4}((?<!LIKE))|\d+)(_|\b|\Z)", r"\g<1>.\g<4>", reqPayload)
|
||||
if stripPayload in seenPayload:
|
||||
continue
|
||||
else:
|
||||
seenPayload.add(reqPayload)
|
||||
seenPayload.add(stripPayload)
|
||||
else:
|
||||
reqPayload = None
|
||||
|
||||
@@ -832,6 +836,7 @@ def checkSqlInjection(place, parameter, value):
|
||||
|
||||
return injection
|
||||
|
||||
@stackedmethod
|
||||
def heuristicCheckDbms(injection):
|
||||
"""
|
||||
This functions is called when boolean-based blind is identified with a
|
||||
@@ -868,6 +873,7 @@ def heuristicCheckDbms(injection):
|
||||
|
||||
return retVal
|
||||
|
||||
@stackedmethod
|
||||
def checkFalsePositives(injection):
|
||||
"""
|
||||
Checks for false positives (only in single special cases)
|
||||
@@ -929,6 +935,7 @@ def checkFalsePositives(injection):
|
||||
|
||||
return retVal
|
||||
|
||||
@stackedmethod
|
||||
def checkSuhosinPatch(injection):
|
||||
"""
|
||||
Checks for existence of Suhosin-patch (and alike) protection mechanism(s)
|
||||
@@ -952,6 +959,7 @@ def checkSuhosinPatch(injection):
|
||||
|
||||
kb.injection = popValue()
|
||||
|
||||
@stackedmethod
|
||||
def checkFilteredChars(injection):
|
||||
debugMsg = "checking for filtered characters"
|
||||
logger.debug(debugMsg)
|
||||
@@ -1314,6 +1322,7 @@ def checkRegexp():
|
||||
|
||||
return True
|
||||
|
||||
@stackedmethod
|
||||
def checkWaf():
|
||||
"""
|
||||
Reference: http://seclists.org/nmap-dev/2011/q2/att-1005/http-waf-detect.nse
|
||||
@@ -1352,7 +1361,7 @@ def checkWaf():
|
||||
conf.timeout = IDS_WAF_CHECK_TIMEOUT
|
||||
|
||||
try:
|
||||
retVal = Request.queryPage(place=place, value=value, getRatioValue=True, noteResponseTime=False, silent=True)[1] < IDS_WAF_CHECK_RATIO
|
||||
retVal = Request.queryPage(place=place, value=value, getRatioValue=True, noteResponseTime=False, silent=True, disableTampering=True)[1] < IDS_WAF_CHECK_RATIO
|
||||
except SqlmapConnectionException:
|
||||
retVal = True
|
||||
finally:
|
||||
@@ -1379,6 +1388,7 @@ def checkWaf():
|
||||
|
||||
return retVal
|
||||
|
||||
@stackedmethod
|
||||
def identifyWaf():
|
||||
if not conf.identifyWaf:
|
||||
return None
|
||||
@@ -1463,6 +1473,7 @@ def identifyWaf():
|
||||
|
||||
return retVal
|
||||
|
||||
@stackedmethod
|
||||
def checkNullConnection():
|
||||
"""
|
||||
Reference: http://www.wisec.it/sectou.php?id=472f952d79293
|
||||
@@ -1511,18 +1522,19 @@ def checkNullConnection():
|
||||
return kb.nullConnection is not None
|
||||
|
||||
def checkConnection(suppressOutput=False):
|
||||
if not any((conf.proxy, conf.tor, conf.dummy, conf.offline)):
|
||||
try:
|
||||
debugMsg = "resolving hostname '%s'" % conf.hostname
|
||||
logger.debug(debugMsg)
|
||||
socket.getaddrinfo(conf.hostname, None)
|
||||
except socket.gaierror:
|
||||
errMsg = "host '%s' does not exist" % conf.hostname
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
except socket.error, ex:
|
||||
errMsg = "problem occurred while "
|
||||
errMsg += "resolving a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex))
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
if not re.search(r"\A\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z", conf.hostname):
|
||||
if not any((conf.proxy, conf.tor, conf.dummy, conf.offline)):
|
||||
try:
|
||||
debugMsg = "resolving hostname '%s'" % conf.hostname
|
||||
logger.debug(debugMsg)
|
||||
socket.getaddrinfo(conf.hostname, None)
|
||||
except socket.gaierror:
|
||||
errMsg = "host '%s' does not exist" % conf.hostname
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
except socket.error, ex:
|
||||
errMsg = "problem occurred while "
|
||||
errMsg += "resolving a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex))
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
|
||||
if not suppressOutput and not conf.dummy and not conf.offline:
|
||||
infoMsg = "testing connection to the target URL"
|
||||
@@ -1554,7 +1566,7 @@ def checkConnection(suppressOutput=False):
|
||||
threadData = getCurrentThreadData()
|
||||
|
||||
if kb.redirectChoice == REDIRECTION.YES and threadData.lastRedirectURL and threadData.lastRedirectURL[0] == threadData.lastRequestUID:
|
||||
if conf.hostname in (threadData.lastRedirectURL[1] or "") and threadData.lastRedirectURL[1].startswith("https://"):
|
||||
if (threadData.lastRedirectURL[1] or "").startswith("https://") and unicodeencode(conf.hostname) in threadData.lastRedirectURL[1]:
|
||||
conf.url = re.sub(r"https?://", "https://", conf.url)
|
||||
match = re.search(r":(\d+)", threadData.lastRedirectURL[1])
|
||||
port = match.group(1) if match else 443
|
||||
|
||||
@@ -43,6 +43,7 @@ from lib.core.common import urldecode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.enums import CONTENT_TYPE
|
||||
from lib.core.enums import HASHDB_KEYS
|
||||
from lib.core.enums import HEURISTIC_TEST
|
||||
@@ -253,6 +254,7 @@ def _saveToResultsFile():
|
||||
|
||||
conf.resultsFP.flush()
|
||||
|
||||
@stackedmethod
|
||||
def start():
|
||||
"""
|
||||
This function calls a function that performs checks on both URL
|
||||
|
||||
@@ -1015,8 +1015,11 @@ def readInput(message, default=None, checkBatch=True, boolean=False):
|
||||
elif answer is None and retVal:
|
||||
retVal = "%s,%s" % (retVal, getUnicode(item, UNICODE_ENCODING))
|
||||
|
||||
if message and getattr(LOGGER_HANDLER, "is_tty", False):
|
||||
message = "\r%s" % message
|
||||
|
||||
if retVal:
|
||||
dataToStdout("\r%s%s\n" % (message, retVal), forceOutput=not kb.wizardMode, bold=True)
|
||||
dataToStdout("%s%s\n" % (message, retVal), forceOutput=not kb.wizardMode, bold=True)
|
||||
|
||||
debugMsg = "used the given answer"
|
||||
logger.debug(debugMsg)
|
||||
@@ -1030,7 +1033,7 @@ def readInput(message, default=None, checkBatch=True, boolean=False):
|
||||
else:
|
||||
options = unicode()
|
||||
|
||||
dataToStdout("\r%s%s\n" % (message, options), forceOutput=not kb.wizardMode, bold=True)
|
||||
dataToStdout("%s%s\n" % (message, options), forceOutput=not kb.wizardMode, bold=True)
|
||||
|
||||
debugMsg = "used the default behavior, running in batch mode"
|
||||
logger.debug(debugMsg)
|
||||
@@ -1043,7 +1046,7 @@ def readInput(message, default=None, checkBatch=True, boolean=False):
|
||||
if conf.get("beep"):
|
||||
beep()
|
||||
|
||||
dataToStdout("\r%s" % message, forceOutput=not kb.wizardMode, bold=True)
|
||||
dataToStdout("%s" % message, forceOutput=not kb.wizardMode, bold=True)
|
||||
kb.prependFlag = False
|
||||
|
||||
retVal = raw_input().strip() or default
|
||||
@@ -1493,6 +1496,23 @@ def parseTargetUrl():
|
||||
if conf.url != originalUrl:
|
||||
kb.originalUrls[conf.url] = originalUrl
|
||||
|
||||
def escapeJsonValue(value):
|
||||
"""
|
||||
Escapes JSON value (used in payloads)
|
||||
|
||||
# Reference: https://stackoverflow.com/a/16652683
|
||||
"""
|
||||
|
||||
retVal = ""
|
||||
|
||||
for char in value:
|
||||
if char < ' ' or char == '"':
|
||||
retVal += json.dumps(char)[1:-1]
|
||||
else:
|
||||
retVal += char
|
||||
|
||||
return retVal
|
||||
|
||||
def expandAsteriskForColumns(expression):
|
||||
"""
|
||||
If the user provided an asterisk rather than the column(s)
|
||||
@@ -3280,14 +3300,17 @@ def checkIntegrity():
|
||||
logger.debug("running code integrity check")
|
||||
|
||||
retVal = True
|
||||
for checksum, _ in (re.split(r'\s+', _) for _ in getFileItems(paths.CHECKSUM_MD5)):
|
||||
path = os.path.normpath(os.path.join(paths.SQLMAP_ROOT_PATH, _))
|
||||
if not os.path.isfile(path):
|
||||
logger.error("missing file detected '%s'" % path)
|
||||
retVal = False
|
||||
elif md5File(path) != checksum:
|
||||
logger.error("wrong checksum of file '%s' detected" % path)
|
||||
retVal = False
|
||||
|
||||
if os.path.isfile(paths.CHECKSUM_MD5):
|
||||
for checksum, _ in (re.split(r'\s+', _) for _ in getFileItems(paths.CHECKSUM_MD5)):
|
||||
path = os.path.normpath(os.path.join(paths.SQLMAP_ROOT_PATH, _))
|
||||
if not os.path.isfile(path):
|
||||
logger.error("missing file detected '%s'" % path)
|
||||
retVal = False
|
||||
elif md5File(path) != checksum:
|
||||
logger.error("wrong checksum of file '%s' detected" % path)
|
||||
retVal = False
|
||||
|
||||
return retVal
|
||||
|
||||
def unhandledExceptionMessage():
|
||||
@@ -3870,7 +3893,7 @@ def asciifyUrl(url, forceQuote=False):
|
||||
# urllib.quote(s.replace('%', '')) != s.replace('%', '')
|
||||
# which would trigger on all %-characters, e.g. "&".
|
||||
if getUnicode(s).encode("ascii", "replace") != s or forceQuote:
|
||||
return urllib.quote(s.encode(UNICODE_ENCODING), safe=safe)
|
||||
return urllib.quote(s.encode(UNICODE_ENCODING) if isinstance(s, unicode) else s, safe=safe)
|
||||
return s
|
||||
|
||||
username = quote(parts.username, '')
|
||||
|
||||
@@ -7,6 +7,8 @@ See the file 'LICENSE' for copying permission
|
||||
|
||||
import hashlib
|
||||
|
||||
from lib.core.threads import getCurrentThreadData
|
||||
|
||||
def cachedmethod(f, cache={}):
|
||||
"""
|
||||
Method with a cached content
|
||||
@@ -22,3 +24,18 @@ def cachedmethod(f, cache={}):
|
||||
return cache[key]
|
||||
|
||||
return _
|
||||
|
||||
def stackedmethod(f):
|
||||
def _(*args, **kwargs):
|
||||
threadData = getCurrentThreadData()
|
||||
originalLevel = len(threadData.valueStack)
|
||||
|
||||
try:
|
||||
result = f(*args, **kwargs)
|
||||
finally:
|
||||
if len(threadData.valueStack) > originalLevel:
|
||||
threadData.valueStack = threadData.valueStack[:originalLevel]
|
||||
|
||||
return result
|
||||
|
||||
return _
|
||||
@@ -918,7 +918,7 @@ def _setTamperingFunctions():
|
||||
dirname, filename = os.path.split(script)
|
||||
dirname = os.path.abspath(dirname)
|
||||
|
||||
infoMsg = "loading tamper script '%s'" % filename[:-3]
|
||||
infoMsg = "loading tamper module '%s'" % filename[:-3]
|
||||
logger.info(infoMsg)
|
||||
|
||||
if not os.path.exists(os.path.join(dirname, "__init__.py")):
|
||||
@@ -932,7 +932,7 @@ def _setTamperingFunctions():
|
||||
try:
|
||||
module = __import__(filename[:-3].encode(sys.getfilesystemencoding() or UNICODE_ENCODING))
|
||||
except Exception, ex:
|
||||
raise SqlmapSyntaxException("cannot import tamper script '%s' (%s)" % (filename[:-3], getSafeExString(ex)))
|
||||
raise SqlmapSyntaxException("cannot import tamper module '%s' (%s)" % (filename[:-3], getSafeExString(ex)))
|
||||
|
||||
priority = PRIORITY.NORMAL if not hasattr(module, "__priority__") else module.__priority__
|
||||
|
||||
@@ -962,7 +962,12 @@ def _setTamperingFunctions():
|
||||
|
||||
break
|
||||
elif name == "dependencies":
|
||||
function()
|
||||
try:
|
||||
function()
|
||||
except Exception, ex:
|
||||
errMsg = "error occurred while checking dependencies "
|
||||
errMsg += "for tamper module '%s' ('%s')" % (filename[:-3], getSafeExString(ex))
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
if not found:
|
||||
errMsg = "missing function 'tamper(payload, **kwargs)' "
|
||||
|
||||
@@ -14,11 +14,11 @@ _readline = None
|
||||
try:
|
||||
from readline import *
|
||||
import readline as _readline
|
||||
except ImportError:
|
||||
except:
|
||||
try:
|
||||
from pyreadline import *
|
||||
import pyreadline as _readline
|
||||
except ImportError:
|
||||
except:
|
||||
pass
|
||||
|
||||
if IS_WIN and _readline:
|
||||
|
||||
@@ -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.2.4.0"
|
||||
VERSION = "1.2.5.0"
|
||||
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)
|
||||
|
||||
@@ -230,7 +230,7 @@ def _setRequestParams():
|
||||
if kb.customInjectionMark not in conf.data: # in case that no usable parameter values has been found
|
||||
conf.parameters[PLACE.POST] = conf.data
|
||||
|
||||
kb.processUserMarks = True if (kb.postHint and kb.customInjectionMark in conf.data) else kb.processUserMarks
|
||||
kb.processUserMarks = True if (kb.postHint and kb.customInjectionMark in (conf.data or "")) else kb.processUserMarks
|
||||
|
||||
if re.search(URI_INJECTABLE_REGEX, conf.url, re.I) and not any(place in conf.parameters for place in (PLACE.GET, PLACE.POST)) and not kb.postHint and kb.customInjectionMark not in (conf.data or "") and conf.url.startswith("http"):
|
||||
warnMsg = "you've provided target URL without any GET "
|
||||
|
||||
@@ -683,6 +683,9 @@ def cmdLineParser(argv=None):
|
||||
parser.add_option("--force-dns", dest="forceDns", action="store_true",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--force-pivoting", dest="forcePivoting", action="store_true",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--force-threads", dest="forceThreads", action="store_true",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def headersParser(headers):
|
||||
"x-powered-by": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "x-powered-by.xml"),
|
||||
}
|
||||
|
||||
for header in itertools.ifilter(lambda x: x in kb.headerPaths, headers):
|
||||
for header in itertools.ifilter(lambda _: _ in kb.headerPaths, headers):
|
||||
value = headers[header]
|
||||
xmlfile = kb.headerPaths[header]
|
||||
handler = FingerprintHandler(value, kb.headersFp)
|
||||
|
||||
@@ -334,7 +334,7 @@ def decodePage(page, contentEncoding, contentType):
|
||||
|
||||
kb.pageEncoding = kb.pageEncoding or checkCharEncoding(getHeuristicCharEncoding(page))
|
||||
|
||||
if kb.pageEncoding and kb.pageEncoding.lower() == "utf-8-sig":
|
||||
if (kb.pageEncoding or "").lower() == "utf-8-sig":
|
||||
kb.pageEncoding = "utf-8"
|
||||
if page and page.startswith("\xef\xbb\xbf"): # Reference: https://docs.python.org/2/library/codecs.html (Note: noticed problems when "utf-8-sig" is left to Python for handling)
|
||||
page = page[3:]
|
||||
|
||||
@@ -34,6 +34,7 @@ from lib.core.common import calculateDeltaSeconds
|
||||
from lib.core.common import checkSameHost
|
||||
from lib.core.common import clearConsoleLine
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import escapeJsonValue
|
||||
from lib.core.common import evaluateCode
|
||||
from lib.core.common import extractRegexResult
|
||||
from lib.core.common import findMultipartPostBoundary
|
||||
@@ -63,6 +64,7 @@ from lib.core.common import urlencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.dicts import POST_HINT_CONTENT_TYPES
|
||||
from lib.core.enums import ADJUST_TIME_DELAY
|
||||
from lib.core.enums import AUTH_TYPE
|
||||
@@ -428,8 +430,10 @@ class Connect(object):
|
||||
method = unicodeencode(method)
|
||||
req = MethodRequest(url, post, headers)
|
||||
req.set_method(method)
|
||||
else:
|
||||
elif url is not None:
|
||||
req = urllib2.Request(url, post, headers)
|
||||
else:
|
||||
return None, None, None
|
||||
|
||||
requestHeaders += "\r\n".join(["%s: %s" % (getUnicode(key.capitalize() if isinstance(key, basestring) else key), getUnicode(value)) for (key, value) in req.header_items()])
|
||||
|
||||
@@ -494,7 +498,7 @@ class Connect(object):
|
||||
responseHeaders = {}
|
||||
|
||||
page = decodePage(page, responseHeaders.get(HTTP_HEADER.CONTENT_ENCODING), responseHeaders.get(HTTP_HEADER.CONTENT_TYPE))
|
||||
status = getUnicode(conn.msg) if conn else None
|
||||
status = getUnicode(conn.msg) if conn and getattr(conn, "msg", None) else None
|
||||
|
||||
kb.connErrorCounter = 0
|
||||
|
||||
@@ -577,7 +581,7 @@ class Connect(object):
|
||||
page = page if isinstance(page, unicode) else getUnicode(page)
|
||||
|
||||
code = ex.code
|
||||
status = getUnicode(ex.msg)
|
||||
status = getSafeExString(ex)
|
||||
|
||||
kb.originalCode = kb.originalCode or code
|
||||
threadData.lastHTTPError = (threadData.lastRequestUID, code, status)
|
||||
@@ -768,7 +772,8 @@ class Connect(object):
|
||||
return page, responseHeaders, code
|
||||
|
||||
@staticmethod
|
||||
def queryPage(value=None, place=None, content=False, getRatioValue=False, silent=False, method=None, timeBasedCompare=False, noteResponseTime=True, auxHeaders=None, response=False, raise404=None, removeReflection=True):
|
||||
@stackedmethod
|
||||
def queryPage(value=None, place=None, content=False, getRatioValue=False, silent=False, method=None, timeBasedCompare=False, noteResponseTime=True, auxHeaders=None, response=False, raise404=None, removeReflection=True, disableTampering=False):
|
||||
"""
|
||||
This method calls a function to get the target URL page content
|
||||
and returns its page ratio (0 <= ratio <= 1) or a boolean value
|
||||
@@ -815,7 +820,7 @@ class Connect(object):
|
||||
conf.httpHeaders.append((HTTP_HEADER.CONTENT_TYPE, contentType))
|
||||
|
||||
if payload:
|
||||
if kb.tamperFunctions:
|
||||
if not disableTampering and kb.tamperFunctions:
|
||||
for function in kb.tamperFunctions:
|
||||
try:
|
||||
payload = function(payload=payload, headers=auxHeaders)
|
||||
@@ -839,16 +844,10 @@ class Connect(object):
|
||||
# with their HTML encoded counterparts
|
||||
payload = payload.replace('>', ">").replace('<', "<")
|
||||
elif kb.postHint == POST_HINT.JSON:
|
||||
if payload.startswith('"') and payload.endswith('"'):
|
||||
payload = json.dumps(payload[1:-1])
|
||||
else:
|
||||
payload = json.dumps(payload)[1:-1]
|
||||
payload = escapeJsonValue(payload)
|
||||
elif kb.postHint == POST_HINT.JSON_LIKE:
|
||||
payload = payload.replace("'", REPLACEMENT_MARKER).replace('"', "'").replace(REPLACEMENT_MARKER, '"')
|
||||
if payload.startswith('"') and payload.endswith('"'):
|
||||
payload = json.dumps(payload[1:-1])
|
||||
else:
|
||||
payload = json.dumps(payload)[1:-1]
|
||||
payload = escapeJsonValue(payload)
|
||||
payload = payload.replace("'", REPLACEMENT_MARKER).replace('"', "'").replace(REPLACEMENT_MARKER, '"')
|
||||
value = agent.replacePayload(value, payload)
|
||||
else:
|
||||
|
||||
@@ -33,6 +33,7 @@ from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.data import queries
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.dicts import FROM_DUMMY_TABLE
|
||||
from lib.core.enums import CHARSET_TYPE
|
||||
from lib.core.enums import DBMS
|
||||
@@ -333,6 +334,7 @@ def _goUnion(expression, unpack=True, dump=False):
|
||||
|
||||
return output
|
||||
|
||||
@stackedmethod
|
||||
def getValue(expression, blind=True, union=True, error=True, time=True, fromUser=False, expected=None, batch=False, unpack=True, resumeValue=True, charsetType=None, firstChar=None, lastChar=None, dump=False, suppressOutput=None, expectingNone=False, safeCharEncode=True):
|
||||
"""
|
||||
Called each time sqlmap inject a SQL query on the SQL injection
|
||||
|
||||
@@ -675,13 +675,10 @@ class Metasploit:
|
||||
written = self.writeFile(self.shellcodeexecLocal, self.shellcodeexecRemote, "binary", forceCheck=True)
|
||||
|
||||
if written is not True:
|
||||
errMsg = "there has been a problem uploading shellcodeexec, it "
|
||||
errMsg = "there has been a problem uploading shellcodeexec. It "
|
||||
errMsg += "looks like the binary file has not been written "
|
||||
errMsg += "on the database underlying file system or an AV has "
|
||||
errMsg += "flagged it as malicious and removed it. In such a case "
|
||||
errMsg += "it is recommended to recompile shellcodeexec with "
|
||||
errMsg += "slight modification to the source code or pack it "
|
||||
errMsg += "with an obfuscator software"
|
||||
errMsg += "flagged it as malicious and removed it"
|
||||
logger.error(errMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -24,6 +24,7 @@ from lib.core.convert import hexencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.enums import CHARSET_TYPE
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import EXPECTED
|
||||
@@ -96,6 +97,7 @@ class XP_cmdshell:
|
||||
|
||||
return wasLastResponseDelayed()
|
||||
|
||||
@stackedmethod
|
||||
def _xpCmdshellTest(self):
|
||||
threadData = getCurrentThreadData()
|
||||
pushValue(threadData.disableStdOut)
|
||||
|
||||
@@ -27,6 +27,7 @@ from lib.core.common import wasLastResponseDBMSError
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.dicts import FROM_DUMMY_TABLE
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.settings import LIMITED_ROWS_TEST_NUMBER
|
||||
@@ -48,7 +49,8 @@ def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where=
|
||||
"""
|
||||
retVal = None
|
||||
|
||||
def _orderByTechnique(lowerCount, upperCount):
|
||||
@stackedmethod
|
||||
def _orderByTechnique(lowerCount=None, upperCount=None):
|
||||
def _orderByTest(cols):
|
||||
query = agent.prefixQuery("ORDER BY %d" % cols, prefix=prefix)
|
||||
query = agent.suffixQuery(query, suffix=suffix, comment=comment)
|
||||
@@ -89,7 +91,7 @@ def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where=
|
||||
lowerCount, upperCount = conf.uColsStart, conf.uColsStop
|
||||
|
||||
if lowerCount == 1 or conf.uCols:
|
||||
found = kb.orderByColumns or _orderByTechnique(lowerCount, upperCount)
|
||||
found = kb.orderByColumns or (_orderByTechnique(lowerCount, upperCount) if conf.uCols else _orderByTechnique())
|
||||
if found:
|
||||
kb.orderByColumns = found
|
||||
infoMsg = "target URL appears to have %d column%s in query" % (found, 's' if found > 1 else "")
|
||||
|
||||
@@ -20,6 +20,7 @@ from lib.core.common import urlencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.enums import CUSTOM_LOGGING
|
||||
from lib.core.enums import HTTP_HEADER
|
||||
from lib.core.enums import REDIRECTION
|
||||
@@ -165,6 +166,7 @@ def _search(dork):
|
||||
|
||||
return retVal
|
||||
|
||||
@stackedmethod
|
||||
def search(dork):
|
||||
pushValue(kb.redirectChoice)
|
||||
kb.redirectChoice = REDIRECTION.YES
|
||||
|
||||
@@ -43,6 +43,8 @@ class Connector(GenericConnector):
|
||||
self.connector = pymssql.connect(host="%s:%d" % (self.hostname, self.port), user=self.user, password=self.password, database=self.db, login_timeout=conf.timeout, timeout=conf.timeout)
|
||||
except (pymssql.Error, _mssql.MssqlDatabaseException), msg:
|
||||
raise SqlmapConnectionException(msg)
|
||||
except ValueError:
|
||||
raise SqlmapConnectionException
|
||||
|
||||
self.initCursor()
|
||||
self.printConnected()
|
||||
|
||||
@@ -14,6 +14,7 @@ from lib.core.common import singleTimeWarnMessage
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.enums import CHARSET_TYPE
|
||||
from lib.core.enums import EXPECTED
|
||||
from lib.core.enums import PAYLOAD
|
||||
@@ -81,6 +82,7 @@ class Filesystem(GenericFilesystem):
|
||||
|
||||
return result
|
||||
|
||||
@stackedmethod
|
||||
def unionWriteFile(self, wFile, dFile, fileType, forceCheck=False):
|
||||
logger.debug("encoding file to its hexadecimal string value")
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ class Connector(GenericConnector):
|
||||
self.connector = pymssql.connect(host="%s:%d" % (self.hostname, self.port), user=self.user, password=self.password, database=self.db, login_timeout=conf.timeout, timeout=conf.timeout)
|
||||
except (pymssql.Error, _mssql.MssqlDatabaseException), msg:
|
||||
raise SqlmapConnectionException(msg)
|
||||
except ValueError:
|
||||
raise SqlmapConnectionException
|
||||
|
||||
self.initCursor()
|
||||
self.printConnected()
|
||||
|
||||
@@ -32,6 +32,7 @@ from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.data import paths
|
||||
from lib.core.data import queries
|
||||
from lib.core.decorators import stackedmethod
|
||||
from lib.core.dicts import FIREBIRD_TYPES
|
||||
from lib.core.dicts import INFORMIX_TYPES
|
||||
from lib.core.enums import CHARSET_TYPE
|
||||
@@ -806,6 +807,7 @@ class Databases:
|
||||
|
||||
return kb.data.cachedColumns
|
||||
|
||||
@stackedmethod
|
||||
def getSchema(self):
|
||||
infoMsg = "enumerating database management system schema"
|
||||
logger.info(infoMsg)
|
||||
|
||||
@@ -23,6 +23,7 @@ from lib.core.common import prioritySortColumns
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import safeSQLIdentificatorNaming
|
||||
from lib.core.common import singleTimeLogMessage
|
||||
from lib.core.common import singleTimeWarnMessage
|
||||
from lib.core.common import unArrayizeValue
|
||||
from lib.core.common import unsafeSQLIdentificatorNaming
|
||||
from lib.core.data import conf
|
||||
@@ -184,7 +185,11 @@ class Entries:
|
||||
if not (isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and kb.injection.data[PAYLOAD.TECHNIQUE.UNION].where == PAYLOAD.WHERE.ORIGINAL):
|
||||
table = "%s.%s" % (conf.db, tbl)
|
||||
|
||||
if Backend.isDbms(DBMS.MSSQL):
|
||||
if Backend.isDbms(DBMS.MSSQL) and not conf.forcePivoting:
|
||||
warnMsg = "in case of table dumping problems (e.g. column entry order) "
|
||||
warnMsg += "you are advised to rerun with '--force-pivoting'"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
query = rootQuery.blind.count % table
|
||||
query = agent.whereQuery(query)
|
||||
|
||||
@@ -327,7 +332,11 @@ class Entries:
|
||||
elif Backend.isDbms(DBMS.INFORMIX):
|
||||
table = "%s:%s" % (conf.db, tbl)
|
||||
|
||||
if Backend.isDbms(DBMS.MSSQL):
|
||||
if Backend.isDbms(DBMS.MSSQL) and not conf.forcePivoting:
|
||||
warnMsg = "in case of table dumping problems (e.g. column entry order) "
|
||||
warnMsg += "you are advised to rerun with '--force-pivoting'"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
try:
|
||||
indexRange = getLimitRange(count, plusOne=True)
|
||||
|
||||
|
||||
@@ -265,11 +265,18 @@ def main():
|
||||
raise SystemExit
|
||||
|
||||
elif all(_ in excMsg for _ in ("twophase", "sqlalchemy")):
|
||||
errMsg = "please update the 'sqlalchemy' package"
|
||||
errMsg = "please update the 'sqlalchemy' package "
|
||||
errMsg += "(Reference: https://github.com/apache/incubator-superset/issues/3447)"
|
||||
logger.error(errMsg)
|
||||
raise SystemExit
|
||||
|
||||
elif "must be pinned buffer, not bytearray" in excMsg:
|
||||
errMsg = "error occurred at Python interpreter which "
|
||||
errMsg += "is fixed in 2.7.x. Please update accordingly "
|
||||
errMsg += "(Reference: https://bugs.python.org/issue8104)"
|
||||
logger.error(errMsg)
|
||||
raise SystemExit
|
||||
|
||||
elif "can't start new thread" in excMsg:
|
||||
errMsg = "there has been a problem while creating new thread instance. "
|
||||
errMsg += "Please make sure that you are not running too many processes"
|
||||
|
||||
@@ -5,7 +5,7 @@ b0eb597c613afeff9d62898cf4c67a56 extra/cloak/cloak.py
|
||||
e0911386106b95d2ba4b12d651b2eb16 extra/dbgtool/dbgtool.py
|
||||
1e5532ede194ac9c083891c2f02bca93 extra/dbgtool/__init__.py
|
||||
acba8b5dc93db0fe6b2b04ff0138c33c extra/icmpsh/icmpsh.exe_
|
||||
2176d964f2d5ba2d871383d6a1868b8f extra/icmpsh/icmpsh_m.py
|
||||
fe39e5c315d63afff5cb99ec42fc883f extra/icmpsh/icmpsh_m.py
|
||||
2d020d2bdcee1170805f48839fdb89df extra/icmpsh/__init__.py
|
||||
1e5532ede194ac9c083891c2f02bca93 extra/__init__.py
|
||||
27629e01ba722271c990ad4b27151917 extra/mssqlsig/update.py
|
||||
@@ -21,17 +21,17 @@ c88d66597f4aab719bde4542b0a1a6e0 extra/shutils/regressiontest.py
|
||||
1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py
|
||||
b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
|
||||
0f581182871148b0456a691ae85b04c0 lib/controller/action.py
|
||||
8901cbab8f3885c554fe9ac43a1e5f14 lib/controller/checks.py
|
||||
33689bb1b064d4eebc216934795a595f lib/controller/controller.py
|
||||
aea19b45c6154035a689954719c753dc lib/controller/checks.py
|
||||
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
|
||||
c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
|
||||
b1990c7805943f0c973a853bba981d96 lib/core/agent.py
|
||||
fd8f239e259afaf5f24bcf34a0ad187f lib/core/bigarray.py
|
||||
58312f5c2f252145ec4aed01bc7952a0 lib/core/common.py
|
||||
f42e346d33199b4f663cff6efe2be775 lib/core/common.py
|
||||
0d082da16c388b3445e656e0760fb582 lib/core/convert.py
|
||||
9f87391b6a3395f7f50830b391264f27 lib/core/data.py
|
||||
72016ea5c994a711a262fd64572a0fcd lib/core/datatype.py
|
||||
12e80071013606f01822c3823fb51054 lib/core/decorators.py
|
||||
04638422b6ad1613238a9abf4fdf6491 lib/core/decorators.py
|
||||
fbb55cc6100318ff922957b6577dc58f lib/core/defaults.py
|
||||
da98f5288aad57855c6d287ba3b397a1 lib/core/dicts.py
|
||||
9ea8a043030796e6faef7f7e957729d5 lib/core/dump.py
|
||||
@@ -40,16 +40,16 @@ cada93357a7321655927fc9625b3bfec lib/core/exception.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
|
||||
458a194764805cd8312c14ecd4be4d1e lib/core/log.py
|
||||
c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py
|
||||
b950c8c2f2ae87ad2ec99e1d19b2c03a lib/core/option.py
|
||||
83345a6b0b7e187d2cbcc280a509f03e lib/core/option.py
|
||||
7cfd04e583cca782b843f6f6d973981a lib/core/profiling.py
|
||||
ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py
|
||||
6f654e1715571eff68a0f8af3d62dcf8 lib/core/readlineng.py
|
||||
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
|
||||
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
|
||||
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
|
||||
88d4f1d18b6919f1ad5f179ed959e7a7 lib/core/settings.py
|
||||
1b801d825811ee4362e07e568e8a928e lib/core/settings.py
|
||||
0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py
|
||||
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
|
||||
a35efa7bec9f1e6cedf17c9830a79241 lib/core/target.py
|
||||
6306284edcccc185b2df085438572b0d lib/core/target.py
|
||||
72d499ca8d792e90a1ebfb2ad2341a51 lib/core/testing.py
|
||||
de9922a29c71a235cb95a916ff925db2 lib/core/threads.py
|
||||
c40758411bb0bd68764d78e0bb72bd0f lib/core/unescaper.py
|
||||
@@ -57,23 +57,23 @@ af2d1810b6a7ebc61689a53c253ddbaa lib/core/update.py
|
||||
e772deb63270375e685fa5a7b775c382 lib/core/wordlist.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/__init__.py
|
||||
7620f1f4b8791e13c7184c06b5421754 lib/parse/banner.py
|
||||
f667710f17b8447358ee7508a9d2faf1 lib/parse/cmdline.py
|
||||
5e46fac7f824ba8ab8003a1cd47d8af3 lib/parse/cmdline.py
|
||||
fb2e2f05dde98caeac6ccf3e67192177 lib/parse/configfile.py
|
||||
3794ff139869f5ae8e81cfdbe5714f56 lib/parse/handler.py
|
||||
8d7321a1bc1a26ac55b2398bf445d78f lib/parse/headers.py
|
||||
aaad2a0d80f05eaebe52c71519b3dfc7 lib/parse/headers.py
|
||||
33f21b11b7963062df8fa2292229df80 lib/parse/html.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/parse/__init__.py
|
||||
ec4e56bbb1349176b2a22e0b99ba6a55 lib/parse/payloads.py
|
||||
492654567e72b6a14584651fcd9f16e6 lib/parse/sitemap.py
|
||||
30eed3a92a04ed2c29770e1b10d39dc0 lib/request/basicauthhandler.py
|
||||
7e8e0a3fdebbe443832c1bab2f8d3869 lib/request/basic.py
|
||||
596988f14408cde1a2d3b5c9f231873a lib/request/basic.py
|
||||
c0cabedead14b8a23353b606672cff42 lib/request/comparison.py
|
||||
a42707d6e89312659d3bdc8fb4ad1336 lib/request/connect.py
|
||||
5b7f216827207c085df96bb56ed5e600 lib/request/connect.py
|
||||
dd4598675027fae99f2e2475b05986da lib/request/direct.py
|
||||
2044fce3f4ffa268fcfaaf63241b1e64 lib/request/dns.py
|
||||
eee965d781546d05f36cfd14af050913 lib/request/httpshandler.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/request/__init__.py
|
||||
cb05d965aa3d5871d14b5e45fe9128b4 lib/request/inject.py
|
||||
b188a11542a996276abbbc48913501c3 lib/request/inject.py
|
||||
aaf956c1e9855836c3f372e29d481393 lib/request/methodrequest.py
|
||||
51eeaa8abf5ba62aaaade66d46ff8b00 lib/request/pkihandler.py
|
||||
aa7cb67139bbc57d67a728fd2abf80ed lib/request/rangehandler.py
|
||||
@@ -82,11 +82,11 @@ aa809d825b33bea76a63ecd97cf7792c lib/request/redirecthandler.py
|
||||
8d31425f36a7a9c093eb9bef44589593 lib/takeover/abstraction.py
|
||||
acc1db3667bf910b809eb279b60595eb lib/takeover/icmpsh.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/takeover/__init__.py
|
||||
b1a6689e92e6ce998337bd41d8b09d6e lib/takeover/metasploit.py
|
||||
46ff5840b29531412bcaa05dac190413 lib/takeover/metasploit.py
|
||||
fb9e34d558293b5d6b9727f440712886 lib/takeover/registry.py
|
||||
48575dde7bb867b7937769f569a98309 lib/takeover/udf.py
|
||||
4584ac6ee5c13d4d395f0a7a21d8478c lib/takeover/web.py
|
||||
79d1ba3ab7b2552c5f09992ce08e765d lib/takeover/xp_cmdshell.py
|
||||
f1decf0a987bd3a4bc757212cbe6a6c8 lib/takeover/xp_cmdshell.py
|
||||
2543e14cc7f6e239b49dd40f41bc34fa lib/techniques/blind/inference.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/blind/__init__.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/dns/__init__.py
|
||||
@@ -96,7 +96,7 @@ fb9e34d558293b5d6b9727f440712886 lib/takeover/registry.py
|
||||
f999f2e88dea9ac8831eb2f468478b5f lib/techniques/error/use.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/__init__.py
|
||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py
|
||||
36c49359a110fe0f797b2eb9e2d694ed lib/techniques/union/test.py
|
||||
a36be917cf86a5ee407c83d74567f324 lib/techniques/union/test.py
|
||||
11ecf2effbe9f40b361843d546c3c521 lib/techniques/union/use.py
|
||||
c552f8d924d962a26f2ded250bcea3b8 lib/utils/api.py
|
||||
37dfb641358669f62c2acedff241348b lib/utils/brute.py
|
||||
@@ -111,7 +111,7 @@ cc1cfe36057f1d9bbdcba1bcc03359f9 lib/utils/hash.py
|
||||
010d8327239d33af4ce9f25683cfc012 lib/utils/pivotdumptable.py
|
||||
5cb78b0e60fd7fd84502d62cf85d2064 lib/utils/progress.py
|
||||
0ec5cec9d93d5ffd1eaeda6e942ecadf lib/utils/purge.py
|
||||
fb6cf3415fbbf117e2dc87aae2f35993 lib/utils/search.py
|
||||
2e3e7213f50b52fc4d5a014a2ff8d163 lib/utils/search.py
|
||||
236a8d9e596602b53f8e0aa09c30c0ef lib/utils/sqlalchemy.py
|
||||
dcc25183c6bd85b172c87cfcbc305ab6 lib/utils/timeout.py
|
||||
3d230e342a6c8d60ac7c68c556fbba9b lib/utils/versioncheck.py
|
||||
@@ -159,7 +159,7 @@ ffd26f64142226d0b1ed1d70f7f294c0 plugins/dbms/maxdb/filesystem.py
|
||||
4321d7018f5121343460ebfd83bb69be plugins/dbms/maxdb/__init__.py
|
||||
e7d44671ae26c0bcd5fe8448be070bbd plugins/dbms/maxdb/syntax.py
|
||||
bf7842bb291e2297c3c8d1023eb3e550 plugins/dbms/maxdb/takeover.py
|
||||
6439d15c1e8cdb069056c4fa725326df plugins/dbms/mssqlserver/connector.py
|
||||
9e64e67291a4c369bad8b8cf2cfa722a plugins/dbms/mssqlserver/connector.py
|
||||
f1f1541a54faf67440179fa521f99849 plugins/dbms/mssqlserver/enumeration.py
|
||||
177e1d55d28ed3190bc0079b8126c6be plugins/dbms/mssqlserver/filesystem.py
|
||||
51eb413ac62408965be20a812f2412c8 plugins/dbms/mssqlserver/fingerprint.py
|
||||
@@ -168,7 +168,7 @@ affef90b1442285da7e89e46603c502e plugins/dbms/mssqlserver/__init__.py
|
||||
08fe8ac7acdfc0e3168b5b069a7c73bf plugins/dbms/mssqlserver/takeover.py
|
||||
f6e1f3f09f32b9cb2ca11c016d373423 plugins/dbms/mysql/connector.py
|
||||
445164daf59b890aeacc968af58fcb53 plugins/dbms/mysql/enumeration.py
|
||||
f36e09edc3eafedd989fbe44ec048e71 plugins/dbms/mysql/filesystem.py
|
||||
4578fa29f04d0a75499f9668466ded07 plugins/dbms/mysql/filesystem.py
|
||||
fcbf7ff279c527b4aca0dac94c28d20c plugins/dbms/mysql/fingerprint.py
|
||||
30065993f8300994e4658634121609e9 plugins/dbms/mysql/__init__.py
|
||||
0e2adbee217f5b94dcc124d24b8dde99 plugins/dbms/mysql/syntax.py
|
||||
@@ -194,7 +194,7 @@ ed52c198f3346ceabdef676e9f5d3c0f plugins/dbms/sqlite/fingerprint.py
|
||||
f639120d42b33b6ca67930bddbf2ac1f plugins/dbms/sqlite/__init__.py
|
||||
964e59d2eba619b068b0a15cea28efe0 plugins/dbms/sqlite/syntax.py
|
||||
3364b2938d7040c507cd622c323557dc plugins/dbms/sqlite/takeover.py
|
||||
6439d15c1e8cdb069056c4fa725326df plugins/dbms/sybase/connector.py
|
||||
9e64e67291a4c369bad8b8cf2cfa722a plugins/dbms/sybase/connector.py
|
||||
426698152f63504061e5875e64957691 plugins/dbms/sybase/enumeration.py
|
||||
74de450dd6d6d006aa9c7eed56e6b09a plugins/dbms/sybase/filesystem.py
|
||||
c8ee0deaa2309e96d9a409ff1524f3ad plugins/dbms/sybase/fingerprint.py
|
||||
@@ -203,8 +203,8 @@ a3db8618eed5bb2807b6f77605cba9cc plugins/dbms/sybase/__init__.py
|
||||
79f6c7017db4ded8f74a0117188836ff plugins/dbms/sybase/takeover.py
|
||||
34d181a7086d6dfc7e72ae5f8a4cfe0f plugins/generic/connector.py
|
||||
e6cd1c5a5244d83396b401f7db43d323 plugins/generic/custom.py
|
||||
dc07665887191ac977e5377f5a66d288 plugins/generic/databases.py
|
||||
a9c8637f0526d751cd1a6a18f91967f5 plugins/generic/entries.py
|
||||
79c6dbcb7e6ad5e993a44aa52fdc36ed plugins/generic/databases.py
|
||||
4e2b366bb9cfdaaed719b219913357c6 plugins/generic/entries.py
|
||||
d82f2c78c1d4d7c6487e94fd3a68a908 plugins/generic/enumeration.py
|
||||
0c8abe66a78edca0660bfb8049d109e2 plugins/generic/filesystem.py
|
||||
f5d5419efddfe04648ea5e953c650793 plugins/generic/fingerprint.py
|
||||
@@ -224,7 +224,7 @@ ec2ba8c757ac96425dcd2b97970edd3a shell/stagers/stager.asp_
|
||||
0c48ddb1feb7e38a951ef05a0d48e032 shell/stagers/stager.jsp_
|
||||
2f9e459a4cf6a58680978cdce5ff7971 shell/stagers/stager.php_
|
||||
4eaeef94314956e4517e5310a28d579a sqlmapapi.py
|
||||
ecbd0edbb6ea4cb6e1277ceb294d7819 sqlmap.py
|
||||
5d1d27e7237584c4499ee9a3e698e384 sqlmap.py
|
||||
4c3b8a7daa4bff52e01d4168be0eedbe tamper/apostrophemask.py
|
||||
4115a55b8aba464723d645b7d3156b6e tamper/apostrophenullencode.py
|
||||
d7e9a979eff4d7315d804a181e66fc93 tamper/appendnullbyte.py
|
||||
@@ -450,14 +450,14 @@ a687449cd4e45f69e33b13d41e021480 waf/uspses.py
|
||||
68e332530fab216d017ede506c3fec2f waf/yundun.py
|
||||
bea35ba732ccc9548e6c4023cea6832b waf/yunsuo.py
|
||||
705ac8663513c12150cb5623ef4a04fb waf/zenedge.py
|
||||
e87d59af23b7b18cd56c9883e5f02d5c xml/banner/generic.xml
|
||||
dc394c5b90ada0a5d5853b5ad1f7d56d xml/banner/generic.xml
|
||||
d8925c034263bf1b83e7d8e1c78eec57 xml/banner/mssql.xml
|
||||
b8b56f4aa34bf65365808919b97119a7 xml/banner/mysql.xml
|
||||
7b21aeb3ad66d7686eacd23a6346292c xml/banner/mysql.xml
|
||||
9b262a617b06af56b1267987d694bf6f xml/banner/oracle.xml
|
||||
d90fe5a47b95dff3eb1797764c9db6c5 xml/banner/postgresql.xml
|
||||
b07b5c47c751787e136650ded060197f xml/banner/server.xml
|
||||
c26cd4fa986ddc9f6d92dd87c8fc61cb xml/banner/postgresql.xml
|
||||
4970709ca31bcaea5eb79547a132606a xml/banner/server.xml
|
||||
d48c971769c6131e35bd52d2315a8d58 xml/banner/servlet-engine.xml
|
||||
2d53fdaca0d7b42edad5192661248d76 xml/banner/set-cookie.xml
|
||||
58be20a3b29a9108d043786907700469 xml/banner/set-cookie.xml
|
||||
d989813ee377252bca2103cea524c06b xml/banner/sharepoint.xml
|
||||
350605448f049cd982554123a75f11e1 xml/banner/x-aspnet-version.xml
|
||||
817078783e1edaa492773d3b34d8eef0 xml/banner/x-powered-by.xml
|
||||
@@ -470,4 +470,4 @@ b5b8b0aebce810e6cdda1b7106c96427 xml/payloads/error_based.xml
|
||||
3194e2688a7576e1f877d5b137f7c260 xml/payloads/stacked_queries.xml
|
||||
c2d8dd03db5a663e79eabb4495dd0723 xml/payloads/time_blind.xml
|
||||
ac649aff0e7db413e4937e446e398736 xml/payloads/union_query.xml
|
||||
775ed5c7e1340f76f17f6186abbd8c92 xml/queries.xml
|
||||
186808373a45316a45ad5f6ca8d90ff3 xml/queries.xml
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
<info sp="4"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Service Pack 5">
|
||||
<info sp="5"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832%28v=vs.85%29.aspx -->
|
||||
|
||||
<regexp value="Windows.*10\.0">
|
||||
|
||||
@@ -35,6 +35,22 @@
|
||||
<info dbms_version="1" type="Linux" distrib="Debian" release="6.0" codename="squeeze"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="^([\d\.]+)[\-\_]Debian[\-\_][\d\.]+wheezy">
|
||||
<info dbms_version="1" type="Linux" distrib="Debian" release="7.0" codename="wheezy"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="^([\d\.]+)[\-\_]Debian[\-\_][\d\.]+jessie">
|
||||
<info dbms_version="1" type="Linux" distrib="Debian" release="8.0" codename="jessie"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="^([\d\.]+)[\-\_]Debian[\-\_][\d\.]+stretch">
|
||||
<info dbms_version="1" type="Linux" distrib="Debian" release="9.0" codename="stretch"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="^([\d\.]+)[\-\_]Debian[\-\_][\d\.]+buster">
|
||||
<info dbms_version="1" type="Linux" distrib="Debian" release="10.0" codename="buster"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="^([\d\.]+)[\-\_]Debian[\-\_][\d\.]+(sid|unstable)">
|
||||
<info dbms_version="1" type="Linux" distrib="Debian" codename="unstable"/>
|
||||
</regexp>
|
||||
|
||||
@@ -13,13 +13,4 @@
|
||||
<regexp value="mingw([\d]+)">
|
||||
<info type="Windows"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Ubuntu -->
|
||||
<regexp value="PostgreSQL\s+(8\.2\.7)\s+on.*?\(Ubuntu 4\.2\.3-2ubuntu4\)">
|
||||
<info dbms_version="1" type="Linux" distrib="Ubuntu" release="8.04" codename="Hardy Heron"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="PostgreSQL\s+(8\.3\.5)\s+on.*?\(Ubuntu 4\.3\.2-1ubuntu11\)">
|
||||
<info dbms_version="1" type="Linux" distrib="Ubuntu" release="8.10" codename="Intrepid Ibex"/>
|
||||
</regexp>
|
||||
</root>
|
||||
|
||||
@@ -89,6 +89,10 @@
|
||||
<info type="Linux" distrib="CentOS" release="6.8"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.6 \(CentOS\)">
|
||||
<info type="Linux" distrib="CentOS" release="7-1708"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Apache: Debian -->
|
||||
|
||||
<regexp value="Apache/1\.0\.5 \(Unix\) Debian/GNU">
|
||||
@@ -155,8 +159,8 @@
|
||||
<info type="Linux" distrib="Debian" release="8.0" codename="jessie"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.18 \(Debian\)">
|
||||
<info type="Linux" distrib="Debian" release="9.0" codename="jessie (testing)"/>
|
||||
<regexp value="Apache/2\.4\.25 \(Debian\)">
|
||||
<info type="Linux" distrib="Debian" release="9.0" codename="stretch"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Apache: Fedora -->
|
||||
@@ -273,6 +277,22 @@
|
||||
<info type="Linux" distrib="Fedora" release="23"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.18 \(Fedora\)">
|
||||
<info type="Linux" distrib="Fedora" release="24"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.23 \(Fedora\)">
|
||||
<info type="Linux" distrib="Fedora" release="25"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.25 \(Fedora\)">
|
||||
<info type="Linux" distrib="Fedora" release="26"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.28 \(Fedora\)">
|
||||
<info type="Linux" distrib="Fedora" release="27"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Apache: FreeBSD -->
|
||||
|
||||
<regexp value="Apache/2\.0\.16 \(FreeBSD\)">
|
||||
@@ -379,6 +399,14 @@
|
||||
<info type="FreeBSD" release="10.3"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.27 \(FreeBSD\)">
|
||||
<info type="FreeBSD" release="10.4"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.26 \(FreeBSD\)">
|
||||
<info type="FreeBSD" release="11.1"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Apache: Mandrake / Mandriva -->
|
||||
|
||||
<regexp value="Apache/1\.3\.6 \(Unix\)\s+\(Mandrake/Linux\)">
|
||||
@@ -678,6 +706,14 @@
|
||||
<info type="Linux" distrib="SuSE" release="13.2"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.16 \(Linux/SuSE\)">
|
||||
<info type="Linux" distrib="SuSE" release="42.1"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.23 \(Linux/SuSE\)">
|
||||
<info type="Linux" distrib="SuSE" release="42.2|42.3"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Apache: Ubuntu -->
|
||||
|
||||
<regexp value="Apache/2\.0\.50 \(Ubuntu\)">
|
||||
@@ -753,7 +789,15 @@
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.18 \(Ubuntu\)">
|
||||
<info type="Linux" distrib="Ubuntu" release="16.04" codename="xenial"/>
|
||||
<info type="Linux" distrib="Ubuntu" release="16.04|16.10" codename="xenial|yakkety"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.25 \(Ubuntu\)">
|
||||
<info type="Linux" distrib="Ubuntu" release="17.04" codename="zesty"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="Apache/2\.4\.27 \(Ubuntu\)">
|
||||
<info type="Linux" distrib="Ubuntu" release="17.10" codename="artful"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Nginx -->
|
||||
@@ -761,4 +805,10 @@
|
||||
<regexp value="nginx/([\w\.]+)">
|
||||
<info technology="Nginx"/>
|
||||
</regexp>
|
||||
|
||||
<!-- Google Web Server -->
|
||||
|
||||
<regexp value="GWS/([\w\.]+)">
|
||||
<info technology="Google Web Server"/>
|
||||
</regexp>
|
||||
</root>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<info technology="ASP" type="Windows"/>
|
||||
</regexp>
|
||||
|
||||
<regexp value="ASP\.NET_SessionId">
|
||||
<regexp value="ASP\.NET_SessionId|\.ASPXAUTH">
|
||||
<info technology="ASP.NET" type="Windows"/>
|
||||
</regexp>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<limitstring query=" LIMIT "/>
|
||||
<order query="ORDER BY %s ASC"/>
|
||||
<count query="COUNT(%s)"/>
|
||||
<comment query="-- " query2="/*" query3="#"/>
|
||||
<comment query="-- -" query2="/*" query3="#"/>
|
||||
<substring query="MID((%s),%d,%d)"/>
|
||||
<concatenate query="CONCAT(%s,%s)"/>
|
||||
<case query="SELECT (CASE WHEN (%s) THEN 1 ELSE 0 END)"/>
|
||||
|
||||
Reference in New Issue
Block a user