mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Probable fix for an Issue #908
This commit is contained in:
@@ -1693,12 +1693,13 @@ def getConsoleWidth(default=80):
|
|||||||
width = int(os.getenv("COLUMNS"))
|
width = int(os.getenv("COLUMNS"))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
process = execute("stty size", shell=True, stdout=PIPE, stderr=PIPE)
|
with open(os.devnull, 'w') as FNULL:
|
||||||
stdout, _ = process.communicate()
|
process = execute("stty size", shell=True, stdout=PIPE, stderr=FNULL)
|
||||||
items = stdout.split()
|
stdout, _ = process.communicate()
|
||||||
|
items = stdout.split()
|
||||||
|
|
||||||
if len(items) == 2 and items[1].isdigit():
|
if len(items) == 2 and items[1].isdigit():
|
||||||
width = int(items[1])
|
width = int(items[1])
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user