Skip to content

Commit 545967d

Browse files
committed
Added support for c0-c1 as interrupt choices for quick verbosity change
1 parent 2ffaaca commit 545967d

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

data/txt/sha256sums.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ df768bcb9838dc6c46dab9b4a877056cb4742bd6cfaaf438c4a3712c5cc0d264 extra/shutils/
159159
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 extra/vulnserver/__init__.py
160160
eed1db5da17eca4c65a8f999166e2246eef84397687ae820bbe4984ef65a09df extra/vulnserver/vulnserver.py
161161
96a39b4e3a9178e4e8285d5acd00115460cc1098ef430ab7573fc8194368da5c lib/controller/action.py
162-
fad6640f60eac8ad1b65895cbccc39154864843a2a0b0f2ac596d3227edcd4f6 lib/controller/checks.py
162+
3790bb734907f74e127d5409d93197088a7a8caa04f69f19eb2f69e959ae22f0 lib/controller/checks.py
163163
34e9cf166e21ce991b61ca7695c43c892e8425f7e1228daec8cadd38f786acc6 lib/controller/controller.py
164164
49bcd74281297c79a6ae5d4b0d1479ddace4476fddaf4383ca682a6977b553e3 lib/controller/handler.py
165165
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 lib/controller/__init__.py

lib/controller/checks.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)