W3AF Error Fix: HTTPResponse object has no attribute path

Hello,

I was using w3af for one audit and I faced the following error:

Failed to initialize the 404 detection, original exception was: “‘HTTPResponse’ object has no attribute ‘path'”.

While searching for a fix, I noticed it’s a little bit common on Kali users.
I found the fix by this patch provided from the contributors here:

https://github.com/andresriancho/w3af/commit/ea9e7bdc990e5912c0ffd89e7495c66af3bdfaab

So, open /usr/share/w3af/core/controllers/core_helpers/fingerprint_404.py
Delete line 184:
self._404_responses.append(j)
Add the following two lines instead:
four_oh_data = FourOhFourResponseFactory(j)
self._404_responses.append(four_oh_data)