Couple of DREI updates

This commit is contained in:
Miroslav Stampar
2019-05-03 15:33:32 +02:00
parent 74148e121a
commit 585ebca401
8 changed files with 37 additions and 35 deletions

View File

@@ -4108,8 +4108,8 @@ def asciifyUrl(url, forceQuote=False):
# Reference: http://blog.elsdoerfer.name/2008/12/12/opening-iris-in-python/
>>> asciifyUrl(u'http://www.\\u0161u\\u0107uraj.com') == u'http://www.xn--uuraj-gxa24d.com'
True
>>> asciifyUrl(u'http://www.\\u0161u\\u0107uraj.com')
'http://www.xn--uuraj-gxa24d.com'
"""
parts = _urllib.parse.urlsplit(url)

View File

@@ -204,5 +204,7 @@ def round(x, d=0):
if sys.version_info >= (3, 0):
xrange = range
buffer = memoryview
else:
xrange = xrange
buffer = buffer

View File

@@ -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.13"
VERSION = "1.3.5.14"
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)

View File

@@ -10,6 +10,7 @@ import os
import subprocess
import time
from lib.core.compat import buffer
from lib.core.settings import IS_WIN
if IS_WIN:
@@ -26,7 +27,7 @@ else:
def blockingReadFromFD(fd):
# Quick twist around original Twisted function
# Blocking read from a non-blocking file descriptor
output = ""
output = b""
while True:
try:
@@ -183,7 +184,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 ''.join(y)
return b''.join(y)
def send_all(p, data):
if not data:
@@ -193,4 +194,4 @@ def send_all(p, data):
sent = p.send(data)
if not isinstance(sent, int):
break
data = buffer(data, sent)
data = buffer(data[sent:])