Closed nmmapper closed 4 years ago
Hey @wangoloj,
Thanks for pulling this issue up. It would be nice if you can help us debug the problem by copy-pasting the command you used as well as the full stack trace error. :)
from wafw00f import main
host = "https://www.nmmapper.com"
detector = main.WAFW00F(host)
detector.identwaf()
NameError Traceback (most recent call last)
<ipython-input-11-9da7d8f04e88> in <module>
----> 1 D.identwaf()
~/Templates/virtualenv/www.dnsdumpster.net/lib/python3.7/site-packages/wafw00f/main.py in identwaf(self, findall)
232 for wafvendor in self.checklist:
233 self.log.info('Checking for %s' % wafvendor)
--> 234 if self.wafdetections[wafvendor](self):
235 detected.append(wafvendor)
236 if not findall:
~/Templates/virtualenv/www.dnsdumpster.net/lib/python3.7/site-packages/wafw00f/plugins/ciscoacexml.py in is_waf(self)
10 def is_waf(self):
11 schemes = [
---> 12 self.matchHeader(('Server', 'ACE XML Gateway'))
13 ]
14 if any(i for i in schemes):
~/Templates/virtualenv/www.dnsdumpster.net/lib/python3.7/site-packages/wafw00f/main.py in matchHeader(self, headermatch, attack)
162 if attack:
163 r = self.attackres
--> 164 else: r = rq
165 if r is None:
166 return
NameError: name 'rq' is not defined
I use your great tool as a library to https://github.com/wangoloj/dnsdumpster At first it worked very fine, but I think after making some pip updates that's when it broke
I even intergrated it online at https://www.nmmapper.com/tools/reconnaissance-tools/waf/web-application-firewall-detector/
WAFW00F is developed as a standalone tool only and is not intended to work as a library. So, holding this off as N/A.
The temporary solution: Modify file main.py, add line global rq before if statement such as:
global rq
if attack:
r = self.attackres
else: r = rq