cowrie-logviewer
cowrie-logviewer copied to clipboard
Country error
[2018-04-13 15:42:56,128] ERROR in app: Exception on /stats/countries [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./cowrie-logviewer.py", line 147, in show_stats_countries
tmp = [ pycountry.countries.get(alpha_2=country[0]).name, country[0], country[1] ]
File "/usr/local/lib/python2.7/dist-packages/pycountry/db.py", line 43, in load_if_needed
return f(self, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/pycountry/db.py", line 101, in get
return self.indices[field][value]
KeyError: None
I fixed that in my fork too: https://github.com/SteveClement/cowrie-logviewer