diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 3a3398af3..259d1b3ac 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -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 " diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 22e93a10f..2de852809 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -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 diff --git a/lib/core/option.py b/lib/core/option.py index b73dcaafd..103e5ec2e 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -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(): """ diff --git a/lib/core/session.py b/lib/core/session.py index 38d5963bd..e13b92d5e 100644 --- a/lib/core/session.py +++ b/lib/core/session.py @@ -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) diff --git a/plugins/dbms/access/fingerprint.py b/plugins/dbms/access/fingerprint.py index 2b3ac2114..9a995f489 100644 --- a/plugins/dbms/access/fingerprint.py +++ b/plugins/dbms/access/fingerprint.py @@ -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") diff --git a/plugins/dbms/firebird/fingerprint.py b/plugins/dbms/firebird/fingerprint.py index dbfc02fcd..b6e2b5c93 100644 --- a/plugins/dbms/firebird/fingerprint.py +++ b/plugins/dbms/firebird/fingerprint.py @@ -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)") diff --git a/plugins/dbms/maxdb/fingerprint.py b/plugins/dbms/maxdb/fingerprint.py index 1533dbd6b..90ae00f2d 100644 --- a/plugins/dbms/maxdb/fingerprint.py +++ b/plugins/dbms/maxdb/fingerprint.py @@ -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") diff --git a/plugins/dbms/oracle/fingerprint.py b/plugins/dbms/oracle/fingerprint.py index 892b2f070..5e754f40c 100644 --- a/plugins/dbms/oracle/fingerprint.py +++ b/plugins/dbms/oracle/fingerprint.py @@ -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 diff --git a/plugins/dbms/sqlite/fingerprint.py b/plugins/dbms/sqlite/fingerprint.py index f0564d49c..18085f198 100644 --- a/plugins/dbms/sqlite/fingerprint.py +++ b/plugins/dbms/sqlite/fingerprint.py @@ -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()") diff --git a/plugins/dbms/sybase/fingerprint.py b/plugins/dbms/sybase/fingerprint.py index 8f7f3f691..c2a37f382 100644 --- a/plugins/dbms/sybase/fingerprint.py +++ b/plugins/dbms/sybase/fingerprint.py @@ -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()")