mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-30 03:19:04 +00:00
Trivial modifications (thou shalt not judge people by trivial commits)
This commit is contained in:
@@ -1562,7 +1562,6 @@ def checkConnection(suppressOutput=False):
|
||||
else:
|
||||
kb.errorIsNone = True
|
||||
|
||||
|
||||
threadData = getCurrentThreadData()
|
||||
|
||||
if kb.redirectChoice == REDIRECTION.YES and threadData.lastRedirectURL and threadData.lastRedirectURL[0] == threadData.lastRequestUID:
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.2.5.0"
|
||||
VERSION = "1.2.5.1"
|
||||
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)
|
||||
|
||||
@@ -13,7 +13,6 @@ from lib.core.data import kb
|
||||
from lib.core.data import paths
|
||||
from lib.parse.handler import FingerprintHandler
|
||||
|
||||
|
||||
def headersParser(headers):
|
||||
"""
|
||||
This function calls a class that parses the input HTTP headers to
|
||||
|
||||
@@ -120,7 +120,6 @@ from lib.request.methodrequest import MethodRequest
|
||||
from thirdparty.odict.odict import OrderedDict
|
||||
from thirdparty.socks.socks import ProxyError
|
||||
|
||||
|
||||
class Connect(object):
|
||||
"""
|
||||
This class defines methods used to perform HTTP requests
|
||||
|
||||
@@ -27,7 +27,6 @@ from lib.takeover.udf import UDF
|
||||
from lib.takeover.web import Web
|
||||
from lib.takeover.xp_cmdshell import XP_cmdshell
|
||||
|
||||
|
||||
class Abstraction(Web, UDF, XP_cmdshell):
|
||||
"""
|
||||
This class defines an abstraction layer for OS takeover functionalities
|
||||
|
||||
@@ -53,7 +53,6 @@ from lib.core.settings import VIEWSTATE_REGEX
|
||||
from lib.request.connect import Connect as Request
|
||||
from thirdparty.oset.pyoset import oset
|
||||
|
||||
|
||||
class Web:
|
||||
"""
|
||||
This class defines web-oriented OS takeover functionalities for
|
||||
|
||||
@@ -14,7 +14,6 @@ from lib.core.dicts import FROM_DUMMY_TABLE
|
||||
from lib.core.exception import SqlmapNotVulnerableException
|
||||
from lib.techniques.dns.use import dnsUse
|
||||
|
||||
|
||||
def dnsTest(payload):
|
||||
logger.info("testing for data retrieval through DNS channel")
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ from lib.core.settings import PARTIAL_VALUE_MARKER
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.request.connect import Connect as Request
|
||||
|
||||
|
||||
def dnsUse(payload, expression):
|
||||
"""
|
||||
Retrieve the output of a SQL query taking advantage of the DNS
|
||||
|
||||
@@ -104,9 +104,7 @@ class Database(object):
|
||||
|
||||
def init(self):
|
||||
self.execute("CREATE TABLE logs(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, time TEXT, level TEXT, message TEXT)")
|
||||
|
||||
self.execute("CREATE TABLE data(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, status INTEGER, content_type INTEGER, value TEXT)")
|
||||
|
||||
self.execute("CREATE TABLE errors(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, error TEXT)")
|
||||
|
||||
class Task(object):
|
||||
@@ -199,7 +197,6 @@ class Task(object):
|
||||
def engine_has_terminated(self):
|
||||
return isinstance(self.engine_get_returncode(), int)
|
||||
|
||||
|
||||
# Wrapper functions for sqlmap engine
|
||||
class StdDbOut(object):
|
||||
def __init__(self, taskid, messagetype="stdout"):
|
||||
@@ -573,7 +570,6 @@ def scan_data(taskid):
|
||||
logger.debug("[%s] Retrieved scan data and error messages" % taskid)
|
||||
return jsonize({"success": True, "data": json_data_message, "error": json_errors_message})
|
||||
|
||||
|
||||
# Functions to handle scans' logs
|
||||
@get("/scan/<taskid>/log/<start>/<end>")
|
||||
def scan_log_limited(taskid, start, end):
|
||||
@@ -601,7 +597,6 @@ def scan_log_limited(taskid, start, end):
|
||||
logger.debug("[%s] Retrieved scan log messages subset" % taskid)
|
||||
return jsonize({"success": True, "log": json_log_messages})
|
||||
|
||||
|
||||
@get("/scan/<taskid>/log")
|
||||
def scan_log(taskid):
|
||||
"""
|
||||
@@ -621,7 +616,6 @@ def scan_log(taskid):
|
||||
logger.debug("[%s] Retrieved scan log messages" % taskid)
|
||||
return jsonize({"success": True, "log": json_log_messages})
|
||||
|
||||
|
||||
# Function to handle files inside the output directory
|
||||
@get("/download/<taskid>/<target>/<filename:path>")
|
||||
def download(taskid, target, filename):
|
||||
@@ -648,7 +642,6 @@ def download(taskid, target, filename):
|
||||
logger.warning("[%s] File does not exist %s" % (taskid, target))
|
||||
return jsonize({"success": False, "message": "File does not exist"})
|
||||
|
||||
|
||||
def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=RESTAPI_DEFAULT_ADAPTER, username=None, password=None):
|
||||
"""
|
||||
REST-JSON API server
|
||||
|
||||
@@ -22,7 +22,6 @@ class _Getch(object):
|
||||
def __call__(self):
|
||||
return self.impl()
|
||||
|
||||
|
||||
class _GetchUnix(object):
|
||||
def __init__(self):
|
||||
__import__("tty")
|
||||
@@ -41,7 +40,6 @@ class _GetchUnix(object):
|
||||
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
|
||||
return ch
|
||||
|
||||
|
||||
class _GetchWindows(object):
|
||||
def __init__(self):
|
||||
__import__("msvcrt")
|
||||
@@ -50,7 +48,6 @@ class _GetchWindows(object):
|
||||
import msvcrt
|
||||
return msvcrt.getch()
|
||||
|
||||
|
||||
class _GetchMacCarbon(object):
|
||||
"""
|
||||
A function which returns the current ASCII key that is down;
|
||||
@@ -79,5 +76,4 @@ class _GetchMacCarbon(object):
|
||||
(what, msg, when, where, mod) = Carbon.Evt.GetNextEvent(0x0008)[1]
|
||||
return chr(msg & 0x000000FF)
|
||||
|
||||
|
||||
getch = _Getch()
|
||||
|
||||
@@ -36,7 +36,6 @@ from lib.core.settings import UNICODE_ENCODING
|
||||
from lib.request.basic import decodePage
|
||||
from thirdparty.socks import socks
|
||||
|
||||
|
||||
def _search(dork):
|
||||
"""
|
||||
This method performs the effective search on Google providing
|
||||
|
||||
Reference in New Issue
Block a user