Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36cb4fa

Browse files
committed
Minor patch
1 parent 82f0f06 commit 36cb4fa

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

lib/core/common.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,16 +2122,11 @@ def getConsoleWidth(default=80):
21222122
width = int(os.getenv("COLUMNS"))
21232123
else:
21242124
try:
2125-
try:
2126-
FNULL = open(os.devnull, 'w')
2127-
except IOError:
2128-
FNULL = None
2129-
process = subprocess.Popen("stty size", shell=True, stdout=subprocess.PIPE, stderr=FNULL or subprocess.PIPE)
2130-
stdout, _ = process.communicate()
2131-
items = stdout.split()
2125+
output = shellExec("stty size")
2126+
match = re.search(r"\A\d+ (\d+)", output)
21322127

2133-
if len(items) == 2 and items[1].isdigit():
2134-
width = int(items[1])
2128+
if match:
2129+
width = int(match.group(1))
21352130
except (OSError, MemoryError):
21362131
pass
21372132

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty import six
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.5.86"
21+
VERSION = "1.3.5.87"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)