minor update

This commit is contained in:
Miroslav Stampar
2010-11-11 22:26:36 +00:00
parent 8aefd0bbf7
commit 42272ca78c
7 changed files with 17 additions and 7 deletions

View File

@@ -35,7 +35,9 @@ def tableExists(tableFile):
length = len(tables)
for table in tables:
query = agent.prefixQuery("%s" % safeStringFormat("AND EXISTS(SELECT %d FROM %s)", (randomInt(1), table if not conf.db else "%s.%s" % (conf.db, table))))
if conf.db and '(*)' not in conf.db:
table = "%s.%s" % (conf.db, table)
query = agent.prefixQuery("%s" % safeStringFormat("AND EXISTS(SELECT %d FROM %s)", (randomInt(1), table)))
query = agent.postfixQuery(query)
result = Request.queryPage(agent.payload(newValue=query))
@@ -71,7 +73,11 @@ def columnExists(columnFile):
raise sqlmapMissingMandatoryOptionException, errMsg
columns = getFileItems(columnFile)
table = conf.tbl if not conf.db else ("%s.%s" % (conf.db, conf.tbl))
if conf.db and '(*)' not in conf.db:
table = "%s.%s" % (conf.db, conf.tbl)
else:
table = conf.tbl
retVal = []
infoMsg = "checking column existence using items from '%s'" % columnFile
logger.info(infoMsg)