mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Using cPickle in BigArray (faster and potentially less memory used)
This commit is contained in:
parent
8dac47f7e5
commit
9f21406a4b
|
@ -5,8 +5,12 @@ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
|
||||||
See the file 'doc/COPYING' for copying permission
|
See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
import cPickle as pickle
|
||||||
|
except:
|
||||||
|
import pickle
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pickle
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
|
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
|
||||||
|
@ -62,7 +66,7 @@ class BigArray(list):
|
||||||
self.filenames.add(filename)
|
self.filenames.add(filename)
|
||||||
os.close(handle)
|
os.close(handle)
|
||||||
with open(filename, "w+b") as fp:
|
with open(filename, "w+b") as fp:
|
||||||
pickle.dump(value, fp)
|
pickle.dump(value, fp, pickle.HIGHEST_PROTOCOL)
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
def _checkcache(self, index):
|
def _checkcache(self, index):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user