Comments (24)
Fixed by @r3dp0int, thanks you !
from arsenal.
When you install the latest version of kali you will have the error as above. i tried to install with pip an manual but both does not fix it. dev.tty.legacy_tiocsti=1 is a fix for the kernel update problem and does not fix this error. The problem is in cursed module. I have to rebuild kali because its foobar now because of my current attempts to fix it, will try to find a fix when i'm up again.
from arsenal.
I have the same problem, I've been trying to solve it for 2 days and I still haven't found it. If I do, I'll let you know.
from arsenal.
It could also be a Python issue. In Kali it is version 3.11.6. In Fedora, 3.12.0.
Also, can I say that this tool should be in Kali's default repos? Any way to ask for inclusion?
from arsenal.
Same issue here on latest Kali Linux 2023.4 vm
from arsenal.
I have just run my kali on python 3.12, unfortunately no change on the result.
from arsenal.
Hi !
Thanks for reporting the issue, we will have a look at this error.
from arsenal.
Not an expert on curses but found this thread which may help find the fix.
https://www.mail-archive.com/[email protected]/msg1944374.html
from arsenal.
Hey !
Because of TIOCSTI patch applied recently on Linux Kernel, we need to re-implement some Arsenal functions (which can take some time).
Thanks @slasheur7 helping at troubleshooting this.
Here is a workaround, execute as root :
sysctl -w dev.tty.legacy_tiocsti=1
If you want this workaround to survive a reboot, add the following configuration to sysctl.conf file (root permission needed) :
echo "dev.tty.legacy_tiocsti=1" >> /etc/sysctl.conf
It works on the current Kali 2023.4 (python 3.11.7 and 3.12.1) and should also work on other Linux distro.
Of course there is security concern (ie : if you are not already root on your Linux). More information about TIOCTSI in the following kernel commit log :
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83efeeeb3d04b22aaed1df99bc70a48fe9d22c4d
from arsenal.
Hello,
After testing your solution under kali 2023.4 and in python 3.11.7 the error has still not changed.
I will continue to try tomorrow but currently still the same error message 😁
from arsenal.
@joblinours what solution? Any specific commit?
from arsenal.
@injcristianrojas
the temporary solution proposed by @v1k1ngfr by adding the "dev.tty.legacy_tiocsti=1" attribute to /etc/sysctl.conf
from arsenal.
@joblinours the IOCTL issue is mentioned in the README. This ticket is for another issue.
from arsenal.
@injcristianrojas we are not able to reproduce your issue related to ncurses, could you give steps you followed ?
from arsenal.
@v1k1ngfr are you referring to the original issue or the "dev.tty.legacy_tiocsti=1" one?
If it is the original one I can confirm the issues. Arsenal works fine on my Fedora box but fails on my old Kali box and the new rebuild of my Kali box with no customizations. If you see the comment above this has also been found by the HG project but their fix did not seem to work for Arsenal.
from arsenal.
@v1k1ngfr sure. I'm running arsenal on Kali without a virtualenv or pip packages installed, on Kali 2023.4. Just installed it using pip install with deb-based dependencies installed. The error appears every time I exit arsenal, either due to Ctrl-C or when getting a command.
If you have any more questions, please let me know.
from arsenal.
@injcristianrojas we are not able to reproduce your issue related to ncurses, could you give steps you followed ?
Have you tried on the latest version of Kali Linux (2023.4?) I have tried on several machines that were recently upgraded. All give the same error reported by OP
from arsenal.
Same issue
└─ a [ 5:52pm 1 ⨯ ]
Traceback (most recent call last):
File "/usr/lib/python3.11/curses/init.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/modules/gui.py", line 382, in run
curses.endwin()
_curses.error: endwin() returned ERR
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/r3dkn33/.local/bin/arsenal", line 8, in
sys.exit(main())
^^^^^^
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 185, in main
App().run()
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 64, in run
self.start(args, cheatsheets)
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 71, in start
cmd = gui.run(cheatsheets)
^^^^^^^^^^^^^^^^^^^^
File "/home/r3dkn33/.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
Followed these steps to install on most recent version of Kali
python3 -m pip install arsenal-cli
added this alias a='arsenal' to .zshrc
sudo sysctl -w dev.tty.legacy_tiocsti=1
from arsenal.
For testing purposes: if you comment out the three occurrences of endwin()
in gui.py
, along with the endwin()
call in the wrapper function of curses' __init__.py
, Arsenal begins to work again correctly with no errors.
from arsenal.
Just to confirm are these the locations?
/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/modules/gui.py
/usr/lib/python3.11/curses/__init__.py
If they are the correct locations. the output after running arsenal is
Traceback (most recent call last):
File "/home/r3dkn33/.local/bin/arsenal", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 185, in mainApp().run()
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 64, in run self.start(args, cheatsheets)
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 161, in start self.prefil_shell_cmd(cmd)
File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 178, in prefil_shell_cmd
fcntl.ioctl(stdin, termios.TIOCSTI, c)
OSError: [Errno 5] Input/output error
from arsenal.
Just to confirm are these the locations?
/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/modules/gui.py /usr/lib/python3.11/curses/__init__.py
If they are the correct locations. the output after running arsenal is
Traceback (most recent call last): File "/home/r3dkn33/.local/bin/arsenal", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 185, in mainApp().run() File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 64, in run self.start(args, cheatsheets) File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 161, in start self.prefil_shell_cmd(cmd) File "/home/r3dkn33/.local/lib/python3.11/site-packages/arsenal/app.py", line 178, in prefil_shell_cmd fcntl.ioctl(stdin, termios.TIOCSTI, c) OSError: [Errno 5] Input/output error
You have the correct locations, to solve that last error run this:
sudo sysctl -w dev.tty.legacy_tiocsti=1
from arsenal.
For testing purposes: if you comment out the three occurrences of
endwin()
ingui.py
, along with theendwin()
call in the wrapper function of curses'__init__.py
, Arsenal begins to work again correctly with no errors.
Confirmed. I edited those 2 files in the following locations:
/home/user/.local/lib/python3.11/site-packages/arsenal/modules/gui.py
/usr/lib/python3.11/curses/__init__.py
from arsenal.
sudo sysctl -w dev.tty.legacy_tiocsti=1
Perfect thank you - confirmed as working
from arsenal.
I think I've come up with the correct solution, I'll issue a pull request soon.
from arsenal.
Related Issues (20)
- change the view / hide first column HOT 2
- exclude term for search HOT 3
- Tmux widget
- AttributeError: 'str' object has no attribute 'keys' during YAML parsing
- TIOCSTI disabled by default in recent kernels breaks arsenal HOT 3
- ERROR WHEN OUTPUT
- problem with md variable parsing HOT 4
- option to add prefix to all commands (for example proxychains) HOT 1
- Error whenever i try to run command HOT 2
- Make args optionnal HOT 3
- Error when selecting command HOT 2
- Input/output error - termios.TIOCSTI HOT 1
- Crashes at every cheat sheet when pressing ENTER HOT 4
- Improvement: Go down with "tab" and go up with "shift+tab". HOT 3
- Error HOT 1
- 20240521- powershell.md's issue HOT 2
- args uniqueness HOT 2
- [Enhancement] Declaring variables within a file HOT 2
- Rewriting of the GUI HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arsenal.