From a965613262f8582e87ceeca0876eb30a881bd152 Mon Sep 17 00:00:00 2001 From: the-c0d3r Date: Fri, 5 Jul 2019 07:05:59 +0800 Subject: [PATCH 1/3] autorecon.py: fixed stdin/stdout issue --- autorecon.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autorecon.py b/autorecon.py index de289ed..1e23b42 100644 --- a/autorecon.py +++ b/autorecon.py @@ -7,8 +7,10 @@ # option) any later version. # +import atexit import argparse import asyncio +import colorama from colorama import Fore, Style from concurrent.futures import ProcessPoolExecutor, as_completed, FIRST_COMPLETED import ipaddress @@ -19,6 +21,12 @@ import string import sys import toml + +def _quit(): + colorama.deinit() + +atexit.register(_quit) + verbose = 0 nmap = '-vv --reason -Pn' srvname = '' From a5f9509c01888ef59a108eaee5f9f9ddc45c7b27 Mon Sep 17 00:00:00 2001 From: the-c0d3r Date: Mon, 14 Oct 2019 22:07:39 +0800 Subject: [PATCH 2/3] autorecon.py: added termios to restore the flags --- autorecon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autorecon.py b/autorecon.py index 1e23b42..360e248 100644 --- a/autorecon.py +++ b/autorecon.py @@ -20,13 +20,17 @@ import socket import string import sys import toml +import termios def _quit(): - colorama.deinit() + termios.tcsetattr(sys.stdin.fileno(), TERM_FLAGS) + atexit.register(_quit) +TERM_FLAGS = termios.tcgetattr(sys.stdin.fileno()) + verbose = 0 nmap = '-vv --reason -Pn' srvname = '' From 73c99c6dd9074c7964df60317dc01ca101efe23b Mon Sep 17 00:00:00 2001 From: the-c0d3r Date: Fri, 18 Oct 2019 09:22:14 +0800 Subject: [PATCH 3/3] autorecon.py: fixed termios setattr missing argument --- autorecon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autorecon.py b/autorecon.py index 360e248..11f70a0 100644 --- a/autorecon.py +++ b/autorecon.py @@ -24,7 +24,7 @@ import termios def _quit(): - termios.tcsetattr(sys.stdin.fileno(), TERM_FLAGS) + termios.tcsetattr(sys.stdin.fileno(), termios.TCSADRAIN, TERM_FLAGS) atexit.register(_quit)