Skip to content

Commit

Permalink
Merge pull request swisskyrepo#34 from mashaz/develop
Browse files Browse the repository at this point in the history
BUGFIX - fix bug when handling `Content-Type`
  • Loading branch information
swisskyrepo authored Jan 27, 2021
2 parents af6f5ec + eb6f676 commit 3efa3e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def do_request(self, param, value, timeout=3, stream=False):
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,
Expand All @@ -102,7 +102,7 @@ def do_request(self, param, value, timeout=3, stream=False):
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
Expand Down

0 comments on commit 3efa3e4

Please sign in to comment.