@@ -802,22 +802,21 @@ def genCmpPayload():
802802 logger .warning (warnMsg )
803803
804804 if conf .multipleTargets :
805- msg = "how do you want to proceed? [ne(X)t target/(s)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity/(q)uit]"
806- choice = readInput ( msg , default = 'X' , checkBatch = False ). upper ()
805+ msg = "how do you want to proceed? [ne(X)t target/(s)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity (c[0-6]) /(q)uit]"
806+ default = 'X'
807807 else :
808- msg = "how do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity/(q)uit]"
809- choice = readInput (msg , default = 'S' , checkBatch = False ).upper ()
810-
808+ msg = "how do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity (c[0-6])/(q)uit]"
809+ default = 'S'
810+ choice = readInput (msg , default = default , checkBatch = False ).upper ()
811+
811812 if choice == 'X' :
812813 if conf .multipleTargets :
813814 raise SqlmapSkipTargetException
814- elif choice == 'C' :
815- choice = None
816- while not ((choice or "" ).isdigit () and 0 <= int (choice ) <= 6 ):
817- if choice :
818- logger .warning ("invalid value" )
819- msg = "enter new verbosity level: [0-6] "
820- choice = readInput (msg , default = str (conf .verbose ), checkBatch = False )
815+ elif choice .startswith ('C' ):
816+ if len (choice ) == 1 :
817+ choice = readInput ("enter new verbosity level: [0-6] " , default = str (conf .verbose ), checkBatch = False )
818+ elif len (choice ) == 2 and choice [1 ].isdigit () and 0 <= int (choice [1 ]) <= 6 :
819+ choice = choice [1 ]
821820 conf .verbose = int (choice )
822821 setVerbosity ()
823822 if hasattr (test .request , "columns" ) and hasattr (test .request , "_columns" ):
0 commit comments