Skip to content

Commit

Permalink
Fix Curses Issue
Browse files Browse the repository at this point in the history
Fix to the curses endwin() error since the upgrade to the curses library.
  • Loading branch information
r3dp0int committed Feb 4, 2024
1 parent 0d4ad2d commit 3b7589f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion arsenal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import termios
import re
import time
from curses import wrapper

# arsenal
from . import __version__
Expand Down Expand Up @@ -188,4 +189,4 @@ def main():


if __name__ == "__main__":
main()
wrapper(main())
12 changes: 6 additions & 6 deletions arsenal/modules/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ def run(self, stdscr):
# if len(Gui.cmd.args) != 0:
# args needed -> ask
args_menu = ArgslistMenu(self)
curses.endwin()
curses.echo()
wrapper(args_menu.run)
args_menu.run(stdscr)
stdscr.refresh()
break
elif c == curses.KEY_F10 or c == 27:
Gui.cmd = None
Expand Down Expand Up @@ -379,7 +378,6 @@ def run(self, stdscr):
# new search -> reset position
self.position = 0
self.page_position = 0
curses.endwin()


class ArgslistMenu:
Expand Down Expand Up @@ -690,7 +688,9 @@ def run(self, stdscr):
"""
# init
Gui.init_colors()
stdscr.clear()
while True:
stdscr.refresh()
self.draw(stdscr)
c = stdscr.getch()
if c == curses.KEY_ENTER or c == 10 or c == 13:
Expand All @@ -701,8 +701,8 @@ def run(self, stdscr):
break
elif c == curses.KEY_F10 or c == 27:
# exit args_menu -> return to cheatslist_menu
curses.endwin()
wrapper(self.previous_menu.run)
self.previous_menu.run(stdscr)
stdscr.refresh()
break
elif c == curses.KEY_DOWN:
self.next_arg()
Expand Down

0 comments on commit 3b7589f

Please sign in to comment.