File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -973,6 +973,7 @@ def __setKnowledgeBaseAttributes():
973973 logger .debug (debugMsg )
974974
975975 kb .absFilePaths = set ()
976+ kb .assumeBlank = False
976977 kb .bannerFp = advancedDict ()
977978
978979 kb .cache = advancedDict ()
Original file line number Diff line number Diff line change 3232from lib .core .common import getCharset
3333from lib .core .common import goGoodSamaritan
3434from lib .core .common import getPartRun
35+ from lib .core .common import readInput
3536from lib .core .common import replaceNewlineTabs
3637from lib .core .common import safeStringFormat
3738from lib .core .convert import urlencode
@@ -289,7 +290,21 @@ def downloadThread():
289290 val = getChar (curidx )
290291
291292 if val is None :
292- raise sqlmapValueException , "failed to get character at index %d (expected %d total)" % (curidx , length )
293+ if not kb .assumeBlank :
294+ iolock .acquire ()
295+ warnMsg = "failed to get character at index %d (expected %d total)." % (curidx , length )
296+ logger .warn (warnMsg )
297+ message = "assume blank character? [Y/n/a]"
298+ getOutput = readInput (message , default = "Y" )
299+ iolock .release ()
300+ if getOutput in ("a" , "A" ):
301+ kb .assumeBlank = True
302+ elif not getOutput or getOutput in ("y" , "Y" ):
303+ pass # do nothing
304+ else :
305+ raise sqlmapValueException
306+
307+ val = ' '
293308 else :
294309 break
295310
You can’t perform that action at this time.
0 commit comments