mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Fixes #4471
This commit is contained in:
parent
5bf52c3f9c
commit
7e675fed9f
|
@ -8,6 +8,8 @@ See the file 'LICENSE' for copying permission
|
|||
import codecs
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
|
||||
import lib.controller.checks
|
||||
import lib.core.common
|
||||
|
@ -30,6 +32,7 @@ from lib.core.common import singleTimeWarnMessage
|
|||
from lib.core.compat import xrange
|
||||
from lib.core.convert import stdoutEncode
|
||||
from lib.core.data import conf
|
||||
from lib.core.enums import PLACE
|
||||
from lib.core.option import _setHTTPHandlers
|
||||
from lib.core.option import setVerbosity
|
||||
from lib.core.settings import IS_WIN
|
||||
|
@ -77,6 +80,10 @@ def dirtyPatches():
|
|||
# to prevent too much "guessing" in case of binary data retrieval
|
||||
thirdparty.chardet.universaldetector.MINIMUM_THRESHOLD = 0.90
|
||||
|
||||
match = re.search(r" --method[= ](\w+)", " ".join(sys.argv))
|
||||
if match and match.group(1).upper() != PLACE.POST:
|
||||
PLACE.CUSTOM_POST = PLACE.CUSTOM_POST.replace("POST", "%s (body)" % match.group(1))
|
||||
|
||||
# https://github.com/sqlmapproject/sqlmap/issues/4314
|
||||
try:
|
||||
os.urandom(1)
|
||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.4.12.21"
|
||||
VERSION = "1.4.12.22"
|
||||
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)
|
||||
|
|
|
@ -64,6 +64,7 @@ from lib.core.compat import xrange
|
|||
from lib.core.convert import getBytes
|
||||
from lib.core.convert import getText
|
||||
from lib.core.convert import getUnicode
|
||||
from lib.core.data import cmdLineOptions
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -520,9 +521,9 @@ class Connect(object):
|
|||
|
||||
logger.log(CUSTOM_LOGGING.TRAFFIC_OUT, requestMsg)
|
||||
else:
|
||||
if method and method not in (HTTPMETHOD.GET, HTTPMETHOD.POST):
|
||||
if target and cmdLineOptions.method or method and method not in (HTTPMETHOD.GET, HTTPMETHOD.POST):
|
||||
req = MethodRequest(url, post, headers)
|
||||
req.set_method(method)
|
||||
req.set_method(cmdLineOptions.method or method)
|
||||
elif url is not None:
|
||||
req = _urllib.request.Request(url, post, headers)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user