LDO-CERT / orochi

The Volatility Collaborative GUI
MIT License
227 stars 19 forks source link

ImportError: cannot import name 'RESULT_STATUS_RUNNING' from 'orochi.website.models' #1100

Closed esebese closed 3 months ago

esebese commented 3 months ago

In the 2.2.2 version, I tried to import a dump with management command like below:

sudo docker-compose run --rm django_wsgi python manage.py import_local --filepath /media/uploads/Windows11.vmem --name Windows11test --os windows --author tester

However, it is resulted with the error below:

Traceback (most recent call last): File "/app/manage.py", line 31, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.12/site-packages/django/core/management/init.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/core/management/init.py", line 275, in fetch_command klass = load_command_class(app_name, subcommand) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/core/management/init.py", line 48, in load_command_class module = import_module("%s.management.commands.%s" % (app_name, name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/app/orochi/website/management/commands/import_local.py", line 9, in from orochi.website.models import ( ImportError: cannot import name 'RESULT_STATUS_RUNNING' from 'orochi.website.models' (/app/orochi/website/models.py)

dadokkio commented 3 months ago

There were an issue importing variable because from 2.2.0 to 2.3.0 defaults has been moved to a dedicated file. But the issue should be in 2.3.0 "new" dev branch (now fixed) while master (2.2.0) should works without issues with old code.

Probably we created a not valid 2.2.0 image (we did a lot of test with multiarch lately and something probably went wrong :( ), we'll try to generate a new one asap.

esebese commented 3 months ago

I have deployed the 2.2.3 version but this time orochi_django_wsgi has some issues to start.

/usr/local/lib/python3.12/site-packages/regipy/plugins/ntuser/shellbags_ntuser.py:136: SyntaxWarning: invalid escape sequence '\d' if re.match("\d+", v.name): /usr/local/lib/python3.12/site-packages/regipy/plugins/usrclass/shellbags_usrclass.py:136: SyntaxWarning: invalid escape sequence '\d' if re.match("\d+", v.name): Traceback (most recent call last): File "/app/manage.py", line 31, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.12/site-packages/django/core/management/init.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 454, in execute self.check() File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 486, in check all_issues = checks.run_checks( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/core/checks/registry.py", line 88, in run_checks new_errors = check(app_configs=app_configs, databases=databases) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/core/checks/urls.py", line 14, in check_url_config return check_resolver(resolver) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/core/checks/urls.py", line 24, in check_resolver return check_method() ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/urls/resolvers.py", line 519, in check for pattern in self.url_patterns: ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/utils/functional.py", line 47, in get res = instance.dict[self.name] = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/urls/resolvers.py", line 738, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/utils/functional.py", line 47, in get res = instance.dict[self.name] = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/urls/resolvers.py", line 731, in urlconf_module return import_module(self.urlconf_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/app/config/urls.py", line 17, in path("ya/", include("orochi.ya.urls", namespace="ya")), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/django/urls/conf.py", line 39, in include urlconf_module = import_module(urlconf_module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/app/orochi/ya/urls.py", line 2, in from orochi.ya import views File "/app/orochi/ya/views.py", line 5, in import yara ModuleNotFoundError: No module named 'yara'

garanews commented 3 months ago

@esebese it was my fault! during an update I wanted to bring the docker go image to compile yara inside the major release but forgot something... now reverted back! sorry!

esebese commented 3 months ago

It works without an issue now. Thanks!