mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Implementation of #3156
This commit is contained in:
parent
72ff6e24ff
commit
27ff5d6fec
|
@ -1274,6 +1274,7 @@ def setPaths(rootPath):
|
||||||
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")
|
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")
|
||||||
|
|
||||||
# sqlmap files
|
# sqlmap files
|
||||||
|
paths.API_SHELL_HISTORY = os.path.join(_, "api.hst")
|
||||||
paths.OS_SHELL_HISTORY = os.path.join(_, "os.hst")
|
paths.OS_SHELL_HISTORY = os.path.join(_, "os.hst")
|
||||||
paths.SQL_SHELL_HISTORY = os.path.join(_, "sql.hst")
|
paths.SQL_SHELL_HISTORY = os.path.join(_, "sql.hst")
|
||||||
paths.SQLMAP_SHELL_HISTORY = os.path.join(_, "sqlmap.hst")
|
paths.SQLMAP_SHELL_HISTORY = os.path.join(_, "sqlmap.hst")
|
||||||
|
|
|
@ -382,6 +382,7 @@ class AUTOCOMPLETE_TYPE:
|
||||||
SQL = 0
|
SQL = 0
|
||||||
OS = 1
|
OS = 1
|
||||||
SQLMAP = 2
|
SQLMAP = 2
|
||||||
|
API = 3
|
||||||
|
|
||||||
class NOTE:
|
class NOTE:
|
||||||
FALSE_POSITIVE_OR_UNEXPLOITABLE = "false positive or unexploitable"
|
FALSE_POSITIVE_OR_UNEXPLOITABLE = "false positive or unexploitable"
|
||||||
|
|
|
@ -19,7 +19,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.2.6.32"
|
VERSION = "1.2.6.33"
|
||||||
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)
|
||||||
|
|
|
@ -60,6 +60,8 @@ def saveHistory(completion=None):
|
||||||
historyPath = paths.SQL_SHELL_HISTORY
|
historyPath = paths.SQL_SHELL_HISTORY
|
||||||
elif completion == AUTOCOMPLETE_TYPE.OS:
|
elif completion == AUTOCOMPLETE_TYPE.OS:
|
||||||
historyPath = paths.OS_SHELL_HISTORY
|
historyPath = paths.OS_SHELL_HISTORY
|
||||||
|
elif completion == AUTOCOMPLETE_TYPE.API:
|
||||||
|
historyPath = paths.API_SHELL_HISTORY
|
||||||
else:
|
else:
|
||||||
historyPath = paths.SQLMAP_SHELL_HISTORY
|
historyPath = paths.SQLMAP_SHELL_HISTORY
|
||||||
|
|
||||||
|
@ -86,6 +88,8 @@ def loadHistory(completion=None):
|
||||||
historyPath = paths.SQL_SHELL_HISTORY
|
historyPath = paths.SQL_SHELL_HISTORY
|
||||||
elif completion == AUTOCOMPLETE_TYPE.OS:
|
elif completion == AUTOCOMPLETE_TYPE.OS:
|
||||||
historyPath = paths.OS_SHELL_HISTORY
|
historyPath = paths.OS_SHELL_HISTORY
|
||||||
|
elif completion == AUTOCOMPLETE_TYPE.API:
|
||||||
|
historyPath = paths.API_SHELL_HISTORY
|
||||||
else:
|
else:
|
||||||
historyPath = paths.SQLMAP_SHELL_HISTORY
|
historyPath = paths.SQLMAP_SHELL_HISTORY
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ from lib.core.data import paths
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
from lib.core.datatype import AttribDict
|
from lib.core.datatype import AttribDict
|
||||||
from lib.core.defaults import _defaults
|
from lib.core.defaults import _defaults
|
||||||
|
from lib.core.enums import AUTOCOMPLETE_TYPE
|
||||||
from lib.core.enums import CONTENT_STATUS
|
from lib.core.enums import CONTENT_STATUS
|
||||||
from lib.core.enums import MKSTEMP_PREFIX
|
from lib.core.enums import MKSTEMP_PREFIX
|
||||||
from lib.core.enums import PART_RUN_CONTENT_TYPES
|
from lib.core.enums import PART_RUN_CONTENT_TYPES
|
||||||
|
@ -43,6 +44,10 @@ from lib.core.settings import RESTAPI_DEFAULT_ADAPTER
|
||||||
from lib.core.settings import IS_WIN
|
from lib.core.settings import IS_WIN
|
||||||
from lib.core.settings import RESTAPI_DEFAULT_ADDRESS
|
from lib.core.settings import RESTAPI_DEFAULT_ADDRESS
|
||||||
from lib.core.settings import RESTAPI_DEFAULT_PORT
|
from lib.core.settings import RESTAPI_DEFAULT_PORT
|
||||||
|
from lib.core.shell import autoCompletion
|
||||||
|
from lib.core.shell import clearHistory
|
||||||
|
from lib.core.shell import loadHistory
|
||||||
|
from lib.core.shell import saveHistory
|
||||||
from lib.core.subprocessng import Popen
|
from lib.core.subprocessng import Popen
|
||||||
from lib.parse.cmdline import cmdLineParser
|
from lib.parse.cmdline import cmdLineParser
|
||||||
from thirdparty.bottle.bottle import error as return_error
|
from thirdparty.bottle.bottle import error as return_error
|
||||||
|
@ -741,6 +746,9 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non
|
||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
commands = ("help", "new", "use", "data", "log", "status", "option", "stop", "kill", "list", "flush", "exit", "bye", "quit")
|
||||||
|
autoCompletion(AUTOCOMPLETE_TYPE.API, commands=commands)
|
||||||
|
|
||||||
taskid = None
|
taskid = None
|
||||||
logger.info("Type 'help' or '?' for list of available commands")
|
logger.info("Type 'help' or '?' for list of available commands")
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
|
||||||
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
|
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
|
||||||
0adf547455a76dc71e6a599e52da1ed9 lib/core/agent.py
|
0adf547455a76dc71e6a599e52da1ed9 lib/core/agent.py
|
||||||
fd8f239e259afaf5f24bcf34a0ad187f lib/core/bigarray.py
|
fd8f239e259afaf5f24bcf34a0ad187f lib/core/bigarray.py
|
||||||
e9ea20ebda48080ff80f4b87b0085e6c lib/core/common.py
|
6165b8a826803b29c479d47a60e8dbf6 lib/core/common.py
|
||||||
0d082da16c388b3445e656e0760fb582 lib/core/convert.py
|
0d082da16c388b3445e656e0760fb582 lib/core/convert.py
|
||||||
9f87391b6a3395f7f50830b391264f27 lib/core/data.py
|
9f87391b6a3395f7f50830b391264f27 lib/core/data.py
|
||||||
72016ea5c994a711a262fd64572a0fcd lib/core/datatype.py
|
72016ea5c994a711a262fd64572a0fcd lib/core/datatype.py
|
||||||
|
@ -36,7 +36,7 @@ e9ea20ebda48080ff80f4b87b0085e6c lib/core/common.py
|
||||||
fbb55cc6100318ff922957b6577dc58f lib/core/defaults.py
|
fbb55cc6100318ff922957b6577dc58f lib/core/defaults.py
|
||||||
f92abf47b2a41b75cd4b89ff0c93194c lib/core/dicts.py
|
f92abf47b2a41b75cd4b89ff0c93194c lib/core/dicts.py
|
||||||
9ea8a043030796e6faef7f7e957729d5 lib/core/dump.py
|
9ea8a043030796e6faef7f7e957729d5 lib/core/dump.py
|
||||||
bfffdc74a93ff647c49b79c215d96d8a lib/core/enums.py
|
afca5fd7ec20d29c30522a007cf3160f lib/core/enums.py
|
||||||
cada93357a7321655927fc9625b3bfec lib/core/exception.py
|
cada93357a7321655927fc9625b3bfec lib/core/exception.py
|
||||||
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
|
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
|
||||||
458a194764805cd8312c14ecd4be4d1e lib/core/log.py
|
458a194764805cd8312c14ecd4be4d1e lib/core/log.py
|
||||||
|
@ -48,8 +48,8 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
|
||||||
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
|
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
|
||||||
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
|
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
|
||||||
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
|
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
|
||||||
09e31da3cc7ba29d6d2cf251284df707 lib/core/settings.py
|
0b3afef34882e0bf9bf8149cd672aa22 lib/core/settings.py
|
||||||
0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py
|
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
|
||||||
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
|
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
|
||||||
36bd2dc292c0e10e39bd9c43b77fe1bc lib/core/target.py
|
36bd2dc292c0e10e39bd9c43b77fe1bc lib/core/target.py
|
||||||
72d499ca8d792e90a1ebfb2ad2341a51 lib/core/testing.py
|
72d499ca8d792e90a1ebfb2ad2341a51 lib/core/testing.py
|
||||||
|
@ -100,7 +100,7 @@ f5fb02487edaf9adaa81d54324c84f8f lib/techniques/error/use.py
|
||||||
1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py
|
1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py
|
||||||
94d7a22bb6725a91e84ba2cd9973e96d lib/techniques/union/test.py
|
94d7a22bb6725a91e84ba2cd9973e96d lib/techniques/union/test.py
|
||||||
11ecf2effbe9f40b361843d546c3c521 lib/techniques/union/use.py
|
11ecf2effbe9f40b361843d546c3c521 lib/techniques/union/use.py
|
||||||
bec403b9c2816c96ae4cac87dff70bbe lib/utils/api.py
|
02321950c18e08b9422c49d389665946 lib/utils/api.py
|
||||||
37dfb641358669f62c2acedff241348b lib/utils/brute.py
|
37dfb641358669f62c2acedff241348b lib/utils/brute.py
|
||||||
31b1e7eb489eac837db6a2bc1dcb7da7 lib/utils/crawler.py
|
31b1e7eb489eac837db6a2bc1dcb7da7 lib/utils/crawler.py
|
||||||
de9620f03231d8329ee8434884b6bacd lib/utils/deps.py
|
de9620f03231d8329ee8434884b6bacd lib/utils/deps.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user