diff --git a/lib/core/option.py b/lib/core/option.py index f998089e5..53187180d 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1283,7 +1283,7 @@ def __useWizardInterface(): conf.data = readInput(message, default=None) message = "[3] Injection difficulty ('--level'/'--risk') [Please choose: 1-Normal(default), 2-Medium, 3-Hard]: " - choice = readInput(message, default=1) + choice = readInput(message, default='1') if choice == '2': conf.risk = 2 conf.level = 3 @@ -1295,7 +1295,7 @@ def __useWizardInterface(): conf.level = 1 message = "[4] Enumeration ('--banner'/'--current-user'/...) [Please choose: 1-Basic(default), 2-Smart, 3-All]: " - choice = readInput(message, default=1) + choice = readInput(message, default='1') if choice == '2': conf.getBanner = True conf.getCurrentUser = True diff --git a/lib/techniques/brute/use.py b/lib/techniques/brute/use.py index 8574e6270..825cf37cd 100644 --- a/lib/techniques/brute/use.py +++ b/lib/techniques/brute/use.py @@ -20,6 +20,7 @@ from lib.core.common import getPageTextWordsSet from lib.core.common import popValue from lib.core.common import pushValue from lib.core.common import randomInt +from lib.core.common import readInput from lib.core.common import safeStringFormat from lib.core.data import conf from lib.core.data import kb @@ -94,6 +95,12 @@ def tableExists(tableFile, regex=None): infoMsg = "starting %d threads" % conf.threads logger.info(infoMsg) else: + message = "please enter number of threads? [Enter for default (%d)] " % conf.threads + choice = readInput(message, default=str(conf.threads)) + if choice and choice.isdigit(): + conf.threads = int(choice) + + if conf.threads == 1: warnMsg = "running in a single-thread mode. this could take a while." logger.warn(warnMsg)