covering __pivotDumpTable for keyboard and connection exceptions too

This commit is contained in:
Miroslav Stampar 2011-04-15 14:21:13 +00:00
parent 3b6f9945ae
commit c16b74ce1a

View File

@ -1184,6 +1184,7 @@ class Enumeration:
pivotValue = " "
breakRetrieval = False
try:
for i in xrange(int(count)):
if breakRetrieval:
break
@ -1219,6 +1220,17 @@ class Enumeration:
lengths[column] = max(lengths[column], len(value) if value else 0)
entries[column].append(value)
except KeyboardInterrupt:
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)
return entries, lengths
def dumpTable(self):