mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Minor style update
This commit is contained in:
parent
7ea846e111
commit
ca1c0c2a1d
|
@ -166,9 +166,9 @@ class Agent(object):
|
||||||
# after the prefix or it is in GROUP BY / ORDER BY (<clause>)
|
# after the prefix or it is in GROUP BY / ORDER BY (<clause>)
|
||||||
elif kb.technique == PAYLOAD.TECHNIQUE.STACKED:
|
elif kb.technique == PAYLOAD.TECHNIQUE.STACKED:
|
||||||
query = kb.injection.prefix
|
query = kb.injection.prefix
|
||||||
elif kb.injection.clause == [2, 3] or kb.injection.clause == [ 2 ] or kb.injection.clause == [ 3 ]:
|
elif kb.injection.clause == [2, 3] or kb.injection.clause == [2] or kb.injection.clause == [3]:
|
||||||
query = kb.injection.prefix
|
query = kb.injection.prefix
|
||||||
elif clause == [2, 3] or clause == [ 2 ] or clause == [ 3 ]:
|
elif clause == [2, 3] or clause == [2] or clause == [3]:
|
||||||
query = prefix
|
query = prefix
|
||||||
|
|
||||||
# In any other case prepend with the full prefix
|
# In any other case prepend with the full prefix
|
||||||
|
|
|
@ -484,7 +484,7 @@ def _setGoogleDorking():
|
||||||
infoMsg = "first request to Google to get the session cookie"
|
infoMsg = "first request to Google to get the session cookie"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
handlers = [ proxyHandler ]
|
handlers = [proxyHandler]
|
||||||
|
|
||||||
# Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
|
# Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
|
||||||
if conf.keepAlive:
|
if conf.keepAlive:
|
||||||
|
@ -1003,8 +1003,8 @@ def _setPrefixSuffix():
|
||||||
boundary = AttribDict()
|
boundary = AttribDict()
|
||||||
|
|
||||||
boundary.level = 1
|
boundary.level = 1
|
||||||
boundary.clause = [ 0 ]
|
boundary.clause = [0]
|
||||||
boundary.where = [ 1, 2, 3 ]
|
boundary.where = [1, 2, 3]
|
||||||
boundary.prefix = conf.prefix
|
boundary.prefix = conf.prefix
|
||||||
boundary.suffix = conf.suffix
|
boundary.suffix = conf.suffix
|
||||||
|
|
||||||
|
@ -1022,7 +1022,7 @@ def _setPrefixSuffix():
|
||||||
|
|
||||||
# user who provides --prefix/--suffix does not want other boundaries
|
# user who provides --prefix/--suffix does not want other boundaries
|
||||||
# to be tested for
|
# to be tested for
|
||||||
conf.boundaries = [ boundary ]
|
conf.boundaries = [boundary]
|
||||||
|
|
||||||
def _setAuthCred():
|
def _setAuthCred():
|
||||||
"""
|
"""
|
||||||
|
@ -1523,7 +1523,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
|
|
||||||
# Active back-end DBMS fingerprint
|
# Active back-end DBMS fingerprint
|
||||||
kb.dbms = None
|
kb.dbms = None
|
||||||
kb.dbmsVersion = [ UNKNOWN_DBMS_VERSION ]
|
kb.dbmsVersion = [UNKNOWN_DBMS_VERSION]
|
||||||
|
|
||||||
kb.delayCandidates = TIME_DELAY_CANDIDATES * [0]
|
kb.delayCandidates = TIME_DELAY_CANDIDATES * [0]
|
||||||
kb.dep = None
|
kb.dep = None
|
||||||
|
|
|
@ -40,7 +40,7 @@ class CompleterNG(rlcompleter.Completer):
|
||||||
matches = []
|
matches = []
|
||||||
n = len(text)
|
n = len(text)
|
||||||
|
|
||||||
for ns in [ self.namespace ]:
|
for ns in (self.namespace,):
|
||||||
for word in ns:
|
for word in ns:
|
||||||
if word[:n] == text:
|
if word[:n] == text:
|
||||||
matches.append(word)
|
matches.append(word)
|
||||||
|
|
|
@ -347,8 +347,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||||
if conf.threads > 1 and isinstance(length, int) and length > 1:
|
if conf.threads > 1 and isinstance(length, int) and length > 1:
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
|
||||||
threadData.shared.value = [ None ] * length
|
threadData.shared.value = [None] * length
|
||||||
threadData.shared.index = [ firstChar ] # As list for python nested function scoping
|
threadData.shared.index = [firstChar] # As list for python nested function scoping
|
||||||
threadData.shared.start = firstChar
|
threadData.shared.start = firstChar
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Enumeration(GenericEnumeration):
|
||||||
areAdmins = set()
|
areAdmins = set()
|
||||||
|
|
||||||
if conf.user:
|
if conf.user:
|
||||||
users = [ conf.user ]
|
users = [conf.user]
|
||||||
elif not len(kb.data.cachedUsers):
|
elif not len(kb.data.cachedUsers):
|
||||||
users = self.getUsers()
|
users = self.getUsers()
|
||||||
else:
|
else:
|
||||||
|
@ -203,7 +203,7 @@ class Enumeration(GenericEnumeration):
|
||||||
|
|
||||||
if not isNoneValue(values):
|
if not isNoneValue(values):
|
||||||
if isinstance(values, basestring):
|
if isinstance(values, basestring):
|
||||||
values = [ values ]
|
values = [values]
|
||||||
|
|
||||||
for foundTbl in values:
|
for foundTbl in values:
|
||||||
if foundTbl is None:
|
if foundTbl is None:
|
||||||
|
@ -325,7 +325,7 @@ class Enumeration(GenericEnumeration):
|
||||||
|
|
||||||
if not isNoneValue(values):
|
if not isNoneValue(values):
|
||||||
if isinstance(values, basestring):
|
if isinstance(values, basestring):
|
||||||
values = [ values ]
|
values = [values]
|
||||||
|
|
||||||
for foundTbl in values:
|
for foundTbl in values:
|
||||||
foundTbl = safeSQLIdentificatorNaming(foundTbl, True)
|
foundTbl = safeSQLIdentificatorNaming(foundTbl, True)
|
||||||
|
@ -353,7 +353,7 @@ class Enumeration(GenericEnumeration):
|
||||||
if db in foundCols[column]:
|
if db in foundCols[column]:
|
||||||
foundCols[column][db].append(foundTbl)
|
foundCols[column][db].append(foundTbl)
|
||||||
else:
|
else:
|
||||||
foundCols[column][db] = [ foundTbl ]
|
foundCols[column][db] = [foundTbl]
|
||||||
else:
|
else:
|
||||||
foundCols[column][db] = []
|
foundCols[column][db] = []
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@ class PostgreSQLMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous,
|
||||||
self.excludeDbsList = PGSQL_SYSTEM_DBS
|
self.excludeDbsList = PGSQL_SYSTEM_DBS
|
||||||
self.sysUdfs = {
|
self.sysUdfs = {
|
||||||
# UDF name: UDF parameters' input data-type and return data-type
|
# UDF name: UDF parameters' input data-type and return data-type
|
||||||
"sys_exec": { "input": [ "text" ], "return": "int4" },
|
"sys_exec": { "input": ["text"], "return": "int4" },
|
||||||
"sys_eval": { "input": [ "text" ], "return": "text" },
|
"sys_eval": { "input": ["text"], "return": "text" },
|
||||||
"sys_bineval": { "input": [ "text" ], "return": "int4" },
|
"sys_bineval": { "input": ["text"], "return": "int4" },
|
||||||
"sys_fileread": { "input": [ "text" ], "return": "text" }
|
"sys_fileread": { "input": ["text"], "return": "text" }
|
||||||
}
|
}
|
||||||
|
|
||||||
Syntax.__init__(self)
|
Syntax.__init__(self)
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Enumeration(GenericEnumeration):
|
||||||
areAdmins = set()
|
areAdmins = set()
|
||||||
|
|
||||||
if conf.user:
|
if conf.user:
|
||||||
users = [ conf.user ]
|
users = [conf.user]
|
||||||
elif not len(kb.data.cachedUsers):
|
elif not len(kb.data.cachedUsers):
|
||||||
users = self.getUsers()
|
users = self.getUsers()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -132,7 +132,7 @@ class Filesystem:
|
||||||
elif encoding == "base64":
|
elif encoding == "base64":
|
||||||
content = "'%s'" % content
|
content = "'%s'" % content
|
||||||
|
|
||||||
retVal = [ content ]
|
retVal = [content]
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user