Skip to content

Commit cb1b5d3

Browse files
committed
Minor refactoring
1 parent 5d6b972 commit cb1b5d3

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

lib/core/bigarray.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,17 @@ class BigArray(list):
5252
List-like class used for storing large amounts of data (disk cached)
5353
"""
5454

55-
def __init__(self):
55+
def __init__(self, items=[]):
5656
self.chunks = [[]]
5757
self.chunk_length = sys.maxint
5858
self.cache = None
5959
self.filenames = set()
6060
self._os_remove = os.remove
6161
self._size_counter = 0
6262

63+
for item in items:
64+
self.append(item)
65+
6366
def append(self, value):
6467
self.chunks[-1].append(value)
6568

@@ -136,15 +139,10 @@ def __setstate__(self, state):
136139
self.chunks, self.filenames = state
137140

138141
def __getslice__(self, i, j):
139-
retval = BigArray()
140-
141142
i = max(0, len(self) + i if i < 0 else i)
142143
j = min(len(self), len(self) + j if j < 0 else j)
143144

144-
for _ in xrange(i, j):
145-
retval.append(self[_])
146-
147-
return retval
145+
return BigArray(self[_] for _ in xrange(i, j))
148146

149147
def __getitem__(self, y):
150148
if y < 0:

lib/core/settings.py

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

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

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ c0c9a87e5829c76efc69067081edb8b1 lib/controller/checks.py
2626
d2cdb9e832e18a81e936ca3348144b16 lib/controller/handler.py
2727
5fb9aaf874daa47ea2b672a22740e56b lib/controller/__init__.py
2828
f8a7165253874a9ce0c6e0d089e5fb8c lib/core/agent.py
29-
8d9d771f7e67582c56a96a8d0ccbe4fc lib/core/bigarray.py
29+
9eccf8db8b8e259e30c1eade4ee499b0 lib/core/bigarray.py
3030
d359917cd034d4d353cfd699bd201693 lib/core/common.py
3131
54326d3a690f8b26fe5a5da1a589b369 lib/core/convert.py
3232
90b1b08368ac8a859300e6fa6a8c796e lib/core/data.py
@@ -46,7 +46,7 @@ f872699e948d0692ce11b54781da814c lib/core/log.py
4646
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
4747
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
4848
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
49-
8b4e97576189f033d919e9642e423d73 lib/core/settings.py
49+
e4e0634721ad8f7ad97e32519451e5f9 lib/core/settings.py
5050
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
5151
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
5252
d93501771b41315f9fb949305b6ed257 lib/core/target.py

0 commit comments

Comments
 (0)