@@ -81,7 +81,15 @@ def getApps(webPort,victim,uri,https,verb,requestHeaders):
81
81
82
82
if appUp == True :
83
83
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
+
85
93
injectString = randInjString (int (injectSize ))
86
94
print "Using " + injectString + " for injection testing.\n "
87
95
@@ -429,7 +437,15 @@ def postApps(victim,webPort,uri,https,verb,postData,requestHeaders):
429
437
raw_input ("Something went wrong. Press enter to return to the main menu..." )
430
438
return
431
439
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
+
433
449
injectString = randInjString (int (injectSize ))
434
450
print "Using " + injectString + " for injection testing.\n "
435
451
0 commit comments