Skip to content

Commit cf07cee

Browse files
committed
Added user inputs for POST data
1 parent 0b4aaf2 commit cf07cee

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nosqlmap.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def mainMenu():
4444
while select:
4545
os.system('clear')
4646
#label = subprocess.check_output(["git","describe","--always"])
47-
print "NoSQLMap-v0.2"
47+
print "NoSQLMap-v0.3"
4848
4949
print "\n"
5050
print "1-Set options"
@@ -163,6 +163,12 @@ def options():
163163
elif httpMethod == "2":
164164
print "POST request set"
165165
optionSet[3] = True
166+
postDataIn = raw_input("Enter POST data in a comma separated list (i.e. param name 1,value1,param name 2,value2)\n")
167+
pdArray = postDataIn.split(",")
168+
paramNames = pdArray[0::2]
169+
paramValues = pdArray[1::2]
170+
postData = dict(zip(paramNames,paramValues))
171+
raw_input("Debug: " + str(postData))
166172
options()
167173
else:
168174
print "Invalid selection"
@@ -931,6 +937,7 @@ def massMongo():
931937
print "=============================="
932938
print "1-Scan a subnet for default MongoDB access"
933939
print "2-Loads IPs to scan from a file"
940+
print "x-Return to main menu"
934941

935942
while optCheck:
936943
loadOpt = raw_input("Select a scan method: ")
@@ -962,6 +969,9 @@ def massMongo():
962969
optCheck = False
963970
except:
964971
print "Couldn't open file."
972+
973+
if loadOpt == "x":
974+
mainMenu()
965975

966976

967977
print "\n"

0 commit comments

Comments
 (0)