mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-01 20:39:03 +00:00
Couple of drei patches
This commit is contained in:
@@ -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.41"
|
||||
VERSION = "1.3.5.42"
|
||||
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)
|
||||
|
||||
@@ -803,7 +803,7 @@ class Connect(object):
|
||||
responseMsg += "[#%d] (%s %s):\r\n" % (threadData.lastRequestUID, code, status)
|
||||
|
||||
if responseHeaders:
|
||||
logHeaders = getUnicode("".join(responseHeaders.headers).strip() if six.PY2 else responseHeaders.__bytes__())
|
||||
logHeaders = getUnicode("".join(responseHeaders.headers).strip())
|
||||
|
||||
logHTTPTraffic(requestMsg, "%s%s\r\n\r\n%s" % (responseMsg, logHeaders, (page or "")[:MAX_CONNECTION_CHUNK_SIZE]), start, time.time())
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
import functools
|
||||
import os
|
||||
import random
|
||||
import shutil
|
||||
@@ -14,6 +15,7 @@ import string
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.compat import xrange
|
||||
from lib.core.data import logger
|
||||
from thirdparty import six
|
||||
|
||||
def purge(directory):
|
||||
"""
|
||||
@@ -66,7 +68,10 @@ def purge(directory):
|
||||
except:
|
||||
pass
|
||||
|
||||
dirpaths.sort(cmp=lambda x, y: y.count(os.path.sep) - x.count(os.path.sep))
|
||||
if six.PY2:
|
||||
dirpaths.sort(cmp=lambda x, y: y.count(os.path.sep) - x.count(os.path.sep))
|
||||
else:
|
||||
dirpaths.sort(key=functools.cmp_to_key(lambda x, y: y.count(os.path.sep) - x.count(os.path.sep)))
|
||||
|
||||
logger.debug("renaming directory names to random values")
|
||||
for dirpath in dirpaths:
|
||||
|
||||
Reference in New Issue
Block a user