Trivial refactoring

This commit is contained in:
Miroslav Stampar 2019-06-01 00:53:47 +02:00
parent 956b0eb69d
commit 94c00fd3bc
5 changed files with 5 additions and 6 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.5.162" VERSION = "1.3.5.163"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} 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) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -6,7 +6,6 @@ See the file 'LICENSE' for copying permission
""" """
from lib.core.common import Backend from lib.core.common import Backend
from lib.core.data import conf
from lib.core.datatype import AttribDict from lib.core.datatype import AttribDict
from lib.core.settings import EXCLUDE_UNESCAPE from lib.core.settings import EXCLUDE_UNESCAPE

View File

@ -279,7 +279,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
return None return None
maxChar = maxValue = charTbl[-1] maxChar = maxValue = charTbl[-1]
minChar = minValue = charTbl[0] minValue = charTbl[0]
firstCheck = False firstCheck = False
lastCheck = False lastCheck = False
unexpectedCode = False unexpectedCode = False

View File

@ -58,9 +58,11 @@ class _GetchMacCarbon(object):
def __init__(self): def __init__(self):
import Carbon 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): def __call__(self):
import Carbon
if Carbon.Evt.EventAvail(0x0008)[0] == 0: # 0x0008 is the keyDownMask if Carbon.Evt.EventAvail(0x0008)[0] == 0: # 0x0008 is the keyDownMask
return '' return ''
else: else:

View File

@ -7,8 +7,6 @@ See the file 'LICENSE' for copying permission
import numbers import numbers
from lib.core.compat import cmp
class xrange(object): class xrange(object):
""" """
Advanced (re)implementation of xrange (supports slice/copy/etc.) Advanced (re)implementation of xrange (supports slice/copy/etc.)