Skip to content

Commit

Permalink
Merge pull request EnableSecurity#154 from edoardottt/master
Browse files Browse the repository at this point in the history
Fix AttributeError: 'NoneType' object has no attribute 'status_code' (issue EnableSecurity#153)
  • Loading branch information
sandrogauci authored Mar 9, 2022
2 parents 3257c48 + c5085da commit a7c28aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wafw00f/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def genericdetect(self):
if 'User-Agent' in self.headers:
self.headers.pop('User-Agent') # Deleting the user-agent key from object not dict.
resp3 = self.customRequest(headers=self.headers)
if resp3 is not None:
if resp3 is not None and resp1 is not None:
if resp1.status_code != resp3.status_code:
self.log.info('Server returned a different response when request didn\'t contain the User-Agent header.')
reason = reasons[4]
Expand Down

0 comments on commit a7c28aa

Please sign in to comment.