@@ -118,7 +118,7 @@ def options():
118
118
print "1-Set target host/IP (Current: " + str (victim ) + ")"
119
119
print "2-Set web app port (Current: " + str (webPort ) + ")"
120
120
print "3-Set App Path (Current: " + str (uri ) + ")"
121
- print "4-Set HTTP Request Method (GET/POST)"
121
+ print "4-Set HTTP Request Method (GET/POST) (Current: " + httpMethod + ") "
122
122
print "5-Set my local Mongo/Shell IP (Current: " + str (myIP ) + ")"
123
123
print "6-Set shell listener port (Current: " + str (myPort ) + ")"
124
124
print "7-Load options file"
@@ -168,7 +168,7 @@ def options():
168
168
paramNames = pdArray [0 ::2 ]
169
169
paramValues = pdArray [1 ::2 ]
170
170
postData = dict (zip (paramNames ,paramValues ))
171
- raw_input ("Debug: " + str (postData ))
171
+ # raw_input("Debug: " + str(postData))
172
172
options ()
173
173
else :
174
174
print "Invalid selection"
@@ -226,15 +226,27 @@ def options():
226
226
httpMethod = "GET"
227
227
228
228
elif methodPath [0 ] == "POST" :
229
+ paramNames = []
230
+ paramValues = []
229
231
httpMethod = "POST"
230
232
postData = reqData [len (reqData )- 1 ]
233
+ #split the POST parameters up into individual items
234
+ paramsNvalues = postData .split ("&" )
235
+
236
+ for item in paramsNvalues :
237
+ tempList = item .split ("=" )
238
+ paramNames .append (tempList [0 ])
239
+ paramValues .append (tempList [1 ])
240
+
241
+ postData = dict (zip (paramNames ,paramValues ))
242
+
231
243
else :
232
244
print "unsupported method in request header."
233
245
234
246
victim = reqData [1 ].split ( " " )[1 ].replace ("\r \n " ,"" )
235
247
optionSet [0 ] = True
236
248
uri = methodPath [1 ].replace ("\r \n " ,"" )
237
- optList [2 ] = True
249
+ optionSet [2 ] = True
238
250
239
251
elif select == "9" :
240
252
savePath = raw_input ("Enter file name to save: " )
0 commit comments