From 3b7589f27a704c517a0a5e01aa81b1ccf99578a0 Mon Sep 17 00:00:00 2001 From: r3dp0int Date: Sun, 4 Feb 2024 20:34:20 +1100 Subject: [PATCH] Fix Curses Issue Fix to the curses endwin() error since the upgrade to the curses library. --- arsenal/app.py | 3 ++- arsenal/modules/gui.py | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/arsenal/app.py b/arsenal/app.py index a1d047f..4ae9a23 100644 --- a/arsenal/app.py +++ b/arsenal/app.py @@ -5,6 +5,7 @@ import termios import re import time +from curses import wrapper # arsenal from . import __version__ @@ -188,4 +189,4 @@ def main(): if __name__ == "__main__": - main() + wrapper(main()) diff --git a/arsenal/modules/gui.py b/arsenal/modules/gui.py index 98cdac3..7a79ccb 100644 --- a/arsenal/modules/gui.py +++ b/arsenal/modules/gui.py @@ -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 @@ -379,7 +378,6 @@ def run(self, stdscr): # new search -> reset position self.position = 0 self.page_position = 0 - curses.endwin() class ArgslistMenu: @@ -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: @@ -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()