Merge branch 'master' of github.com:sqlmapproject/sqlmap

This commit is contained in:
Bernardo Damele 2013-01-29 15:38:16 +00:00
commit c47b44e93f
5 changed files with 19 additions and 38 deletions

View File

@ -1360,7 +1360,7 @@ def normalizePath(filepath):
retVal = filepath
if retVal:
retVal = retVal.strip("\r").strip("\n")
retVal = retVal.strip("\r\n")
retVal = ntpath.normpath(retVal) if isWindowsDriveLetterPath(retVal) else posixpath.normpath(retVal)
return retVal

View File

@ -916,7 +916,7 @@ def _setDNSCache():
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
@ -927,7 +927,7 @@ def _setHTTPProxy():
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)
proxySplit = urlparse.urlsplit(conf.proxy)
@ -1376,7 +1376,7 @@ def _cleanupOptions():
if not any([char in conf.testFilter for char in ('.', ')', '(', ']', '[')]):
conf.testFilter = conf.testFilter.replace('*', '.*')
if conf.timeSec not in kb.explicitSettings:
if "timeSec" not in kb.explicitSettings:
if conf.tor:
conf.timeSec = 2 * conf.timeSec
kb.adjustTimeDelay = ADJUST_TIME_DELAY.DISABLE

View File

@ -65,7 +65,7 @@ class Filesystem:
if localFileSize == remoteFileSize:
sameFile = True
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:
infoMsg = "the remote file %s is larger than " % remoteFile
infoMsg += "the local file %s" % localFile

View File

@ -38,29 +38,10 @@ def tamper(payload, **kwargs):
retVal = payload
if payload:
retVal = ""
quote, doublequote, firstspace = False, False, False
match = re.search(r"(?i)(\b(AND|OR)\b\s+)(?!.*\b(AND|OR)\b)([^>]+?)\s*>\s*([^>]+)\s*\Z", payload)
for i in xrange(len(payload)):
if not firstspace:
if payload[i].isspace():
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]
if match:
_ = "%s %s NOT BETWEEN 0 AND %s" % (match.group(2), match.group(4), match.group(5))
retVal = retVal.replace(match.group(0), _)
return retVal