New modules not displayed in Web UI
jxdv opened this issue · comments
Describe the bug
Hi, Newly added modules aren't displayed in the Web UI. I've tested this:
- Building from source and checking that modules.json have all the new methods and there are no problem loading them, but my JS knowledge is pretty limited so the issue might be there - To me it looks like tags are not created for the new hardening methods
- Building as suggested in README with pip
Expected behavior
All hardening methods should appear
- OS: Linux
- Browser: Firefox
I am currently in the process of adding the 'require_restart' feature and also cleaning the codebase before that (getting rid of unused imports etc..), but it'd be good to resolve this issue first
First, I need to figure out a way to run this project again to test the functionality. Since the supported Python version is pretty old, I'm getting a bunch of wormhole errors while trying to run this. Can you share your Python version and whether if you are using a Python environment or not?
More specifically, I'm hitting this:
Traceback (most recent call last):
File "/home/orhun/gh/grapheneX/venv/bin/grapheneX", line 5, in <module>
from graphenex.__main__ import main
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/graphenex/__main__.py", line 6, in <module>
from graphenex.core.cli.shell import start_cli
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/graphenex/core/cli/shell.py", line 4, in <module>
from graphenex.core.cli.commands import ShellCommands
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/graphenex/core/cli/commands.py", line 10, in <module>
from PyInquirer import prompt, Validator, ValidationError
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/PyInquirer/__init__.py", line 6, in <module>
from prompt_toolkit.token import Token
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
from .interface import CommandLineInterface
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/interface.py", line 19, in <module>
from .application import Application, AbortAction
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/application.py", line 8, in <module>
from .key_binding.bindings.basic import load_basic_bindings
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
from prompt_toolkit.renderer import HeightIsUnknownError
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
from prompt_toolkit.styles import Style
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
from .from_dict import *
File "/home/orhun/gh/grapheneX/venv/lib/python3.11/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
I have python 3.10.12, you can fix all those import errors following steps in this issue: #121
and yes, I am running python env
Damn, never thought I would get help to build my own project. Thanks a lot!
We should probably update to codebase to acconmodate the new 🐍
You're welcome! I am very interested in security and wanted build somewhat of a similar hardening project myself, but discovering this I told myself that It would be better to improve this one
This actually might not be a bug, but just older version of gX. If you try to build the project from source with all the new modules you'll get:
from graphenex.core.utils.helpers import parse_cli_args, print_header ModuleNotFoundError: No module named 'graphenex'
Leaving you with just an option to do: pip install grapheneX
which, in my case, installs v1.3.1, which doesn't have the newer modules as they were added in v1.3.3
Ah I see, so building from source would probably solve your issue. I wish poetry
was working out of the box in that case :/
As I said, we probably need to:
- update dependencies
- update the packaging details for the newer Python versions
- release the new version on PyPI (could be automated)
I finally managed to build it from source! Yes, poetry is perfect if it works out of box xD I had to fix 5+ errors and completely reinstall poetry.
I'll try doing all you've listed above so people building from source don't get bombarded with errors, such as:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/home/giorgio/Desktop/grapheneX/graphenex/__main__.py", line 7, in <module> from graphenex.core.web import run_server File "/home/giorgio/Desktop/grapheneX/graphenex/core/web/__init__.py", line 4, in <module> from flask import Flask File "/home/giorgio/Desktop/grapheneX/env/lib/python3.10/site-packages/flask/__init__.py", line 14, in <module> from jinja2 import escape File "/home/giorgio/Desktop/grapheneX/env/lib/python3.10/site-packages/jinja2/__init__.py", line 12, in <module> from .environment import Environment File "/home/giorgio/Desktop/grapheneX/env/lib/python3.10/site-packages/jinja2/environment.py", line 25, in <module> from .defaults import BLOCK_END_STRING File "/home/giorgio/Desktop/grapheneX/env/lib/python3.10/site-packages/jinja2/defaults.py", line 3, in <module> from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401 File "/home/giorgio/Desktop/grapheneX/env/lib/python3.10/site-packages/jinja2/filters.py", line 13, in <module> from markupsafe import soft_unicode ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/giorgio/Desktop/grapheneX/env/lib/python3.10/site-packages/markupsafe/__init__.py)
Thank you, that's great! Can you submit an issue to track this?
Yes, will do; I am creating new MR with Small details and than in the next one hopefully all the dependency errors will be fixed