mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
some fixes
This commit is contained in:
parent
a19cb2c13a
commit
108a96c6b4
|
@ -262,6 +262,7 @@ class Connect:
|
|||
else:
|
||||
debugMsg = "got HTTP error code: %d (%s)" % (code, status)
|
||||
logger.debug(debugMsg)
|
||||
return page, responseHeaders
|
||||
|
||||
except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead), e:
|
||||
tbMsg = traceback.format_exc()
|
||||
|
|
|
@ -9,6 +9,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import getRange
|
||||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -79,7 +80,7 @@ class Enumeration(GenericEnumeration):
|
|||
query = rootQuery.blind.count % db
|
||||
count = inject.getValue(query, inband=False, charsetType=2)
|
||||
|
||||
if not count.isdigit() or not len(count) or count == "0":
|
||||
if not isNumPosStrValue(count):
|
||||
warnMsg = "unable to retrieve the number of "
|
||||
warnMsg += "tables for database '%s'" % db
|
||||
logger.warn(warnMsg)
|
||||
|
@ -163,7 +164,7 @@ class Enumeration(GenericEnumeration):
|
|||
query += " AND %s" % tblQuery
|
||||
count = inject.getValue(query, inband=False, expected=EXPECTED.INT, charsetType=2)
|
||||
|
||||
if not count.isdigit() or not len(count) or count == "0":
|
||||
if not isNumPosStrValue(count):
|
||||
warnMsg = "no table"
|
||||
if tblConsider == "1":
|
||||
warnMsg += "s like"
|
||||
|
@ -268,7 +269,7 @@ class Enumeration(GenericEnumeration):
|
|||
query += " AND %s" % colQuery.replace("[DB]", db)
|
||||
count = inject.getValue(query, inband=False, expected=EXPECTED.INT, charsetType=2)
|
||||
|
||||
if not count.isdigit() or not len(count) or count == "0":
|
||||
if not isNumPosStrValue(count):
|
||||
warnMsg = "no tables contain column"
|
||||
if colConsider == "1":
|
||||
warnMsg += "s like"
|
||||
|
|
|
@ -12,6 +12,7 @@ import ntpath
|
|||
import os
|
||||
|
||||
from lib.core.common import getRange
|
||||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.common import posixToNtSlashes
|
||||
from lib.core.common import randomStr
|
||||
from lib.core.data import conf
|
||||
|
@ -97,7 +98,7 @@ class Filesystem(GenericFilesystem):
|
|||
result = []
|
||||
count = inject.getValue("SELECT COUNT(%s) FROM %s" % (self.tblField, hexTbl), resumeValue=False, charsetType=2)
|
||||
|
||||
if not count.isdigit() or not len(count) or count == "0":
|
||||
if not isNumPosStrValue(count):
|
||||
errMsg = "unable to retrieve the content of the "
|
||||
errMsg += "file '%s'" % rFile
|
||||
raise sqlmapNoneDataException(errMsg)
|
||||
|
|
|
@ -9,6 +9,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import getRange
|
||||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -118,7 +119,7 @@ class Enumeration(GenericEnumeration):
|
|||
query = rootQuery.blind.count % queryUser
|
||||
count = inject.getValue(query, inband=False, expected=EXPECTED.INT, charsetType=2)
|
||||
|
||||
if not count.isdigit() or not len(count) or count == "0":
|
||||
if not isNumPosStrValue(count):
|
||||
if not count.isdigit() and not query2:
|
||||
infoMsg = "trying with table USER_SYS_PRIVS"
|
||||
logger.info(infoMsg)
|
||||
|
@ -240,7 +241,7 @@ class Enumeration(GenericEnumeration):
|
|||
query += " WHERE %s" % colQuery
|
||||
count = inject.getValue(query, inband=False, expected=EXPECTED.INT, charsetType=2)
|
||||
|
||||
if not count.isdigit() or not len(count) or count == "0":
|
||||
if not isNumPosStrValue(count):
|
||||
warnMsg = "no tables contain column"
|
||||
if colConsider == "1":
|
||||
warnMsg += "s like"
|
||||
|
|
Loading…
Reference in New Issue
Block a user