Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0861a0

Browse files
committed
minor improvement
1 parent d28ca58 commit d0861a0

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ def __useWizardInterface():
12831283
conf.data = readInput(message, default=None)
12841284

12851285
message = "[3] Injection difficulty ('--level'/'--risk') [Please choose: 1-Normal(default), 2-Medium, 3-Hard]: "
1286-
choice = readInput(message, default=1)
1286+
choice = readInput(message, default='1')
12871287
if choice == '2':
12881288
conf.risk = 2
12891289
conf.level = 3
@@ -1295,7 +1295,7 @@ def __useWizardInterface():
12951295
conf.level = 1
12961296

12971297
message = "[4] Enumeration ('--banner'/'--current-user'/...) [Please choose: 1-Basic(default), 2-Smart, 3-All]: "
1298-
choice = readInput(message, default=1)
1298+
choice = readInput(message, default='1')
12991299
if choice == '2':
13001300
conf.getBanner = True
13011301
conf.getCurrentUser = True

lib/techniques/brute/use.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from lib.core.common import popValue
2121
from lib.core.common import pushValue
2222
from lib.core.common import randomInt
23+
from lib.core.common import readInput
2324
from lib.core.common import safeStringFormat
2425
from lib.core.data import conf
2526
from lib.core.data import kb
@@ -94,6 +95,12 @@ def tableExistsThread():
9495
infoMsg = "starting %d threads" % conf.threads
9596
logger.info(infoMsg)
9697
else:
98+
message = "please enter number of threads? [Enter for default (%d)] " % conf.threads
99+
choice = readInput(message, default=str(conf.threads))
100+
if choice and choice.isdigit():
101+
conf.threads = int(choice)
102+
103+
if conf.threads == 1:
97104
warnMsg = "running in a single-thread mode. this could take a while."
98105
logger.warn(warnMsg)
99106

0 commit comments

Comments
 (0)