Skip to content

Commit

Permalink
Fix issue EnableSecurity#147 ([BUG] AttributeError: 'NoneType' object…
Browse files Browse the repository at this point in the history
… has no attribute 'headers') (EnableSecurity#148)

* Fix issue EnableSecurity#147

* remove unnecessary self check

* remove unncessary response nonetype check

Co-authored-by: Pinaki <[email protected]>
  • Loading branch information
edoardottt and 0xInfection authored Nov 17, 2021
1 parent 4eb17c3 commit 7cfc7d1
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 @@ -143,7 +143,7 @@ def genericdetect(self):
response = self.attackres
if 'server' in resp1.headers:
normalserver = resp1.headers.get('Server')
if 'server' in response.headers:
if response is not None and 'server' in response.headers:
attackresponse_server = response.headers.get('Server')
if attackresponse_server != normalserver:
self.log.info('Server header changed, WAF possibly detected')
Expand Down

0 comments on commit 7cfc7d1

Please sign in to comment.