Coder Social home page Coder Social logo

Comments (4)

0xInfection avatar 0xInfection commented on July 17, 2024

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.

nmmapper avatar nmmapper commented on July 17, 2024
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/

from wafw00f.

0xInfection avatar 0xInfection commented on July 17, 2024

WAFW00F is developed as a standalone tool only and is not intended to work as a library. So, holding this off as N/A.

from wafw00f.

H4niz avatar H4niz commented on July 17, 2024

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

from wafw00f.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.