KvasirSecurity / Kvasir

Kvasir: Penetration Test Data Management
Other
426 stars 85 forks source link

Cannot import name lookup_hash from utils. #149

Closed stmyers closed 10 years ago

stmyers commented 10 years ago

Hi Kurt,

I'm getting this error on a fresh install, and it's occurring in a few different places (Statistics-->Passwords; clicking on host to get more info, etc...). Got the same error for stats.py, accounts.py, and metasploit.py. Any help would be greatly appreciated! Thanks!

Ticket ID redacted.2014-11-04.12-01-37.d958757d-5f16-4bdc-b6d9-f3a630e46145

<type 'exceptions.ImportError'> cannot import name lookup_hash

Version web2py™ Version 2.10.0-beta+timestamp.2014.10.16.15.58.50 Python Python 2.7.3: /usr/bin/python (prefix: /usr) Traceback

Traceback (most recent call last): File "/opt/web2py/gluon/restricted.py", line 224, in restricted exec ccode in environment File "/opt/web2py/applications/kvasir/controllers/stats.py", line 435, in File "/opt/web2py/gluon/globals.py", line 393, in self._caller = lambda f: f() File "/opt/web2py/gluon/tools.py", line 3437, in f return action(_a, *_b) File "/opt/web2py/applications/kvasir/controllers/stats.py", line 88, in passwords from skaldship.passwords.utils import password_class_stat File "/opt/web2py/gluon/custom_import.py", line 92, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File "/opt/web2py/gluon/custom_import.py", line 131, in call result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) File "applications/kvasir/modules/skaldship/passwords/utils.py", line 22, in from .medusa import process_medusa File "/opt/web2py/gluon/custom_import.py", line 105, in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) File "applications/kvasir/modules/skaldship/passwords/medusa.py", line 17, in from .utils import lookup_hash ImportError: cannot import name lookup_hash

grutz commented 10 years ago

Argh, the way web2py imports modules seems to be messing with the way to force loading from the current directory. I'll revert this back to the older "from skaldship.passwords.utils import lookup_hash" and see if that fixes things.