minor fix regarding report from nightman@email.de (...from time to time sqlmap lost the connection...)

This commit is contained in:
Miroslav Stampar 2011-04-15 14:15:29 +00:00
parent c461fdca54
commit 3b6f9945ae
2 changed files with 14 additions and 2 deletions

View File

@ -32,6 +32,7 @@ from lib.core.data import queries
from lib.core.enums import DBMS
from lib.core.enums import EXPECTED
from lib.core.enums import PAYLOAD
from lib.core.exception import sqlmapConnectionException
from lib.core.settings import FROM_TABLE
from lib.core.settings import MYSQL_ERROR_CHUNK_LENGTH
from lib.core.threads import getCurrentThreadData
@ -295,11 +296,16 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
outputs.append(output)
except KeyboardInterrupt:
print
warnMsg = "user aborted during enumeration. sqlmap "
warnMsg += "will display partial output"
logger.warn(warnMsg)
except sqlmapConnectionException, e:
errMsg = "connection exception detected. sqlmap "
errMsg += "will display partial output"
errMsg += "'%s'" % e
logger.critical(errMsg)
if not outputs:
outputs = __errorFields(expression, expressionFields, expressionFieldsList)

View File

@ -31,6 +31,7 @@ from lib.core.data import logger
from lib.core.data import queries
from lib.core.enums import DBMS
from lib.core.enums import PAYLOAD
from lib.core.exception import sqlmapConnectionException
from lib.core.exception import sqlmapSyntaxException
from lib.core.settings import FROM_TABLE
from lib.core.unescaper import unescaper
@ -263,11 +264,16 @@ def unionUse(expression, unpack=True, dump=False):
clearConsoleLine(True)
except KeyboardInterrupt:
print
warnMsg = "user aborted during enumeration. sqlmap "
warnMsg += "will display partial output"
logger.warn(warnMsg)
except sqlmapConnectionException, e:
errMsg = "connection exception detected. sqlmap "
errMsg += "will display partial output"
errMsg += "'%s'" % e
logger.critical(errMsg)
if not value:
value = __oneShotUnionUse(expression, unpack)