Orange-Cyberdefense / arsenal

Arsenal is just a quick inventory and launcher for hacking programs

Repository from Github https://github.comOrange-Cyberdefense/arsenalRepository from Github https://github.comOrange-Cyberdefense/arsenal

Crashes at every cheat sheet when pressing ENTER

nathan-rabet opened this issue · comments

Crashes at every cheat sheet when pressing ENTER

Error

When I choose a random command on arsenal, configure its parameters and press enter, i encounter this error log :

Traceback (most recent call last):
  File "/usr/lib/python3.11/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/modules/gui.py", line 319, in run
    wrapper(args_menu.run)
  File "/usr/lib/python3.11/curses/__init__.py", line 101, in wrapper
    endwin()
_curses.error: endwin() returned ERR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nathan/.local/bin/arsenal", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/app.py", line 185, in main
    App().run()
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/app.py", line 64, in run
    self.start(args, cheatsheets)
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/app.py", line 71, in start
    cmd = gui.run(cheatsheets)
          ^^^^^^^^^^^^^^^^^^^^
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/modules/gui.py", line 827, in run
    wrapper(self.cheats_menu.run)
  File "/usr/lib/python3.11/curses/__init__.py", line 101, in wrapper
    endwin()
_curses.error: endwin() returned ERR

System info

$ uname -a
Linux blade 6.3.0-kali1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.3.7-1kali1 (2023-06-29) x86_64 GNU/Linux

$ a --version
arsenal (version 1.1.1)

Hi @nathan-rabet,
Could you try the workaround below ?
Workaround : #77

Hi, it doesn't work.

$ sudo sysctl -w dev.tty.legacy_tiocsti=1
dev.tty.legacy_tiocsti = 1
                                                                                
$ a
Traceback (most recent call last):
  File "/usr/lib/python3.11/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/modules/gui.py", line 319, in run
    wrapper(args_menu.run)
  File "/usr/lib/python3.11/curses/__init__.py", line 101, in wrapper
    endwin()
_curses.error: endwin() returned ERR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nathan/.local/bin/arsenal", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/app.py", line 185, in main
    App().run()
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/app.py", line 64, in run
    self.start(args, cheatsheets)
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/app.py", line 71, in start
    cmd = gui.run(cheatsheets)
          ^^^^^^^^^^^^^^^^^^^^
  File "/home/nathan/.local/lib/python3.11/site-packages/arsenal/modules/gui.py", line 827, in run
    wrapper(self.cheats_menu.run)
  File "/usr/lib/python3.11/curses/__init__.py", line 101, in wrapper
    endwin()
_curses.error: endwin() returned ERR

Issue Resolution Update

I've discovered the cause of the bug related to the Arsenal package. There's a discrepancy between the versions of the package on PyPI and GitHub. Although both sources claim to be at version 1.1.1, their implementations diverge significantly.

Critical Issue

The PyPI version incorrectly uses the endwin() function. This issue has been fixed in the version of Arsenal available on GitHub.

Recommended Action

To ensure consistent functionality and avoid this bug, it's necessary to update the Arsenal package from PyPI to the latest corrected version on GitHub. This update is crucial for maintaining compatibility and project integrity.

Version Number Recommendation

It is strongly recommended that the GitHub version of the Arsenal package be updated to a new version number greater than 1.1.1. This change will help clearly differentiate the corrected version from the previous one, avoiding any potential confusion and ensuring that users are aware they're getting an updated (and less buggy) implementation.