From 9d34023a03a3e1b94ad223f6814072688ffd4840 Mon Sep 17 00:00:00 2001 From: Arusekk Date: Mon, 17 Aug 2020 16:32:38 +0200 Subject: [PATCH] Disable term if initialization fails Closes #1658 --- pwnlib/term/unix_termcap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pwnlib/term/unix_termcap.py b/pwnlib/term/unix_termcap.py index 1dc34f2ed..f850ddb41 100644 --- a/pwnlib/term/unix_termcap.py +++ b/pwnlib/term/unix_termcap.py @@ -60,6 +60,8 @@ def init(): except curses.error as e: import traceback print('Warning:', ''.join(traceback.format_exception_only(e.__class__, e)), file=sys.stderr) + print('Terminal features will not be available. Consider setting TERM variable to your current terminal name (or xterm).', file=sys.stderr) + os.environ['PWNLIB_NOTERM'] = '1' cache = {} # Manually add reset sequence into the cache.