Describe the bug
sqlmap doesn't work with Python 3.13.
To Reproduce
- Run
sqlmap https://host.domain/ - See error
[10:52:36] [CRITICAL] unhandled exception occurred in sqlmap/1.8.6.3#dev. It is recommended to retry your run with the latest development version from official GitHub repository at 'https://github.com/sqlmapproject/sqlmap'. If the exception persists, please open a new issue at 'https://github.com/sqlmapproject/sqlmap/issues/new' with the following text and any other information required to reproduce the bug. Developers will try to reproduce the bug, fix it accordingly and get back to you
Running version: 1.8.6.3#dev
Python version: 3.13.0b2
Operating system: Linux-6.6.21-gentoo-x86_64-Intel-R-_Core-TM-_i7-7500U_CPU_@_2.70GHz-with-glibc2.39
Command line: sqlmap.py ****************************************
Technique: None
Back-end DBMS: None
Traceback (most recent call last):
File "lib/core/common.py", line 1179, in readInput
logging._acquireLock()
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'logging' has no attribute '_acquireLock'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "lib/core/common.py", line 1199, in readInput
raise SqlmapUserQuitException
lib.core.exception.SqlmapUserQuitException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "sqlmap.py", line 222, in main
start()
~~~~~^^
File "lib/core/decorators.py", line 80, in _
result = f(*args, **kwargs)
File "lib/controller/controller.py", line 434, in start
setupTargetEnv()
~~~~~~~~~~~~~~^^
File "lib/core/target.py", line 768, in setupTargetEnv
_setRequestParams()
~~~~~~~~~~~~~~~~~^^
File "lib/core/target.py", line 259, in _setRequestParams
choice = readInput(message, default='Y').upper()
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "lib/core/common.py", line 1202, in readInput
logging._releaseLock()
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'logging' has no attribute '_releaseLock'
[*] ending @ 10:52:36 /2024-06-15/
Expected behavior
sqlmap shouldn't depend on private API method _releaseLock().
Screenshots
N/A
Running environment:
- sqlmap version: 1.8.6.3#dev
- Installation method: Gentoo package (I am the maintainer)
- Operating system: Gentoo Linux
- Python version: 3.13.0b2
Target details: N/A
Additional context
It works with Python 3.12.
$ python3.12
Python 3.12.3 (main, Jun 9 2024, 17:22:44) [GCC 13.2.1 20240210] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging._acquireLock()
In Python 3.13 the method _acquireLock() is gone.
$ python3.13
Python 3.13.0b2 (main, Jun 15 2024, 10:51:19) [GCC 13.2.1 20240210] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging._acquireLock()
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
logging._acquireLock()
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'logging' has no attribute '_acquireLock'