mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a57c8e61a | ||
|
|
7d07976969 | ||
|
|
9dc1344478 | ||
|
|
e8e7d66356 | ||
|
|
2038512518 | ||
|
|
184454ba8e |
@@ -5,12 +5,7 @@ Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
|
|||||||
See the file 'LICENSE' for copying permission
|
See the file 'LICENSE' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from lib.core.data import logger
|
|
||||||
from lib.core.settings import IS_WIN
|
|
||||||
from lib.core.settings import PLATFORM
|
|
||||||
|
|
||||||
_readline = None
|
_readline = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from readline import *
|
from readline import *
|
||||||
import readline as _readline
|
import readline as _readline
|
||||||
@@ -21,6 +16,10 @@ except:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
from lib.core.data import logger
|
||||||
|
from lib.core.settings import IS_WIN
|
||||||
|
from lib.core.settings import PLATFORM
|
||||||
|
|
||||||
if IS_WIN and _readline:
|
if IS_WIN and _readline:
|
||||||
try:
|
try:
|
||||||
_outputfile = _readline.GetOutputFile()
|
_outputfile = _readline.GetOutputFile()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from thirdparty import six
|
|||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.6.5.0"
|
VERSION = "1.6.6.0"
|
||||||
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)
|
||||||
|
|||||||
@@ -922,6 +922,8 @@ class Connect(object):
|
|||||||
|
|
||||||
socket.setdefaulttimeout(conf.timeout)
|
socket.setdefaulttimeout(conf.timeout)
|
||||||
|
|
||||||
|
# Dirty patch for Python3.11.0a7 (e.g. https://github.com/sqlmapproject/sqlmap/issues/5091)
|
||||||
|
if not sys.version.startswith("3.11."):
|
||||||
if conf.retryOn and re.search(conf.retryOn, page, re.I):
|
if conf.retryOn and re.search(conf.retryOn, page, re.I):
|
||||||
if threadData.retriesCount < conf.retries:
|
if threadData.retriesCount < conf.retries:
|
||||||
warnMsg = "forced retry of the request because of undesired page content"
|
warnMsg = "forced retry of the request because of undesired page content"
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ def crawl(target, post=None, cookie=None):
|
|||||||
pass
|
pass
|
||||||
except ValueError: # for non-valid links
|
except ValueError: # for non-valid links
|
||||||
pass
|
pass
|
||||||
|
except AssertionError: # for invalid HTML
|
||||||
|
pass
|
||||||
finally:
|
finally:
|
||||||
if conf.forms:
|
if conf.forms:
|
||||||
threadData.shared.formsFound |= len(findPageForms(content, current, False, True)) > 0
|
threadData.shared.formsFound |= len(findPageForms(content, current, False, True)) > 0
|
||||||
|
|||||||
@@ -198,6 +198,10 @@ class HashDB(object):
|
|||||||
threadData.inTransaction = False
|
threadData.inTransaction = False
|
||||||
except sqlite3.OperationalError:
|
except sqlite3.OperationalError:
|
||||||
pass
|
pass
|
||||||
|
except sqlite3.ProgrammingError:
|
||||||
|
self.cursor = None
|
||||||
|
threadData.inTransaction = False
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
12
sqlmap.py
12
sqlmap.py
@@ -369,6 +369,12 @@ def main():
|
|||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
elif "AttributeError: unable to access item" in excMsg and re.search(r"3\.11\.\d+a", sys.version):
|
||||||
|
errMsg = "there is a known issue when sqlmap is run with ALPHA versions of Python 3.11. "
|
||||||
|
errMsg += "Please downgrade to some stable Python version"
|
||||||
|
logger.critical(errMsg)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
elif all(_ in excMsg for _ in ("Resource temporarily unavailable", "os.fork()", "dictionaryAttack")):
|
elif all(_ in excMsg for _ in ("Resource temporarily unavailable", "os.fork()", "dictionaryAttack")):
|
||||||
errMsg = "there has been a problem while running the multiprocessing hash cracking. "
|
errMsg = "there has been a problem while running the multiprocessing hash cracking. "
|
||||||
errMsg += "Please rerun with option '--threads=1'"
|
errMsg += "Please rerun with option '--threads=1'"
|
||||||
@@ -452,6 +458,12 @@ def main():
|
|||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
elif all(_ in excMsg for _ in ("PermissionError: [WinError 5]", "multiprocessing")):
|
||||||
|
errMsg = "there is a permission problem in running multiprocessing on this system. "
|
||||||
|
errMsg += "Please rerun with '--disable-multi'"
|
||||||
|
logger.critical(errMsg)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
elif all(_ in excMsg for _ in ("No such file", "_'")):
|
elif all(_ in excMsg for _ in ("No such file", "_'")):
|
||||||
errMsg = "corrupted installation detected ('%s'). " % excMsg.strip().split('\n')[-1]
|
errMsg = "corrupted installation detected ('%s'). " % excMsg.strip().split('\n')[-1]
|
||||||
errMsg += "You should retrieve the latest development version from official GitHub "
|
errMsg += "You should retrieve the latest development version from official GitHub "
|
||||||
|
|||||||
Reference in New Issue
Block a user