Merge pull request #34 from mashaz/develop

BUGFIX - fix bug when handling `Content-Type`
pull/35/head
Swissky 2021-01-27 19:55:06 +01:00 committed by GitHub
commit 3efa3e4175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ class Requester(object):
data_injected[param] = value
# Handle JSON data
if self.headers['Content-Type'] and self.headers['Content-Type'] == "application/json":
if self.headers['Content-Type'] and "application/json" in self.headers['Content-Type']:
r = requests.post(
self.protocol + "://" + self.host + self.action,
headers=self.headers,
@ -102,7 +102,7 @@ class Requester(object):
verify=False
)
else:
if self.headers['Content-Type'] and self.headers['Content-Type'] == "application/xml":
if self.headers['Content-Type'] and "application/xml" in self.headers['Content-Type']:
if "*FUZZ*" in data_injected['__xml__']:
# replace the injection point with the payload