mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 21:24:13 +03:00
Bug fix
This commit is contained in:
parent
015984a7f2
commit
f82f1f912d
|
@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.3.73"
|
VERSION = "1.3.3.74"
|
||||||
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)
|
||||||
|
|
|
@ -12,6 +12,20 @@ class xrange(object):
|
||||||
Advanced (re)implementation of xrange (supports slice/copy/etc.)
|
Advanced (re)implementation of xrange (supports slice/copy/etc.)
|
||||||
Reference: http://code.activestate.com/recipes/521885-a-pythonic-implementation-of-xrange/
|
Reference: http://code.activestate.com/recipes/521885-a-pythonic-implementation-of-xrange/
|
||||||
|
|
||||||
|
>>> list(xrange(1, 9)) == range(1, 9)
|
||||||
|
True
|
||||||
|
>>> list(xrange(8, 0, -16)) == range(8, 0, -16)
|
||||||
|
True
|
||||||
|
>>> list(xrange(0, 8, 16)) == range(0, 8, 16)
|
||||||
|
True
|
||||||
|
>>> list(xrange(0, 4, 5)) == range(0, 4, 5)
|
||||||
|
True
|
||||||
|
>>> list(xrange(4, 0, 3)) == range(4, 0, 3)
|
||||||
|
True
|
||||||
|
>>> list(xrange(0, -3)) == range(0, -3)
|
||||||
|
True
|
||||||
|
>>> list(xrange(0, 7, 2)) == range(0, 7, 2)
|
||||||
|
True
|
||||||
>>> foobar = xrange(1, 10)
|
>>> foobar = xrange(1, 10)
|
||||||
>>> 7 in foobar
|
>>> 7 in foobar
|
||||||
True
|
True
|
||||||
|
@ -60,7 +74,7 @@ class xrange(object):
|
||||||
return self._len()
|
return self._len()
|
||||||
|
|
||||||
def _len(self):
|
def _len(self):
|
||||||
return max(0, int((self.stop - self.start) // self.step))
|
return max(0, 1 + int((self.stop - 1 - self.start) // self.step))
|
||||||
|
|
||||||
def __contains__(self, value):
|
def __contains__(self, value):
|
||||||
return (self.start <= value < self.stop) and (value - self.start) % self.step == 0
|
return (self.start <= value < self.stop) and (value - self.start) % self.step == 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user