Making sqlmap compatible with PyPy/PyPy3

This commit is contained in:
Miroslav Stampar 2021-05-24 13:49:35 +02:00
parent da86486cd9
commit c4c1571902
4 changed files with 7 additions and 3 deletions

View File

@ -22,7 +22,10 @@ from lib.core.exception import SqlmapSystemException
from lib.core.settings import BIGARRAY_CHUNK_SIZE from lib.core.settings import BIGARRAY_CHUNK_SIZE
from lib.core.settings import BIGARRAY_COMPRESS_LEVEL from lib.core.settings import BIGARRAY_COMPRESS_LEVEL
DEFAULT_SIZE_OF = sys.getsizeof(object()) try:
DEFAULT_SIZE_OF = sys.getsizeof(object())
except TypeError:
DEFAULT_SIZE_OF = 16
def _size_of(instance): def _size_of(instance):
""" """

View File

@ -2270,6 +2270,7 @@ def isMultiThreadMode():
""" """
Checks if running in multi-thread(ing) mode Checks if running in multi-thread(ing) mode
>>> import time
>>> isMultiThreadMode() >>> isMultiThreadMode()
False False
>>> _ = lambda: time.sleep(0.1) >>> _ = lambda: time.sleep(0.1)

View File

@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.5.5.7" VERSION = "1.5.5.8"
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)

View File

@ -351,7 +351,7 @@ def crypt_generic_passwd(password, salt, **kwargs):
'rl.3StKT.4T8M' 'rl.3StKT.4T8M'
""" """
return crypt(password, salt) return getText(crypt(password, salt))
def unix_md5_passwd(password, salt, magic="$1$", **kwargs): def unix_md5_passwd(password, salt, magic="$1$", **kwargs):
""" """