@@ -44,6 +44,14 @@ def mainMenu():
44
44
while select :
45
45
os .system ('clear' )
46
46
#label = subprocess.check_output(["git","describe","--always"])
47
+ print "===================================================="
48
+ print " _ _ _____ _____ _ ___ ___ "
49
+ print "| \ | | / ___|| _ | | | \/ | "
50
+ print "| \| | ___ \ `--. | | | | | | . . | __ _ _ __ "
51
+ print "| . ` |/ _ \ `--. \| | | | | | |\/| |/ _` | '_ \ "
52
+ print "| |\ | (_) /\__/ /\ \/' / |____| | | | (_| | |_) |"
53
+ print "\_| \_/\___/\____/ \_/\_\_____/\_| |_/\__,_| .__/"
54
+ print "===================================================="
47
55
print "NoSQLMap-v0.3"
48
56
49
57
print "\n "
@@ -168,7 +176,7 @@ def options():
168
176
paramNames = pdArray [0 ::2 ]
169
177
paramValues = pdArray [1 ::2 ]
170
178
postData = dict (zip (paramNames ,paramValues ))
171
- #raw_input("Debug: " + str(postData))
179
+ httpMethod = "POST"
172
180
options ()
173
181
else :
174
182
print "Invalid selection"
@@ -189,15 +197,21 @@ def options():
189
197
loadPath = raw_input ("Enter file name to load: " )
190
198
try :
191
199
fo = open (loadPath ,"r" )
192
- csvOpt = fo .read ()
200
+ csvOpt = fo .readlines ()
193
201
fo .close ()
194
- optList = csvOpt .split ("," )
202
+ optList = csvOpt [ 0 ] .split ("," )
195
203
victim = optList [0 ]
196
204
webPort = optList [1 ]
197
205
uri = optList [2 ]
198
206
httpMethod = optList [3 ]
199
207
myIP = optList [4 ]
200
208
myPort = optList [5 ]
209
+
210
+ if httpMethod == "POST" :
211
+ postData = csvOpt [1 ]
212
+
213
+
214
+
201
215
202
216
#Set option checking array based on what was loaded
203
217
x = 0
@@ -207,6 +221,7 @@ def options():
207
221
x += 1
208
222
except :
209
223
print "Couldn't load options file!"
224
+ #print str(sys.exc_info()) Debug
210
225
options ()
211
226
212
227
elif select == "8" :
@@ -252,7 +267,10 @@ def options():
252
267
savePath = raw_input ("Enter file name to save: " )
253
268
try :
254
269
fo = open (savePath , "wb" )
255
- fo .write (str (victim ) + "," + str (webPort ) + "," + str (uri ) + "," + str (httpMethod ) + "," + str (myIP ) + "," + str (myPort ))
270
+ fo .write (str (victim ) + "," + str (webPort ) + "," + str (uri ) + "," + str (httpMethod ) + "," + str (myIP ) + "," + str (myPort ))
271
+
272
+ if httpMethod == "POST" :
273
+ fo .write (",\n " + str (postData ))
256
274
fo .close ()
257
275
print "Options file saved!"
258
276
except :
0 commit comments