Skip to content

Commit bf2d3a5

Browse files
committed
Minor fine tuning
1 parent 0e74e43 commit bf2d3a5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

data/txt/sha256sums.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ eed1db5da17eca4c65a8f999166e2246eef84397687ae820bbe4984ef65a09df extra/vulnserv
165165
49bcd74281297c79a6ae5d4b0d1479ddace4476fddaf4383ca682a6977b553e3 lib/controller/handler.py
166166
4608f21a4333c162ab3c266c903fda4793cc5834de30d06affe9b7566dd09811 lib/controller/__init__.py
167167
ac44a343947162532dbf17bd1f9ab424f8008f677367c5ad3f9f7b715a679818 lib/core/agent.py
168-
c9cba7319fa56f65f9eaff27e31c251cd36e9b85b17003b88a8af0ea7da8c933 lib/core/bigarray.py
168+
86a9cb82c7e7beb4730264dae20bf3b7cd87c0dcaee587367362cf319f7bb079 lib/core/bigarray.py
169169
f6062e324fdeaacf9df0a289fc3f12f755143e3876a70cb65b38aa2e690f73c1 lib/core/common.py
170170
11c748cc96ea2bc507bc6c1930a17fe4bc6fdd2dd2a80430df971cb21428eb00 lib/core/compat.py
171171
39ea62d4224be860befeffb3843c150f2343b64555ad8c438a400222056f6cc0 lib/core/convert.py
@@ -188,7 +188,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
188188
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
189189
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
190190
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
191-
daadf9a51c1d224f225a372a29b263484e0982f8e91eec1ccc601911c8906514 lib/core/settings.py
191+
c42265c888448e115be0ea6ba6fdc86c86cbd00cdbc3a635c21b2a06949920d6 lib/core/settings.py
192192
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
193193
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
194194
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py

lib/core/bigarray.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class BigArray(list):
6666
"""
6767
List-like class used for storing large amounts of data (disk cached)
6868
69-
>>> _ = BigArray(xrange(100000))
69+
>>> _ = BigArray(xrange(100000), chunk_size=500 * 1024)
7070
>>> _[20] = 0
7171
>>> _[-1] = 999
7272
>>> _[99999]
@@ -97,14 +97,15 @@ class BigArray(list):
9797
100000
9898
"""
9999

100-
def __init__(self, items=None):
100+
def __init__(self, items=None, chunk_size=BIGARRAY_CHUNK_SIZE):
101101
self.chunks = [[]]
102102
self.chunk_length = sys.maxsize
103103
self.cache = None
104104
self.filenames = set()
105105
self._lock = threading.Lock()
106106
self._os_remove = os.remove
107107
self._size_counter = 0
108+
self._chunk_size = chunk_size
108109

109110
for item in (items or []):
110111
self.append(item)
@@ -129,7 +130,7 @@ def append(self, value):
129130

130131
if self.chunk_length == sys.maxsize:
131132
self._size_counter += _size_of(value)
132-
if self._size_counter >= BIGARRAY_CHUNK_SIZE:
133+
if self._size_counter >= self._chunk_size:
133134
self.chunk_length = len(self.chunks[-1])
134135
self._size_counter = None
135136

lib/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.9.12.31"
22+
VERSION = "1.9.12.32"
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)
@@ -655,7 +655,7 @@
655655
ROTATING_CHARS = ('\\', '|', '|', '/', '-')
656656

657657
# Approximate chunk length (in bytes) used by BigArray objects (only last chunk and cached one are held in memory)
658-
BIGARRAY_CHUNK_SIZE = 1024 * 1024
658+
BIGARRAY_CHUNK_SIZE = 32 * 1024 * 1024
659659

660660
# Compress level used for storing BigArray chunks to disk (0-9)
661661
BIGARRAY_COMPRESS_LEVEL = 4

0 commit comments

Comments
 (0)