From 94c00fd3bc21bad0bc9caac88f4204fb237deb22 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 1 Jun 2019 00:53:47 +0200 Subject: [PATCH] Trivial refactoring --- lib/core/settings.py | 2 +- lib/core/unescaper.py | 1 - lib/techniques/blind/inference.py | 2 +- lib/utils/getch.py | 4 +++- lib/utils/xrange.py | 2 -- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 9d5d5cf78..631185551 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.5.162" +VERSION = "1.3.5.163" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/core/unescaper.py b/lib/core/unescaper.py index ece7e1240..e2e33e84d 100644 --- a/lib/core/unescaper.py +++ b/lib/core/unescaper.py @@ -6,7 +6,6 @@ See the file 'LICENSE' for copying permission """ from lib.core.common import Backend -from lib.core.data import conf from lib.core.datatype import AttribDict from lib.core.settings import EXCLUDE_UNESCAPE diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 79b89f344..d0ccf66d8 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -279,7 +279,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None return None maxChar = maxValue = charTbl[-1] - minChar = minValue = charTbl[0] + minValue = charTbl[0] firstCheck = False lastCheck = False unexpectedCode = False diff --git a/lib/utils/getch.py b/lib/utils/getch.py index f3b16f9e5..84e099e5d 100644 --- a/lib/utils/getch.py +++ b/lib/utils/getch.py @@ -58,9 +58,11 @@ class _GetchMacCarbon(object): def __init__(self): import Carbon - _ = Carbon.Evt # see if it has this (in Unix, it doesn't) + getattr(Carbon, "Evt") # see if it has this (in Unix, it doesn't) def __call__(self): + import Carbon + if Carbon.Evt.EventAvail(0x0008)[0] == 0: # 0x0008 is the keyDownMask return '' else: diff --git a/lib/utils/xrange.py b/lib/utils/xrange.py index 962f7f625..a8b3d69a1 100644 --- a/lib/utils/xrange.py +++ b/lib/utils/xrange.py @@ -7,8 +7,6 @@ See the file 'LICENSE' for copying permission import numbers -from lib.core.compat import cmp - class xrange(object): """ Advanced (re)implementation of xrange (supports slice/copy/etc.)