refactoring regarding usage of conf.dbmsConnector.connect()

This commit is contained in:
Miroslav Stampar 2010-03-30 13:03:19 +00:00
parent 88d74a00c1
commit c2a6f21095
7 changed files with 3 additions and 18 deletions

View File

@ -65,6 +65,9 @@ def action():
raise sqlmapUnsupportedDBMSException, errMsg
if conf.direct:
conf.dbmsConnector.connect()
print "%s\n" % conf.dbmsHandler.getFingerprint()
# Techniques options

View File

@ -145,9 +145,6 @@ class Fingerprint(GenericFingerprint):
logMsg = "testing Microsoft Access"
logger.info(logMsg)
if conf.direct:
conf.dbmsConnector.connect()
payload = agent.fullPayload(" AND VAL(CVAR(1))=1")
result = Request.queryPage(payload)

View File

@ -127,9 +127,6 @@ class Fingerprint(GenericFingerprint):
logMsg = "testing Firebird"
logger.info(logMsg)
if conf.direct:
conf.dbmsConnector.connect()
randInt = randomInt()
payload = agent.fullPayload(" AND EXISTS(SELECT * FROM RDB$DATABASE WHERE %d=%d)" % (randInt, randInt))

View File

@ -157,9 +157,6 @@ class Fingerprint(GenericFingerprint):
infoMsg = "testing MySQL"
logger.info(infoMsg)
if conf.direct:
conf.dbmsConnector.connect()
if conf.dbms in MYSQL_ALIASES and kb.dbmsVersion and kb.dbmsVersion[0].isdigit():
setDbms("MySQL %s" % kb.dbmsVersion[0])

View File

@ -81,9 +81,6 @@ class Fingerprint(GenericFingerprint):
logMsg = "testing Oracle"
logger.info(logMsg)
if conf.direct:
conf.dbmsConnector.connect()
if conf.dbms in ORACLE_ALIASES:
setDbms("Oracle")

View File

@ -89,9 +89,6 @@ class Fingerprint(GenericFingerprint):
infoMsg = "testing PostgreSQL"
logger.info(infoMsg)
if conf.direct:
conf.dbmsConnector.connect()
if conf.dbms in PGSQL_ALIASES:
setDbms("PostgreSQL")

View File

@ -93,9 +93,6 @@ class Fingerprint(GenericFingerprint):
logMsg = "testing SQLite"
logger.info(logMsg)
if conf.direct:
conf.dbmsConnector.connect()
payload = agent.fullPayload(" AND LAST_INSERT_ROWID()=LAST_INSERT_ROWID()")
result = Request.queryPage(payload)