Minor variable rename

This commit is contained in:
Bernardo Damele 2011-04-30 15:29:59 +00:00
parent cb9b9c4204
commit 955dbc85e7
10 changed files with 63 additions and 63 deletions

View File

@ -699,8 +699,8 @@ def checkStability():
if kb.pageStable:
if firstPage:
logMsg = "url is stable"
logger.info(logMsg)
infoMsg = "url is stable"
logger.info(infoMsg)
else:
errMsg = "there was an error checking the stability of page "
errMsg += "because of lack of content. please check the "

View File

@ -275,8 +275,8 @@ def start():
elif test[0] in ("q", "Q"):
break
logMsg = "testing url %s" % targetUrl
logger.info(logMsg)
infoMsg = "testing url %s" % targetUrl
logger.info(infoMsg)
setupTargetEnv()
@ -388,8 +388,8 @@ def start():
logger.warn(warnMsg)
else:
logMsg = "%s parameter '%s' is dynamic" % (place, parameter)
logger.info(logMsg)
infoMsg = "%s parameter '%s' is dynamic" % (place, parameter)
logger.info(infoMsg)
kb.testedParams.add(paramKey)
@ -400,9 +400,9 @@ def start():
not simpletonCheckSqlInjection(place, parameter, value):
continue
logMsg = "testing sql injection on %s " % place
logMsg += "parameter '%s'" % parameter
logger.info(logMsg)
infoMsg = "testing sql injection on %s " % place
infoMsg += "parameter '%s'" % parameter
logger.info(infoMsg)
injection = checkSqlInjection(place, parameter, value)
proceed = not kb.endDetection

View File

@ -393,8 +393,8 @@ def __setGoogleDorking():
debugMsg = "initializing Google dorking requests"
logger.debug(debugMsg)
logMsg = "first request to Google to get the session cookie"
logger.info(logMsg)
infoMsg = "first request to Google to get the session cookie"
logger.info(infoMsg)
handlers = [ proxyHandler ]
@ -421,16 +421,16 @@ def __setGoogleDorking():
googleObj.getTargetUrls()
if kb.targetUrls:
logMsg = "sqlmap got %d results for your " % len(matches)
logMsg += "Google dork expression, "
infoMsg = "sqlmap got %d results for your " % len(matches)
infoMsg += "Google dork expression, "
if len(matches) == len(kb.targetUrls):
logMsg += "all "
infoMsg += "all "
else:
logMsg += "%d " % len(kb.targetUrls)
infoMsg += "%d " % len(kb.targetUrls)
logMsg += "of them are testable targets"
logger.info(logMsg)
infoMsg += "of them are testable targets"
logger.info(infoMsg)
else:
errMsg = "sqlmap got %d results " % len(matches)
errMsg += "for your Google dork expression, but none of them "
@ -1115,9 +1115,9 @@ def __setHTTPUserAgent():
userAgent = sanitizeStr(userAgent)
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, userAgent))
logMsg = "fetched random HTTP User-Agent header from "
logMsg += "file '%s': %s" % (paths.USER_AGENTS, userAgent)
logger.info(logMsg)
infoMsg = "fetched random HTTP User-Agent header from "
infoMsg += "file '%s': %s" % (paths.USER_AGENTS, userAgent)
logger.info(infoMsg)
def __setHTTPReferer():
"""

View File

@ -168,8 +168,8 @@ def resumeConfKb(expression, url, value):
if expression == "Injection data" and url == conf.url:
injection = base64unpickle(value[:-1])
logMsg = "resuming injection data from session file"
logger.info(logMsg)
infoMsg = "resuming injection data from session file"
logger.info(infoMsg)
if injection.place in conf.paramDict and \
injection.parameter in conf.paramDict[injection.place]:
@ -187,17 +187,17 @@ def resumeConfKb(expression, url, value):
elif expression == "Dynamic markings" and url == conf.url:
kb.dynamicMarkings = base64unpickle(value[:-1])
logMsg = "resuming dynamic markings from session file"
logger.info(logMsg)
infoMsg = "resuming dynamic markings from session file"
logger.info(infoMsg)
elif expression == "DBMS" and url == conf.url:
dbms = unSafeFormatString(value[:-1])
dbms = dbms.lower()
dbmsVersion = [UNKNOWN_DBMS_VERSION]
logMsg = "resuming back-end DBMS '%s' " % dbms
logMsg += "from session file"
logger.info(logMsg)
infoMsg = "resuming back-end DBMS '%s' " % dbms
infoMsg += "from session file"
logger.info(infoMsg)
firstRegExp = "(%s)" % ("|".join([alias for alias in SUPPORTED_DBMS]))
dbmsRegExp = re.search("%s ([\d\.]+)" % firstRegExp, dbms)
@ -225,9 +225,9 @@ def resumeConfKb(expression, url, value):
os = unSafeFormatString(value[:-1])
if os and os != 'None':
logMsg = "resuming back-end DBMS operating system '%s' " % os
logMsg += "from session file"
logger.info(logMsg)
infoMsg = "resuming back-end DBMS operating system '%s' " % os
infoMsg += "from session file"
logger.info(infoMsg)
if conf.os and conf.os.lower() != os.lower():
message = "you provided '%s' as back-end DBMS operating " % conf.os
@ -248,9 +248,9 @@ def resumeConfKb(expression, url, value):
elif expression == "Remote temp path" and url == conf.url and conf.tmpPath is None:
conf.tmpPath = unSafeFormatString(value[:-1])
logMsg = "resuming remote absolute path of temporary "
logMsg += "files directory '%s' from session file" % conf.tmpPath
logger.info(logMsg)
infoMsg = "resuming remote absolute path of temporary "
infoMsg += "files directory '%s' from session file" % conf.tmpPath
logger.info(infoMsg)
elif expression == "TABLE_EXISTS" and url == conf.url:
table = unSafeFormatString(value[:-1])
@ -261,9 +261,9 @@ def resumeConfKb(expression, url, value):
else:
db = "%s%s" % (Backend.getIdentifiedDbms(), METADB_SUFFIX)
logMsg = "resuming brute forced table name "
logMsg += "'%s' from session file" % table
logger.info(logMsg)
infoMsg = "resuming brute forced table name "
infoMsg += "'%s' from session file" % table
logger.info(infoMsg)
kb.brute.tables.append((db, table))
@ -277,13 +277,13 @@ def resumeConfKb(expression, url, value):
else:
db = "%s%s" % (Backend.getIdentifiedDbms(), METADB_SUFFIX)
logMsg = "resuming brute forced column name "
logMsg += "'%s' for table '%s' from session file" % (colName, table)
logger.info(logMsg)
infoMsg = "resuming brute forced column name "
infoMsg += "'%s' for table '%s' from session file" % (colName, table)
logger.info(infoMsg)
kb.brute.columns.append((db, table, colName, colType))
elif expression == "xp_cmdshell availability" and url == conf.url:
kb.xpCmdshellAvailable = True if unSafeFormatString(value[:-1]).lower() == "true" else False
logMsg = "resuming xp_cmdshell availability"
logger.info(logMsg)
infoMsg = "resuming xp_cmdshell availability"
logger.info(infoMsg)

View File

@ -160,14 +160,14 @@ class Fingerprint(GenericFingerprint):
return True
logMsg = "testing %s" % DBMS.ACCESS
logger.info(logMsg)
infoMsg = "testing %s" % DBMS.ACCESS
logger.info(infoMsg)
result = inject.checkBooleanExpression("VAL(CVAR(1))=1")
if result:
logMsg = "confirming %s" % DBMS.ACCESS
logger.info(logMsg)
infoMsg = "confirming %s" % DBMS.ACCESS
logger.info(infoMsg)
result = inject.checkBooleanExpression("IIF(ATN(2)>0,1,0) BETWEEN 2 AND 0")

View File

@ -123,15 +123,15 @@ class Fingerprint(GenericFingerprint):
return True
logMsg = "testing %s" % DBMS.FIREBIRD
logger.info(logMsg)
infoMsg = "testing %s" % DBMS.FIREBIRD
logger.info(infoMsg)
randInt = randomInt()
result = inject.checkBooleanExpression("EXISTS(SELECT * FROM RDB$DATABASE WHERE %d=%d)" % (randInt, randInt))
if result:
logMsg = "confirming %s" % DBMS.FIREBIRD
logger.info(logMsg)
infoMsg = "confirming %s" % DBMS.FIREBIRD
logger.info(infoMsg)
result = inject.checkBooleanExpression("EXISTS(SELECT CURRENT_USER FROM RDB$DATABASE)")

View File

@ -106,14 +106,14 @@ class Fingerprint(GenericFingerprint):
return True
logMsg = "testing %s" % DBMS.MAXDB
logger.info(logMsg)
infoMsg = "testing %s" % DBMS.MAXDB
logger.info(infoMsg)
result = inject.checkBooleanExpression("ALPHA(NULL) IS NULL")
if result:
logMsg = "confirming %s" % DBMS.MAXDB
logger.info(logMsg)
infoMsg = "confirming %s" % DBMS.MAXDB
logger.info(infoMsg)
result = inject.checkBooleanExpression("MAPCHAR(NULL,1,DEFAULTMAP) IS NULL")

View File

@ -70,8 +70,8 @@ class Fingerprint(GenericFingerprint):
return True
logMsg = "testing %s" % DBMS.ORACLE
logger.info(logMsg)
infoMsg = "testing %s" % DBMS.ORACLE
logger.info(infoMsg)
# NOTE: SELECT ROWNUM=ROWNUM FROM DUAL does not work connecting
# directly to the Oracle database
@ -81,8 +81,8 @@ class Fingerprint(GenericFingerprint):
result = inject.checkBooleanExpression("ROWNUM=ROWNUM")
if result:
logMsg = "confirming %s" % DBMS.ORACLE
logger.info(logMsg)
infoMsg = "confirming %s" % DBMS.ORACLE
logger.info(infoMsg)
# NOTE: SELECT LENGTH(SYSDATE)=LENGTH(SYSDATE) FROM DUAL does
# not work connecting directly to the Oracle database

View File

@ -76,14 +76,14 @@ class Fingerprint(GenericFingerprint):
return True
logMsg = "testing %s" % DBMS.SQLITE
logger.info(logMsg)
infoMsg = "testing %s" % DBMS.SQLITE
logger.info(infoMsg)
result = inject.checkBooleanExpression("LAST_INSERT_ROWID()=LAST_INSERT_ROWID()")
if result:
logMsg = "confirming %s" % DBMS.SQLITE
logger.info(logMsg)
infoMsg = "confirming %s" % DBMS.SQLITE
logger.info(infoMsg)
result = inject.checkBooleanExpression("SQLITE_VERSION()=SQLITE_VERSION()")

View File

@ -83,8 +83,8 @@ class Fingerprint(GenericFingerprint):
result = inject.checkBooleanExpression("tempdb_id()=tempdb_id()")
if result:
logMsg = "confirming %s" % DBMS.SYBASE
logger.info(logMsg)
infoMsg = "confirming %s" % DBMS.SYBASE
logger.info(infoMsg)
result = inject.checkBooleanExpression("suser_id()=suser_id()")