Search code examples
pythonsecuritywapiti

TypeError: 'NoneType' object is unsubscriptable with Wapiti


I am trying to scan my server for vulnerabilities and I'm using Wapiti to do it. Strangely, I get this error when I run it. What's wrong?

root@server [~/wapiti-2.3.0/bin]# python wapiti http://my.ip.address.here
Traceback (most recent call last):
  File "wapiti", line 41, in <module>
    lan.configure()
  File "/root/wapiti-2.3.0/wapitiCore/language/language.py", line 58, in configure
    lang = langCounty[:2]  # en
TypeError: 'NoneType' object is unsubscriptable
root@server [~/wapiti-2.3.0/bin]#

Solution

  • You are using the latest release.

    However, the current source has a fixed version:

    if lang is None:
        # if lang is not specified, default language is used
        def_locale = locale.getdefaultlocale()
        langCounty = def_locale[0]   # en_UK
        if not langCounty is None:
            lang = langCounty[:2]  # en
    

    It was a bug, fixed on 2013-10-21.