@@ -42,14 +42,14 @@ def mainMenu():
42
42
while select :
43
43
os .system ('clear' )
44
44
#label = subprocess.check_output(["git","describe","--always"])
45
- print "NoSQLMap-v0.15b "
45
+ print "NoSQLMap-v0.2 "
46
46
47
47
print "\n "
48
48
print "1-Set options"
49
49
print "2-NoSQL DB Access Attacks"
50
50
print "3-NoSQL Web App attacks"
51
51
print "4-Scan for Anonymous MongoDB Access"
52
- print "5 -Exit"
52
+ print "x -Exit"
53
53
54
54
select = raw_input ("Select an option: " )
55
55
@@ -78,7 +78,7 @@ def mainMenu():
78
78
elif select == "4" :
79
79
massMongo ()
80
80
81
- elif select == "5 " :
81
+ elif select == "x " :
82
82
sys .exit ()
83
83
84
84
else :
@@ -684,23 +684,30 @@ def randInjString(size):
684
684
print "2-Letters only"
685
685
print "3-Numbers only"
686
686
print "4-Email address"
687
- format = raw_input ("Select an option: " )
687
+ format = True
688
+
689
+ while format :
690
+ format = raw_input ("Select an option: " )
688
691
689
- if format == "1" :
690
- chars = string .ascii_letters + string .digits
691
- return '' .join (random .choice (chars ) for x in range (size ))
692
+ if format == "1" :
693
+ chars = string .ascii_letters + string .digits
694
+ return '' .join (random .choice (chars ) for x in range (size ))
692
695
693
- elif format == "2" :
694
- chars = string .ascii_letters
695
- return '' .join (random .choice (chars ) for x in range (size ))
696
+ elif format == "2" :
697
+ chars = string .ascii_letters
698
+ return '' .join (random .choice (chars ) for x in range (size ))
696
699
697
- elif format == "3" :
698
- chars = string .digits
699
- return '' .join (random .choice (chars ) for x in range (size ))
700
+ elif format == "3" :
701
+ chars = string .digits
702
+ return '' .join (random .choice (chars ) for x in range (size ))
700
703
701
- elif format == "4" :
702
- chars = string .ascii_letters + string .digits
703
- return '' .join (random .choice (chars ) for x in range (size )) + '@' + '' .join (random .choice (chars ) for x in range (size )) + '.com'
704
+ elif format == "4" :
705
+ chars = string .ascii_letters + string .digits
706
+ return '' .join (random .choice (chars ) for x in range (size )) + '@' + '' .join (random .choice (chars ) for x in range (size )) + '.com'
707
+
708
+ else :
709
+ format = True
710
+ print "Invalid selection."
704
711
705
712
706
713
def buildUri (origUri , randValue ):
0 commit comments