mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Minor style update (for the sake of consistency over the code and our PEP8 adaptation)
This commit is contained in:
@@ -59,7 +59,7 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
kb.data.cachedUsersPrivileges[user] = None
|
||||
|
||||
return ( kb.data.cachedUsersPrivileges, areAdmins )
|
||||
return (kb.data.cachedUsersPrivileges, areAdmins)
|
||||
|
||||
def getTables(self):
|
||||
if len(kb.data.cachedTables) > 0:
|
||||
|
||||
@@ -72,7 +72,7 @@ class Filesystem(GenericFilesystem):
|
||||
|
||||
logger.debug("generating chunk file %s\%s from debug script %s" % (tmpPath, chunkName, randScr))
|
||||
|
||||
commands = ( "cd %s" % tmpPath, "debug < %s" % randScr, "del /F /Q %s" % randScr )
|
||||
commands = ("cd %s" % tmpPath, "debug < %s" % randScr, "del /F /Q %s" % randScr)
|
||||
complComm = " & ".join(command for command in commands)
|
||||
|
||||
self.execCmd(complComm)
|
||||
@@ -183,9 +183,9 @@ class Filesystem(GenericFilesystem):
|
||||
|
||||
logger.debug("converting the file utilizing PowerShell EncodedCommand")
|
||||
|
||||
commands = ( "cd %s" % tmpPath,
|
||||
commands = ("cd %s" % tmpPath,
|
||||
"powershell -EncodedCommand %s" % psString,
|
||||
"del /F /Q %s" % randFilePath )
|
||||
"del /F /Q %s" % randFilePath)
|
||||
complComm = " & ".join(command for command in commands)
|
||||
|
||||
self.execCmd(complComm)
|
||||
@@ -319,9 +319,9 @@ class Filesystem(GenericFilesystem):
|
||||
|
||||
self.xpCmdshellWriteFile(vbs, tmpPath, randVbs)
|
||||
|
||||
commands = ( "cd %s" % tmpPath, "cscript //nologo %s" % randVbs,
|
||||
commands = ("cd %s" % tmpPath, "cscript //nologo %s" % randVbs,
|
||||
"del /F /Q %s" % randVbs,
|
||||
"del /F /Q %s" % randFile )
|
||||
"del /F /Q %s" % randFile)
|
||||
complComm = " & ".join(command for command in commands)
|
||||
|
||||
self.execCmd(complComm)
|
||||
|
||||
@@ -92,9 +92,9 @@ class Fingerprint(GenericFingerprint):
|
||||
infoMsg = "confirming %s" % DBMS.MSSQL
|
||||
logger.info(infoMsg)
|
||||
|
||||
for version, check in ( ("2000", "HOST_NAME()=HOST_NAME()"), \
|
||||
for version, check in (("2000", "HOST_NAME()=HOST_NAME()"), \
|
||||
("2005", "XACT_STATE()=XACT_STATE()"), \
|
||||
("2008", "SYSDATETIME()=SYSDATETIME()") ):
|
||||
("2008", "SYSDATETIME()=SYSDATETIME()")):
|
||||
result = inject.checkBooleanExpression(check)
|
||||
|
||||
if result:
|
||||
|
||||
@@ -155,7 +155,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
# Windows executables should always have ' Visual C++' or ' mingw'
|
||||
# patterns within the banner
|
||||
osWindows = ( " Visual C++", "mingw" )
|
||||
osWindows = (" Visual C++", "mingw")
|
||||
|
||||
for osPattern in osWindows:
|
||||
query = "(SELECT LENGTH(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
|
||||
|
||||
@@ -77,7 +77,7 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
kb.data.cachedUsersPrivileges[user] = None
|
||||
|
||||
return ( kb.data.cachedUsersPrivileges, areAdmins )
|
||||
return (kb.data.cachedUsersPrivileges, areAdmins)
|
||||
|
||||
def getDbs(self):
|
||||
if len(kb.data.cachedDbs) > 0:
|
||||
|
||||
Reference in New Issue
Block a user