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 raise sqlmapUnsupportedDBMSException, errMsg
if conf.direct:
conf.dbmsConnector.connect()
print "%s\n" % conf.dbmsHandler.getFingerprint() print "%s\n" % conf.dbmsHandler.getFingerprint()
# Techniques options # Techniques options

View File

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

View File

@ -127,9 +127,6 @@ class Fingerprint(GenericFingerprint):
logMsg = "testing Firebird" logMsg = "testing Firebird"
logger.info(logMsg) logger.info(logMsg)
if conf.direct:
conf.dbmsConnector.connect()
randInt = randomInt() randInt = randomInt()
payload = agent.fullPayload(" AND EXISTS(SELECT * FROM RDB$DATABASE WHERE %d=%d)" % (randInt, randInt)) 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" infoMsg = "testing MySQL"
logger.info(infoMsg) logger.info(infoMsg)
if conf.direct:
conf.dbmsConnector.connect()
if conf.dbms in MYSQL_ALIASES and kb.dbmsVersion and kb.dbmsVersion[0].isdigit(): if conf.dbms in MYSQL_ALIASES and kb.dbmsVersion and kb.dbmsVersion[0].isdigit():
setDbms("MySQL %s" % kb.dbmsVersion[0]) setDbms("MySQL %s" % kb.dbmsVersion[0])

View File

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

View File

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

View File

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