Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9cd9311

Browse files
authored
Merge pull request #62 from Nythiennzo/master
Fix bug on injectString size input.
2 parents 9bcf017 + b8852e2 commit 9cd9311

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

‎nsmweb.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,15 @@ def getApps(webPort,victim,uri,https,verb,requestHeaders):
8181

8282
if appUp == True:
8383

84-
injectSize = raw_input("Baseline test-Enter random string size: ")
84+
sizeSelect = True
85+
86+
while sizeSelect:
87+
injectSize = raw_input("Baseline test-Enter random string size: ")
88+
if injectSize.isdigit():
89+
sizeSelect = False
90+
else:
91+
print "Invalid! The size should be an integer."
92+
8593
injectString = randInjString(int(injectSize))
8694
print "Using " + injectString + " for injection testing.\n"
8795

@@ -429,7 +437,15 @@ def postApps(victim,webPort,uri,https,verb,postData,requestHeaders):
429437
raw_input("Something went wrong. Press enter to return to the main menu...")
430438
return
431439

432-
injectSize = raw_input("Baseline test-Enter random string size: ")
440+
sizeSelect = True
441+
442+
while sizeSelect:
443+
injectSize = raw_input("Baseline test-Enter random string size: ")
444+
if injectSize.isdigit():
445+
sizeSelect = False
446+
else:
447+
print "Invalid! The size should be an integer."
448+
433449
injectString = randInjString(int(injectSize))
434450
print "Using " + injectString + " for injection testing.\n"
435451

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /