Skip to content

Commit c0b7fea

Browse files
authored
Merge pull request #85 from happyren/bugfix-postDataUndefined
fixed bug postData undefined related issue #83, #84
2 parents c324ff7 + 77a91f9 commit c0b7fea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

nosqlmap.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def build_post_data(postDataIn):
137137
return postData
138138

139139
def attack(args):
140-
platform = args.platform
140+
platform = args.platform
141141
victim = args.victim
142142
webPort = args.webPort
143143
dbPort = args.dbPort
@@ -149,7 +149,7 @@ def attack(args):
149149
httpMethod = args.httpMethod
150150
requestHeaders = build_request_headers(args.requestHeaders)
151151
postData = build_post_data(args.postData)
152-
152+
153153
if args.attack == 1:
154154
if platform == "MongoDB":
155155
nsmmongo.netAttacks(victim, dbPort, myIP, myPort, args)
@@ -337,7 +337,7 @@ def options():
337337
print "POST request set"
338338
optionSet[3] = True
339339
postDataIn = raw_input("Enter POST data in a comma separated list (i.e. param name 1,value1,param name 2,value2)\n")
340-
build_post_data(postDataIn)
340+
postData = build_post_data(postDataIn)
341341
httpMethod = "POST"
342342

343343
else:
@@ -419,14 +419,14 @@ def options():
419419
myPort = optList[5]
420420
verb = optList[6]
421421
https = optList[7]
422-
422+
423423
# saved headers position will depend of the request verb
424424
headersPos= 1
425425

426426
if httpMethod == "POST":
427427
postData = ast.literal_eval(csvOpt[1])
428428
headersPos = 2
429-
429+
430430
requestHeaders = ast.literal_eval(csvOpt[headersPos])
431431

432432
# Set option checking array based on what was loaded
@@ -512,7 +512,7 @@ def build_parser():
512512
parser.add_argument("--myIP",help="Set my local platform/Shell IP")
513513
parser.add_argument("--myPort",help="Set my local platform/Shell port", type=int)
514514
parser.add_argument("--webPort", help="Set web app port ([1 - 65535])", type=int)
515-
parser.add_argument("--uri", help="Set App Path. For example '/a-path/'. Final URI will be [https option]://[victim option]:[webPort option]/[uri option]")
515+
parser.add_argument("--uri", help="Set App Path. For example '/a-path/'. Final URI will be [https option]://[victim option]:[webPort option]/[uri option]")
516516
parser.add_argument("--httpMethod", help="Set HTTP Request Method", choices=["GET","POST"], default="GET")
517517
parser.add_argument("--https", help="Toggle HTTPS", choices=["ON", "OFF"], default="OFF")
518518
parser.add_argument("--verb", help="Toggle Verbose Mode", choices=["ON", "OFF"], default="OFF")
@@ -524,7 +524,7 @@ def build_parser():
524524
group = parser.add_argument_group(module.__name__)
525525
for arg in module.args():
526526
group.add_argument(arg[0], help=arg[1])
527-
527+
528528
return parser
529529

530530
def signal_handler(signal, frame):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy