mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +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>)
|
||||
elif kb.technique == PAYLOAD.TECHNIQUE.STACKED:
|
||||
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
|
||||
elif clause == [2, 3] or clause == [ 2 ] or clause == [ 3 ]:
|
||||
elif clause == [2, 3] or clause == [2] or clause == [3]:
|
||||
query = 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"
|
||||
logger.info(infoMsg)
|
||||
|
||||
handlers = [ proxyHandler ]
|
||||
handlers = [proxyHandler]
|
||||
|
||||
# Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
|
||||
if conf.keepAlive:
|
||||
|
@ -1003,8 +1003,8 @@ def _setPrefixSuffix():
|
|||
boundary = AttribDict()
|
||||
|
||||
boundary.level = 1
|
||||
boundary.clause = [ 0 ]
|
||||
boundary.where = [ 1, 2, 3 ]
|
||||
boundary.clause = [0]
|
||||
boundary.where = [1, 2, 3]
|
||||
boundary.prefix = conf.prefix
|
||||
boundary.suffix = conf.suffix
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ def _setPrefixSuffix():
|
|||
|
||||
# user who provides --prefix/--suffix does not want other boundaries
|
||||
# to be tested for
|
||||
conf.boundaries = [ boundary ]
|
||||
conf.boundaries = [boundary]
|
||||
|
||||
def _setAuthCred():
|
||||
"""
|
||||
|
@ -1523,7 +1523,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
|||
|
||||
# Active back-end DBMS fingerprint
|
||||
kb.dbms = None
|
||||
kb.dbmsVersion = [ UNKNOWN_DBMS_VERSION ]
|
||||
kb.dbmsVersion = [UNKNOWN_DBMS_VERSION]
|
||||
|
||||
kb.delayCandidates = TIME_DELAY_CANDIDATES * [0]
|
||||
kb.dep = None
|
||||
|
|
|
@ -40,7 +40,7 @@ class CompleterNG(rlcompleter.Completer):
|
|||
matches = []
|
||||
n = len(text)
|
||||
|
||||
for ns in [ self.namespace ]:
|
||||
for ns in (self.namespace,):
|
||||
for word in ns:
|
||||
if word[:n] == text:
|
||||
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:
|
||||
threadData = getCurrentThreadData()
|
||||
|
||||
threadData.shared.value = [ None ] * length
|
||||
threadData.shared.index = [ firstChar ] # As list for python nested function scoping
|
||||
threadData.shared.value = [None] * length
|
||||
threadData.shared.index = [firstChar] # As list for python nested function scoping
|
||||
threadData.shared.start = firstChar
|
||||
|
||||
try:
|
||||
|
|
|
@ -42,7 +42,7 @@ class Enumeration(GenericEnumeration):
|
|||
areAdmins = set()
|
||||
|
||||
if conf.user:
|
||||
users = [ conf.user ]
|
||||
users = [conf.user]
|
||||
elif not len(kb.data.cachedUsers):
|
||||
users = self.getUsers()
|
||||
else:
|
||||
|
@ -203,7 +203,7 @@ class Enumeration(GenericEnumeration):
|
|||
|
||||
if not isNoneValue(values):
|
||||
if isinstance(values, basestring):
|
||||
values = [ values ]
|
||||
values = [values]
|
||||
|
||||
for foundTbl in values:
|
||||
if foundTbl is None:
|
||||
|
@ -325,7 +325,7 @@ class Enumeration(GenericEnumeration):
|
|||
|
||||
if not isNoneValue(values):
|
||||
if isinstance(values, basestring):
|
||||
values = [ values ]
|
||||
values = [values]
|
||||
|
||||
for foundTbl in values:
|
||||
foundTbl = safeSQLIdentificatorNaming(foundTbl, True)
|
||||
|
@ -353,7 +353,7 @@ class Enumeration(GenericEnumeration):
|
|||
if db in foundCols[column]:
|
||||
foundCols[column][db].append(foundTbl)
|
||||
else:
|
||||
foundCols[column][db] = [ foundTbl ]
|
||||
foundCols[column][db] = [foundTbl]
|
||||
else:
|
||||
foundCols[column][db] = []
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ class PostgreSQLMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous,
|
|||
self.excludeDbsList = PGSQL_SYSTEM_DBS
|
||||
self.sysUdfs = {
|
||||
# UDF name: UDF parameters' input data-type and return data-type
|
||||
"sys_exec": { "input": [ "text" ], "return": "int4" },
|
||||
"sys_eval": { "input": [ "text" ], "return": "text" },
|
||||
"sys_bineval": { "input": [ "text" ], "return": "int4" },
|
||||
"sys_fileread": { "input": [ "text" ], "return": "text" }
|
||||
"sys_exec": { "input": ["text"], "return": "int4" },
|
||||
"sys_eval": { "input": ["text"], "return": "text" },
|
||||
"sys_bineval": { "input": ["text"], "return": "int4" },
|
||||
"sys_fileread": { "input": ["text"], "return": "text" }
|
||||
}
|
||||
|
||||
Syntax.__init__(self)
|
||||
|
|
|
@ -60,7 +60,7 @@ class Enumeration(GenericEnumeration):
|
|||
areAdmins = set()
|
||||
|
||||
if conf.user:
|
||||
users = [ conf.user ]
|
||||
users = [conf.user]
|
||||
elif not len(kb.data.cachedUsers):
|
||||
users = self.getUsers()
|
||||
else:
|
||||
|
|
|
@ -132,7 +132,7 @@ class Filesystem:
|
|||
elif encoding == "base64":
|
||||
content = "'%s'" % content
|
||||
|
||||
retVal = [ content ]
|
||||
retVal = [content]
|
||||
|
||||
return retVal
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user