mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-15 12:29:56 +00:00
Patch related to #6124
This commit is contained in:
parent
7eb06ce635
commit
ce01e65255
3 changed files with 47 additions and 1 deletions
13
sqlmap.py
13
sqlmap.py
|
|
@ -12,6 +12,19 @@ try:
|
|||
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
# Reference: https://github.com/python/cpython/issues/156319 - CPython's tier-2 optimizer can
|
||||
# corrupt frame locals (raising exceptions the executed code cannot produce) whenever an active
|
||||
# sys.monitoring tool (an attached debugger/profiler/coverage run) coincides with enough hot
|
||||
# code. sqlmap never needs one attached during a scan, so silence any already-registered tool
|
||||
# up front, before any hot code runs (name stays registered so the owning tool can still free it)
|
||||
if hasattr(sys, "monitoring"):
|
||||
for _ in range(6): # valid tool id range (Reference: https://docs.python.org/3/library/sys.monitoring.html)
|
||||
try:
|
||||
if sys.monitoring.get_tool(_) is not None:
|
||||
sys.monitoring.set_events(_, sys.monitoring.events.NO_EVENTS)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
__import__("lib.utils.versioncheck") # this has to be the first non-standard import
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue