@@ -176,20 +176,26 @@ def dumpTable(self, foundData=None):
176176
177177 count = inject .getValue (query , blind = False , time = False , expected = EXPECTED .INT , charsetType = CHARSET_TYPE .DIGITS )
178178 if isNumPosStrValue (count ):
179- indexRange = getLimitRange (count , plusOne = True )
180-
181- for index in indexRange :
182- row = []
183-
184- for column in colList :
185- query = rootQuery .blind .query3 % (column , column , table , index )
186- query = agent .whereQuery (query )
187- value = inject .getValue (query , blind = False , time = False , dump = True ) or ""
188- row .append (value )
189-
190- entries .append (row )
191-
192- if not entries :
179+ try :
180+ indexRange = getLimitRange (count , plusOne = True )
181+
182+ for index in indexRange :
183+ row = []
184+ for column in colList :
185+ query = rootQuery .blind .query3 % (column , column , table , index )
186+ query = agent .whereQuery (query )
187+ value = inject .getValue (query , blind = False , time = False , dump = True ) or ""
188+ row .append (value )
189+
190+ entries .append (row )
191+
192+ except KeyboardInterrupt :
193+ kb .dumpKeyboardInterrupt = True
194+ clearConsoleLine ()
195+ warnMsg = "Ctrl+C detected in dumping phase"
196+ logger .warn (warnMsg )
197+
198+ if not entries and not kb .dumpKeyboardInterrupt :
193199 try :
194200 retVal = pivotDumpTable (table , colList , blind = False )
195201 except KeyboardInterrupt :
@@ -211,7 +217,7 @@ def dumpTable(self, foundData=None):
211217
212218 query = agent .whereQuery (query )
213219
214- if not entries and query :
220+ if not entries and query and not kb . dumpKeyboardInterrupt :
215221 try :
216222 entries = inject .getValue (query , blind = False , time = False , dump = True )
217223 except KeyboardInterrupt :
@@ -306,24 +312,32 @@ def dumpTable(self, foundData=None):
306312 table = "%s.%s" % (conf .db , tbl )
307313
308314 if Backend .isDbms (DBMS .MSSQL ):
309- indexRange = getLimitRange (count , plusOne = True )
310- for index in indexRange :
311- for column in colList :
312- query = rootQuery .blind .query3 % (column , column , table , index )
313- query = agent .whereQuery (query )
315+ try :
316+ indexRange = getLimitRange (count , plusOne = True )
314317
315- value = inject .getValue (query , union = False , error = False , dump = True ) or ""
318+ for index in indexRange :
319+ for column in colList :
320+ query = rootQuery .blind .query3 % (column , column , table , index )
321+ query = agent .whereQuery (query )
316322
317- if column not in lengths :
318- lengths [column ] = 0
323+ value = inject .getValue (query , union = False , error = False , dump = True ) or ""
319324
320- if column not in entries :
321- entries [column ] = BigArray ()
325+ if column not in lengths :
326+ lengths [column ] = 0
322327
323- lengths [column ] = max (lengths [column ], len (DUMP_REPLACEMENTS .get (getUnicode (value ), getUnicode (value ))))
324- entries [column ].append (value )
328+ if column not in entries :
329+ entries [column ] = BigArray ()
330+
331+ lengths [column ] = max (lengths [column ], len (DUMP_REPLACEMENTS .get (getUnicode (value ), getUnicode (value ))))
332+ entries [column ].append (value )
333+
334+ except KeyboardInterrupt :
335+ kb .dumpKeyboardInterrupt = True
336+ clearConsoleLine ()
337+ warnMsg = "Ctrl+C detected in dumping phase"
338+ logger .warn (warnMsg )
325339
326- if not entries :
340+ if not entries and not kb . dumpKeyboardInterrupt :
327341 try :
328342 retVal = pivotDumpTable (table , colList , count , blind = True )
329343 except KeyboardInterrupt :
0 commit comments