Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f4d1e7

Browse files
committed
Minor update
1 parent a33ee69 commit 0f4d1e7

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

extra/shutils/drei.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
# unset SQLMAP_DREI
1111
# source `dirname "$0"`"/junk.sh"
1212

13-
for i in $(find . -iname "*.py" | grep -v __init__); do pylint --py3k $i; done
13+
for i in $(find . -iname "*.py" | grep -v __init__); do timeout 10 pylint --py3k $i; done 2>&1 | grep -v -E 'absolute_import|No config file'

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty import six
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.5.7"
21+
VERSION = "1.3.5.8"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/parse/cmdline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from lib.core.common import checkSystemEncoding
2222
from lib.core.common import dataToStdout
2323
from lib.core.common import expandMnemonics
24+
from lib.core.common import getSafeExString
2425
from lib.core.common import getUnicode
2526
from lib.core.compat import xrange
2627
from lib.core.data import cmdLineOptions
@@ -836,7 +837,7 @@ def _(self, *args):
836837
for arg in shlex.split(command):
837838
argv.append(getUnicode(arg, encoding=sys.stdin.encoding))
838839
except ValueError as ex:
839-
raise SqlmapSyntaxException("something went wrong during command line parsing ('%s')" % ex.message)
840+
raise SqlmapSyntaxException("something went wrong during command line parsing ('%s')" % getSafeExString(ex))
840841

841842
for i in xrange(len(argv)):
842843
if argv[i] == "-hh":

thirdparty/multipart/multipartpost.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import stat
2727
import sys
2828

29+
from lib.core.common import getBytes
2930
from lib.core.compat import choose_boundary
3031
from lib.core.exception import SqlmapDataException
3132
from thirdparty.six.moves import urllib as _urllib
@@ -51,7 +52,7 @@ def http_request(self, request):
5152

5253
try:
5354
for(key, value) in data.items():
54-
if isinstance(value, file) or hasattr(value, "file") or isinstance(value, io.IOBase):
55+
if hasattr(value, "fileno") or hasattr(value, "file") or isinstance(value, io.IOBase):
5556
v_files.append((key, value))
5657
else:
5758
v_vars.append((key, value))
@@ -85,7 +86,7 @@ def multipart_encode(vars, files, boundary=None, buf=None):
8586
buf += "\r\n\r\n" + value + "\r\n"
8687

8788
for (key, fd) in files:
88-
file_size = os.fstat(fd.fileno())[stat.ST_SIZE] if isinstance(fd, file) else fd.len
89+
file_size = os.fstat(fd.fileno())[stat.ST_SIZE] if hasattr(fd, "fileno") else fd.len
8990
filename = fd.name.split("/")[-1] if "/" in fd.name else fd.name.split("\\")[-1]
9091
try:
9192
contenttype = mimetypes.guess_type(filename)[0] or "application/octet-stream"
@@ -98,8 +99,8 @@ def multipart_encode(vars, files, boundary=None, buf=None):
9899
# buf += "Content-Length: %s\r\n" % file_size
99100
fd.seek(0)
100101

101-
buf = str(buf) if not isinstance(buf, unicode) else buf.encode("utf8")
102-
buf += "\r\n%s\r\n" % fd.read()
102+
buf = getBytes(buf)
103+
buf += b"\r\n%s\r\n" % fd.read()
103104

104105
buf += "--%s--\r\n\r\n" % boundary
105106

0 commit comments

Comments
 (0)