mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-09 06:50:07 +00:00
Patch for Windows banner display
This commit is contained in:
parent
9dd5cd8eb6
commit
ad612bf9e4
4 changed files with 17 additions and 10 deletions
13
thirdparty/colorama/initialise.py
vendored
13
thirdparty/colorama/initialise.py
vendored
|
|
@ -21,13 +21,15 @@ def reset_all():
|
|||
|
||||
|
||||
def init(autoreset=False, convert=None, strip=None, wrap=True):
|
||||
global wrapped_stdout, wrapped_stderr
|
||||
global orig_stdout, orig_stderr
|
||||
|
||||
if orig_stdout is not None:
|
||||
return
|
||||
|
||||
if not wrap and any([autoreset, convert, strip]):
|
||||
raise ValueError('wrap=False conflicts with any other arg=True')
|
||||
|
||||
global wrapped_stdout, wrapped_stderr
|
||||
global orig_stdout, orig_stderr
|
||||
|
||||
orig_stdout = sys.stdout
|
||||
orig_stderr = sys.stderr
|
||||
|
||||
|
|
@ -49,10 +51,15 @@ def init(autoreset=False, convert=None, strip=None, wrap=True):
|
|||
|
||||
|
||||
def deinit():
|
||||
global orig_stdout
|
||||
global orig_stderr
|
||||
|
||||
if orig_stdout is not None:
|
||||
sys.stdout = orig_stdout
|
||||
orig_stdout = None
|
||||
if orig_stderr is not None:
|
||||
sys.stderr = orig_stderr
|
||||
orig_stderr = None
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue