mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Minor update regarding shell history file
This commit is contained in:
parent
ffa7e2f6e9
commit
45f5548113
|
@ -1052,12 +1052,13 @@ def setPaths():
|
|||
paths.SQLMAP_XML_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "xml")
|
||||
paths.SQLMAP_XML_BANNER_PATH = os.path.join(paths.SQLMAP_XML_PATH, "banner")
|
||||
|
||||
paths.SQLMAP_OUTPUT_PATH = getUnicode(paths.get("SQLMAP_OUTPUT_PATH", os.path.join(os.path.expanduser("~"), ".sqlmap", "output")), system=True)
|
||||
_ = os.path.join(os.path.expanduser("~"), ".sqlmap")
|
||||
paths.SQLMAP_OUTPUT_PATH = getUnicode(paths.get("SQLMAP_OUTPUT_PATH", os.path.join(_, "output")), system=True)
|
||||
paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
|
||||
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")
|
||||
|
||||
# sqlmap files
|
||||
paths.SQLMAP_HISTORY = os.path.join(os.path.expanduser('~'), ".sqlmap_history")
|
||||
paths.SQLMAP_SHELL_HISTORY = os.path.join(_, "shell.hst")
|
||||
paths.SQLMAP_CONFIG = os.path.join(paths.SQLMAP_ROOT_PATH, "sqlmap-%s.conf" % randomStr())
|
||||
paths.COMMON_COLUMNS = os.path.join(paths.SQLMAP_TXT_PATH, "common-columns.txt")
|
||||
paths.COMMON_TABLES = os.path.join(paths.SQLMAP_TXT_PATH, "common-tables.txt")
|
||||
|
|
|
@ -16,11 +16,11 @@ from lib.core.data import paths
|
|||
from lib.core.enums import OS
|
||||
|
||||
def saveHistory():
|
||||
historyPath = os.path.expanduser(paths.SQLMAP_HISTORY)
|
||||
historyPath = os.path.expanduser(paths.SQLMAP_SHELL_HISTORY)
|
||||
readline.write_history_file(historyPath)
|
||||
|
||||
def loadHistory():
|
||||
historyPath = os.path.expanduser(paths.SQLMAP_HISTORY)
|
||||
historyPath = os.path.expanduser(paths.SQLMAP_SHELL_HISTORY)
|
||||
|
||||
if os.path.exists(historyPath):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user