mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Couple of DREI patches
This commit is contained in:
@@ -614,7 +614,7 @@ class Dump(object):
|
||||
if len(value) > MIN_BINARY_DISK_DUMP_SIZE and r'\x' in value:
|
||||
try:
|
||||
mimetype = magic.from_buffer(value, mime=True)
|
||||
if any(mimetype.startswith(_) for _ in ("application", "image")):
|
||||
if any(mimetype.startswith(_) for _ in (b"application", b"image")):
|
||||
if not os.path.isdir(dumpDbPath):
|
||||
os.makedirs(dumpDbPath)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.5.39"
|
||||
VERSION = "1.3.5.40"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
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)
|
||||
|
||||
@@ -12,6 +12,7 @@ import time
|
||||
|
||||
from lib.core.compat import buffer
|
||||
from lib.core.settings import IS_WIN
|
||||
from thirdparty import six
|
||||
|
||||
if IS_WIN:
|
||||
try:
|
||||
@@ -97,7 +98,7 @@ class Popen(subprocess.Popen):
|
||||
except ValueError:
|
||||
return self._close('stdin')
|
||||
except (subprocess.pywintypes.error, Exception) as ex:
|
||||
if ex[0] in (109, errno.ESHUTDOWN):
|
||||
if (ex[0] if six.PY2 else ex.errno) in (109, errno.ESHUTDOWN):
|
||||
return self._close('stdin')
|
||||
raise
|
||||
|
||||
@@ -118,7 +119,7 @@ class Popen(subprocess.Popen):
|
||||
except (ValueError, NameError):
|
||||
return self._close(which)
|
||||
except (subprocess.pywintypes.error, Exception) as ex:
|
||||
if ex[0] in (109, errno.ESHUTDOWN):
|
||||
if (ex[0] if six.PY2 else ex.errno) in (109, errno.ESHUTDOWN):
|
||||
return self._close(which)
|
||||
raise
|
||||
|
||||
@@ -136,7 +137,7 @@ class Popen(subprocess.Popen):
|
||||
try:
|
||||
written = os.write(self.stdin.fileno(), input)
|
||||
except OSError as ex:
|
||||
if ex[0] == errno.EPIPE: # broken pipe
|
||||
if (ex[0] if six.PY2 else ex.errno) == errno.EPIPE: # broken pipe
|
||||
return self._close('stdin')
|
||||
raise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user