mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor drei stuff
This commit is contained in:
parent
43eedb63a8
commit
33c110ac39
|
@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.4.44"
|
VERSION = "1.3.4.45"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -74,7 +74,6 @@ def vulnTest():
|
||||||
):
|
):
|
||||||
output = shellExec("python %s -u http://%s:%d/?id=1 --batch %s" % (os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py"), address, port, options))
|
output = shellExec("python %s -u http://%s:%d/?id=1 --batch %s" % (os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py"), address, port, options))
|
||||||
if not all(check in output for check in checks):
|
if not all(check in output for check in checks):
|
||||||
print output
|
|
||||||
retVal = False
|
retVal = False
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
9
thirdparty/multipart/multipartpost.py
vendored
9
thirdparty/multipart/multipartpost.py
vendored
|
@ -25,11 +25,10 @@ import mimetypes
|
||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
import sys
|
import sys
|
||||||
import urllib
|
|
||||||
import urllib2
|
|
||||||
|
|
||||||
from lib.core.compat import choose_boundary
|
from lib.core.compat import choose_boundary
|
||||||
from lib.core.exception import SqlmapDataException
|
from lib.core.exception import SqlmapDataException
|
||||||
|
from thirdparty.six.moves import urllib as _urllib
|
||||||
|
|
||||||
class Callable:
|
class Callable:
|
||||||
def __init__(self, anycallable):
|
def __init__(self, anycallable):
|
||||||
|
@ -40,8 +39,8 @@ class Callable:
|
||||||
doseq = 1
|
doseq = 1
|
||||||
|
|
||||||
|
|
||||||
class MultipartPostHandler(urllib2.BaseHandler):
|
class MultipartPostHandler(_urllib.request.BaseHandler):
|
||||||
handler_order = urllib2.HTTPHandler.handler_order - 10 # needs to run first
|
handler_order = _urllib.request.HTTPHandler.handler_order - 10 # needs to run first
|
||||||
|
|
||||||
def http_request(self, request):
|
def http_request(self, request):
|
||||||
data = request.get_data()
|
data = request.get_data()
|
||||||
|
@ -61,7 +60,7 @@ class MultipartPostHandler(urllib2.BaseHandler):
|
||||||
raise SqlmapDataException("not a valid non-string sequence or mapping object '%s'" % traceback)
|
raise SqlmapDataException("not a valid non-string sequence or mapping object '%s'" % traceback)
|
||||||
|
|
||||||
if len(v_files) == 0:
|
if len(v_files) == 0:
|
||||||
data = urllib.urlencode(v_vars, doseq)
|
data = _urllib.parse.urlencode(v_vars, doseq)
|
||||||
else:
|
else:
|
||||||
boundary, data = self.multipart_encode(v_vars, v_files)
|
boundary, data = self.multipart_encode(v_vars, v_files)
|
||||||
contenttype = "multipart/form-data; boundary=%s" % boundary
|
contenttype = "multipart/form-data; boundary=%s" % boundary
|
||||||
|
|
Loading…
Reference in New Issue
Block a user