EnableSecurity / wafw00f

WAFW00F allows one to identify and fingerprint Web Application Firewall (WAF) products protecting a website.
https://www.enablesecurity.com/
BSD 3-Clause "New" or "Revised" License
5.17k stars 924 forks source link

cannot import name 'Color' from 'wafw00f.lib.asciiarts' #210

Open IAFJaeger opened 3 weeks ago

IAFJaeger commented 3 weeks ago

Error occurs while running main.py

发生异常: ImportError
cannot import name 'Color' from 'wafw00f.lib.asciiarts' (C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\wafw00f\lib\asciiarts.py)
  File "D:\***\toolkit\wafw00f\wafw00f\main.py", line 23, in <module>
    from wafw00f.lib.asciiarts import Color, randomArt
ImportError: cannot import name 'Color' from 'wafw00f.lib.asciiarts' (C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\wafw00f\lib\asciiarts.py)
pip install wafw00f
Requirement already satisfied: wafw00f in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (2.2.0)
Requirement already satisfied: requests in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from wafw00f) (2.28.1)
Requirement already satisfied: pluginbase in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from wafw00f) (1.0.1)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from requests->wafw00f) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from requests->wafw00f) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from requests->wafw00f) (1.26.9)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from requests->wafw00f) (2022.6.15)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in c:\users\***\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from requests[socks]->wafw00f) (1.7.1)
0xInfection commented 2 weeks ago

thanks for raising this issue, I can see you're using Python 3.11 and wafw00f has been rigorously tested against the version, can you try a clean install? I suspect this might be due to a leftover files from a previous installation.