Skip to content

Commit

Permalink
Fix AttributeError: 'NoneType' object has no attribute 'status_code' E…
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardottt committed Mar 8, 2022
1 parent 3257c48 commit c5085da
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 c5085da

Please sign in to comment.