File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 8
8
import codecs
9
9
import os
10
10
import random
11
+ import re
12
+ import sys
11
13
12
14
import lib .controller .checks
13
15
import lib .core .common
30
32
from lib .core .compat import xrange
31
33
from lib .core .convert import stdoutEncode
32
34
from lib .core .data import conf
35
+ from lib .core .enums import PLACE
33
36
from lib .core .option import _setHTTPHandlers
34
37
from lib .core .option import setVerbosity
35
38
from lib .core .settings import IS_WIN
@@ -77,6 +80,10 @@ def _(self, *args):
77
80
# to prevent too much "guessing" in case of binary data retrieval
78
81
thirdparty .chardet .universaldetector .MINIMUM_THRESHOLD = 0.90
79
82
83
+ match = re .search (r" --method[= ](\w+)" , " " .join (sys .argv ))
84
+ if match and match .group (1 ).upper () != PLACE .POST :
85
+ PLACE .CUSTOM_POST = PLACE .CUSTOM_POST .replace ("POST" , "%s (body)" % match .group (1 ))
86
+
80
87
# https://github.com/sqlmapproject/sqlmap/issues/4314
81
88
try :
82
89
os .urandom (1 )
Original file line number Diff line number Diff line change 18
18
from thirdparty .six import unichr as _unichr
19
19
20
20
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21
- VERSION = "1.4.12.21 "
21
+ VERSION = "1.4.12.22 "
22
22
TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
23
23
TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
24
24
VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ class WebSocketException(Exception):
64
64
from lib .core .convert import getBytes
65
65
from lib .core .convert import getText
66
66
from lib .core .convert import getUnicode
67
+ from lib .core .data import cmdLineOptions
67
68
from lib .core .data import conf
68
69
from lib .core .data import kb
69
70
from lib .core .data import logger
@@ -520,9 +521,9 @@ class _(dict):
520
521
521
522
logger .log (CUSTOM_LOGGING .TRAFFIC_OUT , requestMsg )
522
523
else :
523
- if method and method not in (HTTPMETHOD .GET , HTTPMETHOD .POST ):
524
+ if target and cmdLineOptions . method or method and method not in (HTTPMETHOD .GET , HTTPMETHOD .POST ):
524
525
req = MethodRequest (url , post , headers )
525
- req .set_method (method )
526
+ req .set_method (cmdLineOptions . method or method )
526
527
elif url is not None :
527
528
req = _urllib .request .Request (url , post , headers )
528
529
else :
You can’t perform that action at this time.
0 commit comments