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

Skip to content

Commit f82f1f9

Browse files
committed
Bug fix
1 parent 015984a commit f82f1f9

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from lib.core.enums import OS
1818

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

lib/utils/xrange.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ class xrange(object):
1212
Advanced (re)implementation of xrange (supports slice/copy/etc.)
1313
Reference: http://code.activestate.com/recipes/521885-a-pythonic-implementation-of-xrange/
1414
15+
>>> list(xrange(1, 9)) == range(1, 9)
16+
True
17+
>>> list(xrange(8, 0, -16)) == range(8, 0, -16)
18+
True
19+
>>> list(xrange(0, 8, 16)) == range(0, 8, 16)
20+
True
21+
>>> list(xrange(0, 4, 5)) == range(0, 4, 5)
22+
True
23+
>>> list(xrange(4, 0, 3)) == range(4, 0, 3)
24+
True
25+
>>> list(xrange(0, -3)) == range(0, -3)
26+
True
27+
>>> list(xrange(0, 7, 2)) == range(0, 7, 2)
28+
True
1529
>>> foobar = xrange(1, 10)
1630
>>> 7 in foobar
1731
True
@@ -60,7 +74,7 @@ def __len__(self):
6074
return self._len()
6175

6276
def _len(self):
63-
return max(0, int((self.stop - self.start) // self.step))
77+
return max(0, 1 + int((self.stop - 1 - self.start) // self.step))
6478

6579
def __contains__(self, value):
6680
return (self.start <= value < self.stop) and (value - self.start) % self.step == 0

0 commit comments

Comments
 (0)