Giter VIP home page Giter VIP logo

graphenex's People

Contributors

afk avatar allcontributors[bot] avatar dependabot[bot] avatar enesokutan avatar furk4nyuksel avatar jxdv avatar kacpernapierski avatar kalaycitayfun avatar navin772 avatar oliviagallucci avatar orhun avatar privateger avatar yutyo avatar zero77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphenex's Issues

New modules not displayed in Web UI

Describe the bug
Hi, Newly added modules aren't displayed in the Web UI. I've tested this:

  1. 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
  2. Building as suggested in README with pip

Expected behavior
All hardening methods should appear

  • OS: Linux
  • Browser: Firefox

Error found when loading /etc/profile error at desktop loading

Describe the bug
A clear and concise description of what the bug is.
A error message, at the boot of the desktop (Not the OS in itself or even in the boot phase). Not actual impact from it found so far.

Log Messages
Tell us what make you face this issue.
Provide log messages if you get them when the error occur.
Also reproduction steps would be helpful for us to understand the situation.
Message displayed (Some part where in French, the translation i’ve done is correct but might not be the exact formulation in English):
Error found when loading /etc/profile:

/usr/sbin/lightdm-session: line 29 /etc/profile: Rights not granted

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.

Expected behavior
A clear and concise description of what you expected to happen.
No error displayed. Will load the desktop without any issues, and without pausing it.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Content of the neofetch :

      eeeeeeeeeeeeeeeeeeeeeee         --------------------- 
    eeeee  eeeeeeeeeeee   eeeee       OS: elementary OS 5.0 Juno x86_64 
  eeee   eeeee       eee     eeee     Host: MS-7918 1.0 
 eeee   eeee          eee     eeee    Kernel: 5.2.0-4.1-liquorix-amd64 
eee    eee            eee       eee   Uptime: 1 hour, 4 mins 
eee   eee            eee        eee   Packages: 3469 
ee    eee           eeee       eeee   Shell: bash 4.4.20 
ee    eee         eeeee      eeeeee   Resolution: 3440x1440 
ee    eee       eeeee      eeeee ee   DE: Pantheon 
eee   eeee   eeeeee      eeeee  eee   WM: Mutter(Gala) 
eee    eeeeeeeeee     eeeeee    eee   Theme: Elementary-x [GTK3] 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee    Icons: La-Capitaine [GTK3] 
  eeeeeeee eeeeeeeeeeee      eeee     Terminal: io.elementary.t 
    eeeee                 eeeee       CPU: Intel i7-4790 (8) @ 4.000GHz 
      eeeeeee         eeeeeee         GPU: NVIDIA GeForce GTX 1060 6GB 
         eeeeeeeeeeeeeeeee            Memory: 5570MiB / 32110MiB

The kernel is a custom one, built automatically from source with it´s couple of general tweaks. https://liquorix.net
Additional context
Add any other context about the problem here.
I´m still pretty new as a Linux user, but i think i have still sufficient knowledge of it.
I suppose this could be simply be caused by the user/Set_File_Permissions | Set file permissions of the root user module, and so, doesn´t actually cause any issues in this context.
But as i´ve already said, I consider myself still pretty new to really say to myself that this should be indeed true, wanted to still report it to ask if that was actually the case.

Web Interface | Already used address situation

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Ever since i’ve created my IPFS node, grapheneX can’t use the default port of 8080 for its web interface An error occurred: [Errno 98] Address already in use (Might want to correct this typo in Error btw)
That's indeed where my IPFS is setup at, this can easily be fixed by using another port by using the [host:port] argument.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Have a prompt of grapheneX when setting him to start its web interface at a specific address and/or port, to ask to save this address as the default one next. Can easily be changed by default once again, by using -localhost:8080 or maybe with the inclusion of a -default argument
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I’ve considered suggesting to auto-save it, but a user might want to use a specific port for only specific occasions.
I’ve also thought of having grapheneX have a backup default address that it would try if the default one was already used, but this might be causing some issues if it actually bothers with the user web setup.
Same goes, for trying a random port, or even worse, scanning all the available ones.
Additional context
Add any other context or screenshots about the feature request here.
However, as grapheneX modules are habitually ¨Setup once, and forget about it¨, I suppose this isn’t really needed.

ImportError: cannot import name 'Mapping' from 'collections'

Description of bug
ImportError: cannot import name 'Mapping' from 'collections' (C:\Python311\Lib\collections_init_.py)

Log Messages
Log messages are in screenshot below. I also face this issue if installing via pip or Python.

Screenshots
Screenshot 2023-06-22 182402

Desktop:
-Windows 10 22621.1848

Additional context
Any information/guidance here would be appreciated! I realize you support 3.7, though this seems relevant.

Using abstract classes instead of separating functionality by foldering

Is your feature request related to a problem? Please describe.
It's not.

Describe the solution you'd like
The thing is, you guys have win/linux specific commands in the code base. But those functions literally have the same name. As an example: run_cmd function. I believe it can be abstracted out like AbstractOsClasses and can be extended by Linux, Win and MacOS classes.

Also:

Describe alternatives you've considered
None.

Additional context
Since I spotted OOP in the code base, choosing solid methodologies should be better. This is just something I think it'd make the code base more maintainable and such. There's no necessity to do the way I mentioned.

Cheers 🥂

Restarting services to apply changes

Hi, I am not sure about Windows, but a lot of these hardening changes actually require to restart services for the changes to take place (either this or reboot).

For example:

  • To load some of the network changes, we would need to: sudo sysctl -p
  • To apply changes to the sshd_config: sudo service ssh restart
    etc...

You get my point; Perhaps it would make sense to add another key to modules.json: "require_restart", or atleast somehow inform the user that the changes will aply after they restart the service themselves, or this can be implemented.

LMK What you think about this. I could add this If you'd be interested, also I'd like to add that this project is really amazing, and you've done a very good job!

Revision of each module

Go through all hardening modules and check if the changes are applied or some action needs to be taken after #161 gets merged, and adjust the values in 'require_superuser' correctly.

Provide better module explanations

It would be nice if each module had a short description of why it's recommending a specific change. For example, automatically logging out idle users is intuitive and easy to understand. But what does enabling TCP SYN cookie protection do? Why is it a good idea?

Yes, these things are probably easy to search for on the internet, but it would be nice to get even just a short description.

Ubuntu 22.04 installation tutorial

Describe the bug
Dependency issue and python collection issue.

Log Messages
I wanted to install grapheneX on a new Ubuntu 22.04 VM.

It did not work out of the box, so I thought I would submit an issue on how I fixed it.

I included my CLI input along with log messages from each step.

I also included what I used to fix it. See the "Additional Context" section for more details.

Would add a pull request, but I am unsure if that is good idea since I only tested it on Ubuntu 22.04.

Expected behavior
For grapheneX to work on Ubuntu 22.04 when I type pip install graphenex

Desktop (please complete the following information):

  • OS: Ubuntu Linux
  • Version: 22.04

Additional context

Install pip
sudo apt install python3-pip

Install graphenex via pip on ubuntu-22.04.1-desktop-amd64
pip install grapheneX

cd to where you can run it
cd /home/USERNAME/.local/bin

run grapheneX
./graphenex

Examine issue 1

Traceback (most recent call last):
File "/home/olivia/.local/bin/./grapheneX", line 5, in
from graphenex.main import main
File "/home/olivia/.local/lib/python3.10/site-packages/graphenex/main.py", line 6, in
from graphenex.core.cli.shell import start_cli
File "/home/olivia/.local/lib/python3.10/site-packages/graphenex/core/cli/shell.py", line 4, in
from graphenex.core.cli.commands import ShellCommands
File "/home/olivia/.local/lib/python3.10/site-packages/graphenex/core/cli/commands.py", line 10, in
from PyInquirer import prompt, Validator, ValidationError
File "/home/olivia/.local/lib/python3.10/site-packages/PyInquirer/init.py", line 6, in
from prompt_toolkit.token import Token
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/init.py", line 16, in
from .interface import CommandLineInterface
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/interface.py", line 19, in
from .application import Application, AbortAction
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/application.py", line 8, in
from .key_binding.bindings.basic import load_basic_bindings
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in
from prompt_toolkit.renderer import HeightIsUnknownError
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/renderer.py", line 11, in
from prompt_toolkit.styles import Style
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/styles/init.py", line 8, in
from .from_dict import *
File "/home/olivia/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

Fix issue 1 - open file
gedit /home/USERNAME/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py

Change the line below (line 9 for me)
from collections import Mapping
to
from collections.abc import Mapping

Then, save and close the file.

Examine issue 2

Traceback (most recent call last):
File "/home/olivia/.local/bin/./grapheneX", line 5, in
from graphenex.main import main
File "/home/olivia/.local/lib/python3.10/site-packages/graphenex/main.py", line 7, in
from graphenex.core.web import run_server
File "/home/olivia/.local/lib/python3.10/site-packages/graphenex/core/web/init.py", line 5, in
from flask_socketio import SocketIO
File "/home/olivia/.local/lib/python3.10/site-packages/flask_socketio/init.py", line 24, in
from werkzeug.serving import run_with_reloader
ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving' (/home/olivia/.local/lib/python3.10/site-packages/werkzeug/serving.py)

Fix issue 2 - change dependency versions

pip uninstall Flask

pip install flask==2.0.3

pip uninstall Werkzeug==2.2.2

pip install Werkzeug==2.0.3

Run grapheneX
./grapheneX

Everything should work that does not require sudo.

Run grapheneX
sudo grapheneX

Examine issue 3
/ ****/

Fix issue 3 - open file
sudo gedit /usr/lib/python3.10/collections/__init__.py

Replace whatever is above import sys as _sys with:

try:
    import collections.abc as _collections_abc
except ImportError:
    import collections as _collections_abc
try:
    from collections.abc import Mapping
except ImportError:
    from collections import Mapping

YAYYY everything should work now!

Failing to catch exceptions of some hardening commands

When executing some of the hardening commands it looks like the exceptions are not caught for some reason.
Steps:

  1. run grapheneX as non-root
  2. Open web interface
  3. Execute (for example) Set_Permissions_Preload_File, we get this result:
    Screenshot from 2023-09-05 19-47-50
    First of all, it shouldn't try to execute at all, as the "require_superuser" is set to True, so the correct behaviour would be to get this pop-up:
    Screenshot from 2023-09-05 19-53-41
    It's weird that it actually works in my case if I try to execute any hardening command from "Other" namespace, and it's also incorrectly printed out to stdout
    Screenshot from 2023-09-05 19-48-28

Need to investigate this further.

Question about automation point

Guys, I know you are doing well.
If we are looking this product. as automation point of view then we have missing major point.
As per automation,
1- Configuration automation (i.e.- services, network, configuration file value and so on.. which we need for hardening ) **I got this point is fine as of now. because we are in development face and there are option to add new modules as per technical knowledge and requirement **

2- Auto deployment ( on multi server/instance ) In current project i have found nothing for this. There. is no option to deploy configuration on any remote server/instance. No option to add Inventory list for remote server where we want to deploy

3- Log ( i got logs in cli what we ran or deploy services but no option in GUI for that ) **We need to add Logging part also in GUI and **

Note: Concern is as of now users need above things.

Failure to exec more commands

Hardening modules which execute more than one command are failing. If we execute filesystem/Disable_Uncommon_FS, than we get:
Screenshot from 2023-09-11 14-53-52

This is happening to all modules which execute more than 1 commands at the same time.
@orhun, Was it working correctly when you were actively maintaining gX a few years ago? None of the changes I've introduced should've resulted in this. Maybe there's something wrong in LinuxExec/run_cmd method.

Modules which only execute 1 command at the time are all behaving correctly.

module 'coloredlogs' has no attribute 'CAN_USE_BOLD_FONT'

Describe the bug
When using SSH to get to a server I'm getting the following error after a fresh install of graphenex

Log Messages

Traceback (most recent call last):
  File "/usr/local/bin/grapheneX", line 7, in <module>
    from graphenex.__main__ import main
  File "/usr/local/lib/python3.6/dist-packages/graphenex/__main__.py", line 4, in <module>
    from graphenex.core.utils.helpers import parse_cli_args, print_header
  File "/usr/local/lib/python3.6/dist-packages/graphenex/core/utils/helpers.py", line 17, in <module>
    logger = GraphenexLogger(__name__)
  File "/usr/local/lib/python3.6/dist-packages/graphenex/core/utils/logcl.py", line 51, in __init__
    levelname=dict(color='cyan', bold=coloredlogs.CAN_USE_BOLD_FONT),
AttributeError: module 'coloredlogs' has no attribute 'CAN_USE_BOLD_FONT'

Expected behavior
This shouldn't happen

Desktop (please complete the following information):

  • OS: [e.g. Linux / Windows] Ubuntu Server 18.04
  • Browser [e.g. chrome, firefox] N/A
  • Version [e.g. 22] PIP Install (can't find version)

Additional context
I have no idea if this would work with an actual monitor as I don't have a physical connection to this server.

colorama module not found error message

Describe the bug
When trying to install grapheneX on my second Linux PC (A Kodachi OS Netbook, in which the convontionnal installation method via python3 command works flawlessly), I wanted to redo a clean install of grapheneX on my main PC, which as i could remember, had issues with the colorama module.
(Before that, I was running it locally from the cloned repository like explained in the Readme.md)
Well, I still have this issue, being stuck with the colorama module not found error message.

Log Messages

pm at Velvet4Renaissance in ~
$ PIP uninstall colorama
WARNING: The directory '/home/pm/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling colorama-0.4.1:
  Would remove:
    /usr/local/lib/python3.6/dist-packages/colorama-0.4.1.dist-info/*
    /usr/local/lib/python3.6/dist-packages/colorama/*
Proceed (y/n)? y
  Successfully uninstalled colorama-0.4.1
pm at Velvet4Renaissance in ~
$ PIP install grapheneX
WARNING: The directory '/home/pm/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/pm/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: grapheneX in /usr/local/lib/python3.6/dist-packages (1.1.1)
Requirement already satisfied: flask-socketio in /usr/local/lib/python3.6/dist-packages (from grapheneX) (4.2.1)
Requirement already satisfied: coloredlogs in /usr/local/lib/python3.6/dist-packages (from grapheneX) (10.0)
Collecting colorama (from grapheneX)
  Downloading https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Requirement already satisfied: pyinquirer in /usr/local/lib/python3.6/dist-packages (from grapheneX) (1.0.3)
Requirement already satisfied: terminaltables in /usr/local/lib/python3.6/dist-packages (from grapheneX) (3.1.0)
Requirement already satisfied: python-socketio>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from flask-socketio->grapheneX) (4.3.1)
Requirement already satisfied: Flask>=0.9 in /usr/local/lib/python3.6/dist-packages (from flask-socketio->grapheneX) (1.1.1)
Requirement already satisfied: humanfriendly>=4.7 in /usr/local/lib/python3.6/dist-packages (from coloredlogs->grapheneX) (4.18)
Requirement already satisfied: Pygments>=2.2.0 in /usr/local/lib/python3.6/dist-packages (from pyinquirer->grapheneX) (2.4.2)
Requirement already satisfied: prompt-toolkit==1.0.14 in /usr/local/lib/python3.6/dist-packages (from pyinquirer->grapheneX) (1.0.14)
Requirement already satisfied: regex>=2016.11.21 in /usr/local/lib/python3.6/dist-packages (from pyinquirer->grapheneX) (2019.8.19)
Requirement already satisfied: python-engineio>=3.9.0 in /usr/local/lib/python3.6/dist-packages (from python-socketio>=4.3.0->flask-socketio->grapheneX) (3.9.3)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from python-socketio>=4.3.0->flask-socketio->grapheneX) (1.11.0)
Requirement already satisfied: Jinja2>=2.10.1 in /usr/local/lib/python3.6/dist-packages (from Flask>=0.9->flask-socketio->grapheneX) (2.10.1)
Requirement already satisfied: Werkzeug>=0.15 in /usr/local/lib/python3.6/dist-packages (from Flask>=0.9->flask-socketio->grapheneX) (0.15.5)
Requirement already satisfied: click>=5.1 in /usr/local/lib/python3.6/dist-packages (from Flask>=0.9->flask-socketio->grapheneX) (7.0)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python3.6/dist-packages (from Flask>=0.9->flask-socketio->grapheneX) (1.1.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/dist-packages (from prompt-toolkit==1.0.14->pyinquirer->grapheneX) (0.1.7)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3/dist-packages (from Jinja2>=2.10.1->Flask>=0.9->flask-socketio->grapheneX) (1.0)
Installing collected packages: colorama
Successfully installed colorama-0.4.1
pm at Velvet4Renaissance in ~
$ grapheneX -w
colorama module not found.

(Note that the PIP command is just bash extension that allows capitalized command to be run as sudo, It can be found here https://github.com/jthistle/SUDO.)

Expected behavior
After installing the correct packages listed from pip install grapheneX, It should not have the following colorama module not found error message.

Desktop (please complete the following information):

         eeeeeeeeeeeeeeeee            pm@Velvet4Renaissance 
      eeeeeeeeeeeeeeeeeeeeeee         --------------------- 
    eeeee  eeeeeeeeeeee   eeeee       OS: elementary OS 5.0 Juno x86_64 
  eeee   eeeee       eee     eeee     Host: MS-7918 1.0 
 eeee   eeee          eee     eeee    Kernel: 5.2.0-9.1-liquorix-amd64 
eee    eee            eee       eee   Uptime: 3 hours, 10 mins 
eee   eee            eee        eee   Packages: 3547 
ee    eee           eeee       eeee   Shell: bash 4.4.20 
ee    eee         eeeee      eeeeee   Resolution: 3440x1440 
ee    eee       eeeee      eeeee ee   DE: Pantheon 
eee   eeee   eeeeee      eeeee  eee   WM: Mutter(Gala) 
eee    eeeeeeeeee     eeeeee    eee   Theme: Elementary-x [GTK3] 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee    Icons: La-Capitaine [GTK3] 
  eeeeeeee eeeeeeeeeeee      eeee     Terminal: io.elementary.t 
    eeeee                 eeeee       CPU: Intel i7-4790 (8) @ 4.000GHz 
      eeeeeee         eeeeeee         GPU: NVIDIA GeForce GTX 1060 6GB 
         eeeeeeeeeeeeeeeee            Memory: 9135MiB / 32111MiB 

Additional context

And yep, that the same PC/configuration has my other issues posted here. Most of the grapheneX hardening commands was already applied when trying to install properly grapheneX, but this issue was already happening before the hardening process.

Pipenv Timeout

Describe the bug
Can’t try with the without install method

Log Messages
Tell us what make you face this issue.
Provide log messages if you get them when the error occur.
Also reproduction steps would be helpful for us to understand the situation.

$pipenv install
Creating a virtualenv for this project…
Using /usr/bin/python3.7m (3.7.4) to create virtualenv…
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/expect.py", line 96, in expect_loop
    return self.timeout()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7fe19277b610>
searcher: searcher_re:
    0: EOF

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/cli.py", line 366, in install
    selective_upgrade=selective_upgrade,
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 1761, in do_install
    skip_requirements=skip_requirements,
 File "/usr/lib/python3/dist-packages/pipenv/core.py", line 606, in ensure_project
    three=three, python=python, site_packages=site_packages
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 555, in ensure_virtualenv
    do_create_virtualenv(python=python, site_packages=site_packages)
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 962, in do_create_virtualenv
    click.echo(crayons.blue(c.out), err=True)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/delegator.py", line 99, in out
    self.__out = self._pexpect_out
  File "/usr/lib/python3/dist-packages/pipenv/vendor/delegator.py", line 87, in _pexpect_out
    result += self.subprocess.read()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/spawnbase.py", line 427, in read
    self.expect(self.delimiter)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/spawnbase.py", line 327, in expect
    timeout, searchwindowsize, async_)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/spawnbase.py", line 355, in expect_list
    return exp.expect_loop(timeout)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/expect.py", line 106, in expect_loop
    return self.timeout(e)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7fe19277b610>
searcher: searcher_re:
    0: EOF
<pexpect.popen_spawn.PopenSpawn object at 0x7fe19277b610>
searcher: searcher_re:
    0: EOF

Expected behavior
Should setup the env

Desktop (please complete the following information):

  • OS: Debian current testing
  • Version 11

Additional context
pipenv come from the debian repository

After grapheneX Installation ( Unable to start )

Hi Team,

I have tried two different options to setup grapheneX.
1- Direct on machine ( Centos )
2- Through Docker

But i am getting error when start it in both cases. I have attached screenshot.
image
image

Pip Install Bug

Describe the bug
pip install graphenex
ERROR:
AttributeError: 'PosixPath' object has no attribute 'read_text'
.read_text is introduced in Python 3.5.

Expected behavior
Successful setup.

Actual behaviour
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-pCNMf4/graphenex/setup.py", line 5, in
README = (HERE / "README.md").read_text(encoding="utf-8")
AttributeError: 'PosixPath' object has no attribute 'read_text'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-pCNMf4/graphenex/

Steps to reproduce
pip3 install graphenex

Desktop (please complete the following information):

  • OS: Kali Linux

Set up automated PyPI releases

Is your feature request related to a problem? Please describe.

For each new release I am running the following commands on my terminal:

(orhun ζ ~/gh/grapheneX) poetry build

Building GrapheneX (1.4.2)
  - Building sdist
  - Built graphenex-1.4.2.tar.gz
  - Building wheel
  - Built graphenex-1.4.2-py3-none-any.whl

(orhun ζ ~/gh/grapheneX) poetry publish

Publishing GrapheneX (1.4.2) to PyPI
 - Uploading graphenex-1.4.2-py3-none-any.whl 100%
 - Uploading graphenex-1.4.2.tar.gz 100%

Describe the solution you'd like

Let's create a GitHub Actions workflow for automating this when a new tag is pushed.

Describe alternatives you've considered

None.

Additional context

We probably need to login to PyPI first. Consider using a repository secret for the login token.

Set up automated Docker builds

Is your feature request related to a problem? Please describe.

Docker builds are not automated so we don't know if the image is building fine or not. See #155

Describe the solution you'd like

Create a new GitHub Actions file for building the image (and potentially pushing it to DockerHub / GitHub registry).

Describe alternatives you've considered

None.

Additional context

We can probably adopt this from another project such as: https://github.com/orhun/halp/blob/main/.github/workflows/docker.yml

/usr/bin/su: Not accorded permission

Describe the bug
I presume, using the Set_Permissions_Privilege_Escalation module in services, this caused to make myself unable to sudo or access root all together using my actual administrator account.

Log Messages
Executed all the modules, except those from the user category.

Expected behavior
Well, Should actually, still let me access root when i want it.
I presume, it just maked the sudoers file, not possible to be read by the system, and so, not being able to edit it or else.

Desktop (please complete the following information):

██████████████████  ████████   pm@Velvet4Renaissance 
██████████████████  ████████   --------------------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Host: MS-7918 1.0 
████████            ████████   Kernel: 5.0.21-rt16-MANJARO 
████████  ████████  ████████   Uptime: 2 hours, 54 mins 
████████  ████████  ████████   Packages: 1769 (pacman) 
████████  ████████  ████████   Shell: bash 5.0.7 
████████  ████████  ████████   Resolution: 3440x1440 
████████  ████████  ████████   DE: KDE 
████████  ████████  ████████   WM: KWin 
████████  ████████  ████████   WM Theme: Blur-Glassy-v2 
████████  ████████  ████████   Theme: Cantalight [KDE], Breeze [GTK2/3] 
████████  ████████  ████████   Icons: Breeze_RCF [KDE], Breeze_RCF [GTK2/3] 
                               Terminal: guake 
                               CPU: Intel i7-4790 (8) @ 4.000GHz 
                               GPU: NVIDIA GeForce GTX 1060 6GB 
                               Memory: 5820MiB / 32112MiB 

(Yep, Same me again, but distro hopped, because Ubuntu LTS wasn´t really for me)

Additional context
I think i just need to reverse the file permissions on this file, so just launching the system in recovery should do the job, still wanted to precise this.
I´ve did used the web page interface for activating those.
I don´t think this is caused directly by this, but it results into request errors.

[pm@Velvet4Renaissance ~]$ grapheneX -w

                 +ho:`
           `:ohh. /dddy/.
        ./ydddddd/ -hddddho:          | grapheneX |
    `:ohdddddddddds``sddddds- :.      ~ Automated System Hardening Framework
    +ddddddddddddddh. /dds- /hdd      + Created for Linux & Windows.
    +dddddddddddddddd/ .. /hdddd      > https://github.com/grapheneX
    +ddddddddddddddddo``/hdddddd      - Copyright (C) 2019
    +ddddddddddddddo.`+ddddddddd
    `-/+oyhddddd+``+dddddddddddd
    :o+/-.` `-` .syddddddddddddd
    +dddddddyso+:-. `.-/+oyhdddd
     -+yddddddddddddhyso/:-` `-`
        `/sddddddddddddddy+-
            -+hddddddds:`
               `/sy+-
    
20:58:44 > graphenex.core.utils.helpers > INFO > grapheneX started.
20:58:44 > graphenex.core.utils.helpers > WARNING > Some functions won't work without root access, try running the grapheneX with sudo.
20:58:44 > graphenex.core.web > INFO > Starting server: http://localhost:8080
20:58:44 > graphenex.core.web > INFO > Your access token: aBj7kYV_
 * Serving Flask app "graphenex.core.web" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
Error on request:
Traceback (most recent call last):
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/werkzeug/serving.py", line 303, in run_wsgi
    execute(self.server.app)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/werkzeug/serving.py", line 291, in execute
    application_iter = app(environ, start_response)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/flask_socketio/__init__.py", line 46, in __call__
    start_response)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/engineio/middleware.py", line 60, in __call__
    return self.engineio_app.handle_request(environ, start_response)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/socketio/server.py", line 534, in handle_request
    return self.eio.handle_request(environ, start_response)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/engineio/server.py", line 363, in handle_request
    socket = self._get_socket(sid)
  File "/home/pm/.local/pipx/venvs/graphenex/lib/python3.7/site-packages/engineio/server.py", line 551, in _get_socket
    raise KeyError('Session is disconnected')
KeyError: 'Session is disconnected'

EDIT : It´s Permission denied, Not the one i´ve used in the title, Sorry, but that´s difficult to do support talk, if you got your interface in a different language.

Docker image broken

Describe the bug
When building the docker image, the building phase fails.

Log Messages

Sending build context to Docker daemon   2.56kB
Step 1/9 : FROM python:3.7-slim AS build-image
 ---> 33485c686ba5
Step 2/9 : LABEL maintainer="[email protected]"
 ---> Using cache
 ---> ed55f9da9cdd
Step 3/9 : ENV LC_ALL=C.UTF-8
 ---> Using cache
 ---> cf46d727c453
Step 4/9 : RUN apt-get update &&     apt-get install -y --no-install-recommends build-essential gcc curl
 ---> Using cache
 ---> 3e2d6be6ef05
Step 5/9 : RUN VERSION=$(curl --silent "https://api.github.com/repos/graphenex/grapheneX/releases/latest" |     grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') &&     curl -LO https://github.com/grapheneX/grapheneX/archive/$VERSION.tar.gz &&     tar -xzf $VERSION.tar.gz &&     cd "grapheneX-$VERSION" &&     pip install --user .
 ---> Running in c602db24e07b
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1500k    0 1500k    0     0  3496k      0 --:--:-- --:--:-- --:--:-- 3496k
Processing /grapheneX-1.3.1
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      error: Multiple top-level packages discovered in a flat-layout: ['docker', 'graphenex'].
      
      To avoid accidental inclusion of unwanted files or directories,
      setuptools will not proceed with this build.
      
      If you are trying to create a single distribution with multiple packages
      on purpose, you should not rely on automatic discovery.
      Instead, consider the following options:
      
      1. set up custom discovery (`find` directive with `include` or `exclude`)
      2. use a `src-layout`
      3. explicitly set `py_modules` or `packages` with a list of names
      
      To find more information, look for "package discovery" on setuptools docs.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
The command '/bin/sh -c VERSION=$(curl --silent "https://api.github.com/repos/graphenex/grapheneX/releases/latest" |     grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') &&     curl -LO https://github.com/grapheneX/grapheneX/archive/$VERSION.tar.gz &&     tar -xzf $VERSION.tar.gz &&     cd "grapheneX-$VERSION" &&     pip install --user .' returned a non-zero code: 1

Expected behavior
The image builds.

Desktop (please complete the following information):
Ubuntu 22.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.