mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-09 08:09:01 +00:00
Minor patches
This commit is contained in:
@@ -295,7 +295,11 @@ def getBytes(value, encoding=None, errors="strict", unsafe=True):
|
||||
except (LookupError, TypeError):
|
||||
encoding = UNICODE_ENCODING
|
||||
|
||||
if isinstance(value, six.text_type):
|
||||
if isinstance(value, bytearray):
|
||||
return bytes(value)
|
||||
elif isinstance(value, memoryview):
|
||||
return value.tobytes()
|
||||
elif isinstance(value, six.text_type):
|
||||
if INVALID_UNICODE_PRIVATE_AREA:
|
||||
if unsafe:
|
||||
for char in xrange(0xF0000, 0xF00FF + 1):
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.1.9"
|
||||
VERSION = "1.10.1.10"
|
||||
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)
|
||||
|
||||
@@ -75,7 +75,7 @@ class Popen(subprocess.Popen):
|
||||
def recv_err(self, maxsize=None):
|
||||
return self._recv('stderr', maxsize)
|
||||
|
||||
def send_recv(self, input='', maxsize=None):
|
||||
def send_recv(self, input=b'', maxsize=None):
|
||||
return self.send(input), self.recv(maxsize), self.recv_err(maxsize)
|
||||
|
||||
def get_conn_maxsize(self, which, maxsize):
|
||||
@@ -97,7 +97,7 @@ class Popen(subprocess.Popen):
|
||||
try:
|
||||
x = msvcrt.get_osfhandle(self.stdin.fileno())
|
||||
(_, written) = WriteFile(x, input)
|
||||
except ValueError:
|
||||
except (ValueError, NameError):
|
||||
return self._close('stdin')
|
||||
except Exception as ex:
|
||||
if getattr(ex, "args", None) and ex.args[0] in (109, errno.ESHUTDOWN):
|
||||
@@ -187,7 +187,7 @@ def recv_some(p, t=.1, e=1, tr=5, stderr=0):
|
||||
y.append(r)
|
||||
else:
|
||||
time.sleep(max((x - time.time()) / tr, 0))
|
||||
return b''.join(y)
|
||||
return b''.join(getBytes(i) for i in y)
|
||||
|
||||
def send_all(p, data):
|
||||
if not data:
|
||||
|
||||
Reference in New Issue
Block a user