我无法安装 w3af 并运行 w3af_console

我无法安装 w3af 并运行 w3af_console

运行 w3af_console 时出错:

 Traceback (most recent call last):
  File "./w3af_console", line 12, in <module>
    from w3af.core.controllers.dependency_check.dependency_check import dependency_check
  File "/home/queez/w3af/w3af/core/controllers/dependency_check/dependency_check.py", line 31, in <module>
    import pip
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
    from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
  File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
    vendored("cachecontrol")
  File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
    __import__(modulename, globals(), locals(), level=0)
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
  File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 59, in <module>
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 32, in vendored
  File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 47, in <module>
  File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

答案1

w3af-console 位于 Ubuntu 14.04 和 Ubuntu 16.04 的默认 Ubuntu 存储库中。您出现这些错误的原因是您从其他地方安装了 w3af-console 包,而不是从默认 Ubuntu 存储库安装 w3af-console 包。因此,请卸载现有的 w3af-console 包,然后使用以下命令正确重新安装它:

sudo apt-get install w3af-console  

相关内容