mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-17 03:50:42 +03:00
Minor refactoring
This commit is contained in:
parent
5d6b972002
commit
cb1b5d30fd
|
@ -52,7 +52,7 @@ class BigArray(list):
|
||||||
List-like class used for storing large amounts of data (disk cached)
|
List-like class used for storing large amounts of data (disk cached)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, items=[]):
|
||||||
self.chunks = [[]]
|
self.chunks = [[]]
|
||||||
self.chunk_length = sys.maxint
|
self.chunk_length = sys.maxint
|
||||||
self.cache = None
|
self.cache = None
|
||||||
|
@ -60,6 +60,9 @@ class BigArray(list):
|
||||||
self._os_remove = os.remove
|
self._os_remove = os.remove
|
||||||
self._size_counter = 0
|
self._size_counter = 0
|
||||||
|
|
||||||
|
for item in items:
|
||||||
|
self.append(item)
|
||||||
|
|
||||||
def append(self, value):
|
def append(self, value):
|
||||||
self.chunks[-1].append(value)
|
self.chunks[-1].append(value)
|
||||||
|
|
||||||
|
@ -136,15 +139,10 @@ class BigArray(list):
|
||||||
self.chunks, self.filenames = state
|
self.chunks, self.filenames = state
|
||||||
|
|
||||||
def __getslice__(self, i, j):
|
def __getslice__(self, i, j):
|
||||||
retval = BigArray()
|
|
||||||
|
|
||||||
i = max(0, len(self) + i if i < 0 else i)
|
i = max(0, len(self) + i if i < 0 else i)
|
||||||
j = min(len(self), len(self) + j if j < 0 else j)
|
j = min(len(self), len(self) + j if j < 0 else j)
|
||||||
|
|
||||||
for _ in xrange(i, j):
|
return BigArray(self[_] for _ in xrange(i, j))
|
||||||
retval.append(self[_])
|
|
||||||
|
|
||||||
return retval
|
|
||||||
|
|
||||||
def __getitem__(self, y):
|
def __getitem__(self, y):
|
||||||
if y < 0:
|
if y < 0:
|
||||||
|
|
|
@ -19,7 +19,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.1.12.12"
|
VERSION = "1.1.12.13"
|
||||||
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)
|
||||||
|
|
|
@ -26,7 +26,7 @@ c0c9a87e5829c76efc69067081edb8b1 lib/controller/checks.py
|
||||||
d2cdb9e832e18a81e936ca3348144b16 lib/controller/handler.py
|
d2cdb9e832e18a81e936ca3348144b16 lib/controller/handler.py
|
||||||
5fb9aaf874daa47ea2b672a22740e56b lib/controller/__init__.py
|
5fb9aaf874daa47ea2b672a22740e56b lib/controller/__init__.py
|
||||||
f8a7165253874a9ce0c6e0d089e5fb8c lib/core/agent.py
|
f8a7165253874a9ce0c6e0d089e5fb8c lib/core/agent.py
|
||||||
8d9d771f7e67582c56a96a8d0ccbe4fc lib/core/bigarray.py
|
9eccf8db8b8e259e30c1eade4ee499b0 lib/core/bigarray.py
|
||||||
d359917cd034d4d353cfd699bd201693 lib/core/common.py
|
d359917cd034d4d353cfd699bd201693 lib/core/common.py
|
||||||
54326d3a690f8b26fe5a5da1a589b369 lib/core/convert.py
|
54326d3a690f8b26fe5a5da1a589b369 lib/core/convert.py
|
||||||
90b1b08368ac8a859300e6fa6a8c796e lib/core/data.py
|
90b1b08368ac8a859300e6fa6a8c796e lib/core/data.py
|
||||||
|
@ -46,7 +46,7 @@ f872699e948d0692ce11b54781da814c lib/core/log.py
|
||||||
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
|
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
|
||||||
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
|
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
|
||||||
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
|
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
|
||||||
8b4e97576189f033d919e9642e423d73 lib/core/settings.py
|
e4e0634721ad8f7ad97e32519451e5f9 lib/core/settings.py
|
||||||
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
|
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
|
||||||
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
|
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
|
||||||
d93501771b41315f9fb949305b6ed257 lib/core/target.py
|
d93501771b41315f9fb949305b6ed257 lib/core/target.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user