mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-07 06:33:06 +03:00
Merge branch 'master' of github.com:sqlmapproject/sqlmap
This commit is contained in:
commit
c47b44e93f
|
@ -1360,7 +1360,7 @@ def normalizePath(filepath):
|
||||||
retVal = filepath
|
retVal = filepath
|
||||||
|
|
||||||
if retVal:
|
if retVal:
|
||||||
retVal = retVal.strip("\r").strip("\n")
|
retVal = retVal.strip("\r\n")
|
||||||
retVal = ntpath.normpath(retVal) if isWindowsDriveLetterPath(retVal) else posixpath.normpath(retVal)
|
retVal = ntpath.normpath(retVal) if isWindowsDriveLetterPath(retVal) else posixpath.normpath(retVal)
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
|
@ -916,7 +916,7 @@ def _setDNSCache():
|
||||||
|
|
||||||
def _setHTTPProxy():
|
def _setHTTPProxy():
|
||||||
"""
|
"""
|
||||||
Check and set the HTTP proxy to pass by all HTTP requests.
|
Check and set the HTTP/SOCKS proxy for all HTTP requests.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
global proxyHandler
|
global proxyHandler
|
||||||
|
@ -927,7 +927,7 @@ def _setHTTPProxy():
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
debugMsg = "setting the HTTP/SOCKS proxy to pass by all HTTP requests"
|
debugMsg = "setting the HTTP/SOCKS proxy for all HTTP requests"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
proxySplit = urlparse.urlsplit(conf.proxy)
|
proxySplit = urlparse.urlsplit(conf.proxy)
|
||||||
|
@ -1376,7 +1376,7 @@ def _cleanupOptions():
|
||||||
if not any([char in conf.testFilter for char in ('.', ')', '(', ']', '[')]):
|
if not any([char in conf.testFilter for char in ('.', ')', '(', ']', '[')]):
|
||||||
conf.testFilter = conf.testFilter.replace('*', '.*')
|
conf.testFilter = conf.testFilter.replace('*', '.*')
|
||||||
|
|
||||||
if conf.timeSec not in kb.explicitSettings:
|
if "timeSec" not in kb.explicitSettings:
|
||||||
if conf.tor:
|
if conf.tor:
|
||||||
conf.timeSec = 2 * conf.timeSec
|
conf.timeSec = 2 * conf.timeSec
|
||||||
kb.adjustTimeDelay = ADJUST_TIME_DELAY.DISABLE
|
kb.adjustTimeDelay = ADJUST_TIME_DELAY.DISABLE
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Filesystem:
|
||||||
if localFileSize == remoteFileSize:
|
if localFileSize == remoteFileSize:
|
||||||
sameFile = True
|
sameFile = True
|
||||||
infoMsg = "the local file %s and the remote file " % localFile
|
infoMsg = "the local file %s and the remote file " % localFile
|
||||||
infoMsg += "%s have the same size" % remoteFile
|
infoMsg += "%s has the same size" % remoteFile
|
||||||
elif remoteFileSize > localFileSize:
|
elif remoteFileSize > localFileSize:
|
||||||
infoMsg = "the remote file %s is larger than " % remoteFile
|
infoMsg = "the remote file %s is larger than " % remoteFile
|
||||||
infoMsg += "the local file %s" % localFile
|
infoMsg += "the local file %s" % localFile
|
||||||
|
|
|
@ -38,29 +38,10 @@ def tamper(payload, **kwargs):
|
||||||
retVal = payload
|
retVal = payload
|
||||||
|
|
||||||
if payload:
|
if payload:
|
||||||
retVal = ""
|
match = re.search(r"(?i)(\b(AND|OR)\b\s+)(?!.*\b(AND|OR)\b)([^>]+?)\s*>\s*([^>]+)\s*\Z", payload)
|
||||||
quote, doublequote, firstspace = False, False, False
|
|
||||||
|
|
||||||
for i in xrange(len(payload)):
|
if match:
|
||||||
if not firstspace:
|
_ = "%s %s NOT BETWEEN 0 AND %s" % (match.group(2), match.group(4), match.group(5))
|
||||||
if payload[i].isspace():
|
retVal = retVal.replace(match.group(0), _)
|
||||||
firstspace = True
|
|
||||||
retVal += " "
|
|
||||||
continue
|
|
||||||
|
|
||||||
elif payload[i] == '\'':
|
|
||||||
quote = not quote
|
|
||||||
|
|
||||||
elif payload[i] == '"':
|
|
||||||
doublequote = not doublequote
|
|
||||||
|
|
||||||
elif payload[i] == ">" and not doublequote and not quote:
|
|
||||||
retVal += " " if i > 0 and not payload[i - 1].isspace() else ""
|
|
||||||
retVal += "NOT BETWEEN %s AND" % ('0' if re.search(r"\A[^\w]*\d", payload[i + 1:]) else "NULL")
|
|
||||||
retVal += " " if i < len(payload) - 1 and not payload[i + 1:i + 2].isspace() else ""
|
|
||||||
|
|
||||||
continue
|
|
||||||
|
|
||||||
retVal += payload[i]
|
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user