From 543661721dd5b17ec2dd89b69f20506d5dc87532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 11 Jun 2026 22:44:42 +0200 Subject: [PATCH] Renaming REST-JSON API to REST API --- data/txt/sha256sums.txt | 10 +++++----- doc/THANKS.md | 2 +- lib/core/settings.py | 8 ++++---- lib/utils/api.py | 14 +++++++------- sqlmapapi.py | 12 ++++++------ sqlmapapi.yaml | 4 ++-- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/data/txt/sha256sums.txt b/data/txt/sha256sums.txt index d7b6604d9..d1d2d9ee4 100644 --- a/data/txt/sha256sums.txt +++ b/data/txt/sha256sums.txt @@ -87,7 +87,7 @@ b0f434f64105bd61ab0f6867b3f681b97fa02b4fb809ac538db382d031f0e609 data/xml/paylo 8b63fda09d5c5e43ad8e6db1db90e5b1017fbe02735f3858843fc52118e3a33a data/xml/queries.xml 0f5a9c84cb57809be8759f483c7d05f54847115e715521ac0ecf390c0aa68465 doc/AUTHORS ce20a4b452f24a97fde7ec9ed816feee12ac148e1fde5f1722772cc866b12740 doc/CHANGELOG.md -c8d5733111c6d1e387904bc14e98815f98f816f6e73f6a664de24c0f1d331d9b doc/THANKS.md +233fb10dff24a2436eb24496db7fadb46659da6745a0d53c744db701188041ef doc/THANKS.md 59697fb4f118a3197f5b3dc9057351797767c8bcc748e0286e3f7ad74ec3afb6 doc/THIRD-PARTY.md 2af9b7a8c5f24de68f9b8b1bcf3a7f2b0e55fdb48b6545e1fc8b13f406ac97c2 doc/translations/README-ar-AR.md c25f7d7f0cc5e13db71994d2b34ada4965e06c87778f1d6c1a103063d25e2c89 doc/translations/README-bg-BG.md @@ -188,7 +188,7 @@ c03dc585f89642cfd81b087ac2723e3e1bb3bfa8c60e6f5fe58ef3b0113ebfe6 lib/core/data. 48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py 0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py 888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py -82195feebdc5ec2fe764048643061d0769d333f583933d202c99eede64a41e2f lib/core/settings.py +8ddd5d0574cdaafe3a77d5ee76ecc16b88bedf5deaf1fde5a2c8eb71a7f60a0c lib/core/settings.py cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py 70ea3768f1b3062b22d20644df41c86238157ec80dd43da40545c620714273c6 lib/core/target.py @@ -241,7 +241,7 @@ f552b6140d4069be6a44792a08f295da8adabc1c4bb6a5e100f222f87144ca9d lib/techniques 1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/techniques/union/__init__.py 30cae858e2a5a75b40854399f65ad074e6bb808d56d5ee66b94d4002dc6e101b lib/techniques/union/test.py a8a795f29ec6fd66482926f04b054ed492a033982c3b7837c5d2ea32368acec0 lib/techniques/union/use.py -ab5132ff9605a7e795293ce10eec7f8d1a98a36dabb3432b9c805535afe054ac lib/utils/api.py +5832f1b9cce5e8fe71cc1e07a690fa30f2bc0caa07e734220372a846aae6b95f lib/utils/api.py 442555ab85277aff7c9e0cf465ea5b0d28395c326f68363449b2d3941f4b6de2 lib/utils/brute.py da5bcbcda3f667582adf5db8c1b5d511b469ac61b55d387cec66de35720ed718 lib/utils/crawler.py a94958be0ec3e9d28d8171813a6a90655a9ad7e6aa33c661e8d8ebbfcf208dbb lib/utils/deps.py @@ -489,8 +489,8 @@ cedf45d33461bd7e5400d06611a63c8a4ffae1a4510030c5696b9d46ed6a9883 plugins/generi 45bfd00f09557e20115e6ce7fb52ff507930d705db215e535f991e5fbf7464de plugins/generic/users.py 1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 plugins/__init__.py 5d72f0af46ff3c9e3fe80300e83cb78749132278e8db88915764a94d7130a04c README.md -7ef0d0ea10d4b19283b1e380d521abb0fdd4c6bf1443b88f7b00af7947fc5e27 sqlmapapi.py -ca368eb28b653d22adace174fe7925df2dccbae38282c6c4f5c6dd64a8360fb4 sqlmapapi.yaml +46517f1444c202710e388873960130850ed092e17bd6f4dd5f2fedea3dbb8ffc sqlmapapi.py +e0607378f46f7664349552c628f25c4689569c788fd2364eef3075dd2cce127b sqlmapapi.yaml 627d90f1194335b800cbc9cc78db6697cf9e02e193a83598e0d4d0abb55b63b8 sqlmap.conf 65159b82795604069a2d14ccbd1f66e888a26b05db0401a1ddadb40c665c93dc sqlmap.py eb37a88357522fd7ad00d90cdc5da6b57442b4fec49366aadb2944c4fbf8b804 tamper/0eunion.py diff --git a/doc/THANKS.md b/doc/THANKS.md index 62d4ba136..fcc746a26 100644 --- a/doc/THANKS.md +++ b/doc/THANKS.md @@ -175,7 +175,7 @@ Ivan Giacomelli, * for reviewing the documentation Dimitris Giannitsaros, -* for contributing a REST-JSON API client +* for contributing a REST API client Nico Golde, * for reporting a couple of bugs diff --git a/lib/core/settings.py b/lib/core/settings.py index 7d6497693..53d4a243b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.6.80" +VERSION = "1.10.6.81" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" 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) @@ -840,13 +840,13 @@ LIMITED_ROWS_TEST_NUMBER = 15 # Default adapter to use for bottle server RESTAPI_DEFAULT_ADAPTER = "wsgiref" -# Default REST-JSON API server listen address +# Default REST API server listen address RESTAPI_DEFAULT_ADDRESS = "127.0.0.1" -# Default REST-JSON API server listen port +# Default REST API server listen port RESTAPI_DEFAULT_PORT = 8775 -# Unsupported options by REST-JSON API server +# Unsupported options by REST API server RESTAPI_UNSUPPORTED_OPTIONS = ("sqlShell", "wizard", "evalCode", "alert") # Use "Supplementary Private Use Area-A" diff --git a/lib/utils/api.py b/lib/utils/api.py index a5012cf20..8cd8bcfff 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -93,7 +93,7 @@ class Database(object): self.connection = sqlite3.connect(self.database, timeout=3, isolation_level=None, check_same_thread=False) self.cursor = self.connection.cursor() self.lock = threading.Lock() - logger.debug("REST-JSON API %s connected to IPC database" % who) + logger.debug("REST API %s connected to IPC database" % who) def disconnect(self): if self.cursor: @@ -706,11 +706,11 @@ def version(token=None): def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=RESTAPI_DEFAULT_ADAPTER, username=None, password=None, database=None): """ - REST-JSON API server + REST API server """ if not all((username, password)): - logger.critical("REST-JSON API server requires both username and password") + logger.critical("REST API server requires both username and password") DataStore.admin_token = encodeHex(os.urandom(16), binary=False) DataStore.username = username @@ -727,7 +727,7 @@ def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=REST s.bind((host, 0)) port = s.getsockname()[1] - logger.info("Running REST-JSON API server at '%s:%d'.." % (host, port)) + logger.info("Running REST API server at '%s:%d'.." % (host, port)) logger.info("Admin (secret) token: %s" % DataStore.admin_token) logger.debug("IPC database: '%s'" % Database.filepath) @@ -787,7 +787,7 @@ def _client(url, options=None): def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=None, password=None): """ - REST-JSON API client + REST API client """ DataStore.username = username @@ -801,14 +801,14 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non logger.debug(dbgMsg) addr = "http://%s:%d" % (host, port) - logger.info("Starting REST-JSON API client to '%s'..." % addr) + logger.info("Starting REST API client to '%s'..." % addr) try: _client(addr) except Exception as ex: if not isinstance(ex, _urllib.error.HTTPError) or ex.code == _http_client.UNAUTHORIZED: errMsg = "There has been a problem while connecting to the " - errMsg += "REST-JSON API server at '%s' " % addr + errMsg += "REST API server at '%s' " % addr errMsg += "(%s)" % getSafeExString(ex) logger.critical(errMsg) return diff --git a/sqlmapapi.py b/sqlmapapi.py index 198e43c60..4714887f4 100755 --- a/sqlmapapi.py +++ b/sqlmapapi.py @@ -81,7 +81,7 @@ except ImportError: def main(): """ - REST-JSON API main function + REST API main function """ dirtyPatches() @@ -95,10 +95,10 @@ def main(): # Parse command line options apiparser = ArgumentParser() - apiparser.add_argument("-s", "--server", help="Run as a REST-JSON API server", action="store_true") - apiparser.add_argument("-c", "--client", help="Run as a REST-JSON API client", action="store_true") - apiparser.add_argument("-H", "--host", help="Host of the REST-JSON API server (default \"%s\")" % RESTAPI_DEFAULT_ADDRESS, default=RESTAPI_DEFAULT_ADDRESS) - apiparser.add_argument("-p", "--port", help="Port of the REST-JSON API server (default %d)" % RESTAPI_DEFAULT_PORT, default=RESTAPI_DEFAULT_PORT, type=int) + apiparser.add_argument("-s", "--server", help="Run as a REST API server", action="store_true") + apiparser.add_argument("-c", "--client", help="Run as a REST API client", action="store_true") + apiparser.add_argument("-H", "--host", help="Host of the REST API server (default \"%s\")" % RESTAPI_DEFAULT_ADDRESS, default=RESTAPI_DEFAULT_ADDRESS) + apiparser.add_argument("-p", "--port", help="Port of the REST API server (default %d)" % RESTAPI_DEFAULT_PORT, default=RESTAPI_DEFAULT_PORT, type=int) apiparser.add_argument("--adapter", help="Server (bottle) adapter to use (default \"%s\")" % RESTAPI_DEFAULT_ADAPTER, default=RESTAPI_DEFAULT_ADAPTER) apiparser.add_argument("--database", help="Set IPC database filepath (optional)") apiparser.add_argument("--username", help="Basic authentication username") @@ -106,7 +106,7 @@ def main(): (args, _) = apiparser.parse_known_args() if hasattr(apiparser, "parse_known_args") else apiparser.parse_args() if (args.server or args.client) and not all((args.username, args.password)): - apiparser.error("--username and --password are mandatory for REST-JSON API server/client usage") + apiparser.error("--username and --password are mandatory for REST API server/client usage") # Start the client or the server if args.server: diff --git a/sqlmapapi.yaml b/sqlmapapi.yaml index 54f8778ef..a5829d7a4 100644 --- a/sqlmapapi.yaml +++ b/sqlmapapi.yaml @@ -1,9 +1,9 @@ openapi: 3.0.3 info: - title: sqlmap REST-JSON API + title: sqlmap REST API version: "1.0.0" description: | - OpenAPI/Swagger specification for sqlmapapi.py, the sqlmap REST-JSON API server. + OpenAPI/Swagger specification for sqlmapapi.py, the sqlmap REST API server. This specification describes the API surface implemented by `lib/utils/api.py`. The API is expected to be protected with HTTP Basic authentication when started