Skip to content

Commit 5436617

Browse files
committed
Renaming REST-JSON API to REST API
1 parent 8a2ad7d commit 5436617

6 files changed

Lines changed: 25 additions & 25 deletions

File tree

data/txt/sha256sums.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ b0f434f64105bd61ab0f6867b3f681b97fa02b4fb809ac538db382d031f0e609 data/xml/paylo
8787
8b63fda09d5c5e43ad8e6db1db90e5b1017fbe02735f3858843fc52118e3a33a data/xml/queries.xml
8888
0f5a9c84cb57809be8759f483c7d05f54847115e715521ac0ecf390c0aa68465 doc/AUTHORS
8989
ce20a4b452f24a97fde7ec9ed816feee12ac148e1fde5f1722772cc866b12740 doc/CHANGELOG.md
90-
c8d5733111c6d1e387904bc14e98815f98f816f6e73f6a664de24c0f1d331d9b doc/THANKS.md
90+
233fb10dff24a2436eb24496db7fadb46659da6745a0d53c744db701188041ef doc/THANKS.md
9191
59697fb4f118a3197f5b3dc9057351797767c8bcc748e0286e3f7ad74ec3afb6 doc/THIRD-PARTY.md
9292
2af9b7a8c5f24de68f9b8b1bcf3a7f2b0e55fdb48b6545e1fc8b13f406ac97c2 doc/translations/README-ar-AR.md
9393
c25f7d7f0cc5e13db71994d2b34ada4965e06c87778f1d6c1a103063d25e2c89 doc/translations/README-bg-BG.md
@@ -188,7 +188,7 @@ c03dc585f89642cfd81b087ac2723e3e1bb3bfa8c60e6f5fe58ef3b0113ebfe6 lib/core/data.
188188
48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py
189189
0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py
190190
888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py
191-
82195feebdc5ec2fe764048643061d0769d333f583933d202c99eede64a41e2f lib/core/settings.py
191+
8ddd5d0574cdaafe3a77d5ee76ecc16b88bedf5deaf1fde5a2c8eb71a7f60a0c lib/core/settings.py
192192
cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py
193193
bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py
194194
70ea3768f1b3062b22d20644df41c86238157ec80dd43da40545c620714273c6 lib/core/target.py
@@ -241,7 +241,7 @@ f552b6140d4069be6a44792a08f295da8adabc1c4bb6a5e100f222f87144ca9d lib/techniques
241241
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/techniques/union/__init__.py
242242
30cae858e2a5a75b40854399f65ad074e6bb808d56d5ee66b94d4002dc6e101b lib/techniques/union/test.py
243243
a8a795f29ec6fd66482926f04b054ed492a033982c3b7837c5d2ea32368acec0 lib/techniques/union/use.py
244-
ab5132ff9605a7e795293ce10eec7f8d1a98a36dabb3432b9c805535afe054ac lib/utils/api.py
244+
5832f1b9cce5e8fe71cc1e07a690fa30f2bc0caa07e734220372a846aae6b95f lib/utils/api.py
245245
442555ab85277aff7c9e0cf465ea5b0d28395c326f68363449b2d3941f4b6de2 lib/utils/brute.py
246246
da5bcbcda3f667582adf5db8c1b5d511b469ac61b55d387cec66de35720ed718 lib/utils/crawler.py
247247
a94958be0ec3e9d28d8171813a6a90655a9ad7e6aa33c661e8d8ebbfcf208dbb lib/utils/deps.py
@@ -489,8 +489,8 @@ cedf45d33461bd7e5400d06611a63c8a4ffae1a4510030c5696b9d46ed6a9883 plugins/generi
489489
45bfd00f09557e20115e6ce7fb52ff507930d705db215e535f991e5fbf7464de plugins/generic/users.py
490490
1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 plugins/__init__.py
491491
5d72f0af46ff3c9e3fe80300e83cb78749132278e8db88915764a94d7130a04c README.md
492-
7ef0d0ea10d4b19283b1e380d521abb0fdd4c6bf1443b88f7b00af7947fc5e27 sqlmapapi.py
493-
ca368eb28b653d22adace174fe7925df2dccbae38282c6c4f5c6dd64a8360fb4 sqlmapapi.yaml
492+
46517f1444c202710e388873960130850ed092e17bd6f4dd5f2fedea3dbb8ffc sqlmapapi.py
493+
e0607378f46f7664349552c628f25c4689569c788fd2364eef3075dd2cce127b sqlmapapi.yaml
494494
627d90f1194335b800cbc9cc78db6697cf9e02e193a83598e0d4d0abb55b63b8 sqlmap.conf
495495
65159b82795604069a2d14ccbd1f66e888a26b05db0401a1ddadb40c665c93dc sqlmap.py
496496
eb37a88357522fd7ad00d90cdc5da6b57442b4fec49366aadb2944c4fbf8b804 tamper/0eunion.py

doc/THANKS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Ivan Giacomelli, <truemilk(at)insiberia.net>
175175
* for reviewing the documentation
176176

177177
Dimitris Giannitsaros, <daremon(at)gmail.com>
178-
* for contributing a REST-JSON API client
178+
* for contributing a REST API client
179179

180180
Nico Golde, <nico(at)ngolde.de>
181181
* for reporting a couple of bugs

lib/core/settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.10.6.80"
23+
VERSION = "1.10.6.81"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
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 @@
840840
# Default adapter to use for bottle server
841841
RESTAPI_DEFAULT_ADAPTER = "wsgiref"
842842

843-
# Default REST-JSON API server listen address
843+
# Default REST API server listen address
844844
RESTAPI_DEFAULT_ADDRESS = "127.0.0.1"
845845

846-
# Default REST-JSON API server listen port
846+
# Default REST API server listen port
847847
RESTAPI_DEFAULT_PORT = 8775
848848

849-
# Unsupported options by REST-JSON API server
849+
# Unsupported options by REST API server
850850
RESTAPI_UNSUPPORTED_OPTIONS = ("sqlShell", "wizard", "evalCode", "alert")
851851

852852
# Use "Supplementary Private Use Area-A"

lib/utils/api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def connect(self, who="server"):
9393
self.connection = sqlite3.connect(self.database, timeout=3, isolation_level=None, check_same_thread=False)
9494
self.cursor = self.connection.cursor()
9595
self.lock = threading.Lock()
96-
logger.debug("REST-JSON API %s connected to IPC database" % who)
96+
logger.debug("REST API %s connected to IPC database" % who)
9797

9898
def disconnect(self):
9999
if self.cursor:
@@ -706,11 +706,11 @@ def version(token=None):
706706

707707
def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=RESTAPI_DEFAULT_ADAPTER, username=None, password=None, database=None):
708708
"""
709-
REST-JSON API server
709+
REST API server
710710
"""
711711

712712
if not all((username, password)):
713-
logger.critical("REST-JSON API server requires both username and password")
713+
logger.critical("REST API server requires both username and password")
714714

715715
DataStore.admin_token = encodeHex(os.urandom(16), binary=False)
716716
DataStore.username = username
@@ -727,7 +727,7 @@ def server(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, adapter=REST
727727
s.bind((host, 0))
728728
port = s.getsockname()[1]
729729

730-
logger.info("Running REST-JSON API server at '%s:%d'.." % (host, port))
730+
logger.info("Running REST API server at '%s:%d'.." % (host, port))
731731
logger.info("Admin (secret) token: %s" % DataStore.admin_token)
732732
logger.debug("IPC database: '%s'" % Database.filepath)
733733

@@ -787,7 +787,7 @@ def _client(url, options=None):
787787

788788
def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=None, password=None):
789789
"""
790-
REST-JSON API client
790+
REST API client
791791
"""
792792

793793
DataStore.username = username
@@ -801,14 +801,14 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non
801801
logger.debug(dbgMsg)
802802

803803
addr = "http://%s:%d" % (host, port)
804-
logger.info("Starting REST-JSON API client to '%s'..." % addr)
804+
logger.info("Starting REST API client to '%s'..." % addr)
805805

806806
try:
807807
_client(addr)
808808
except Exception as ex:
809809
if not isinstance(ex, _urllib.error.HTTPError) or ex.code == _http_client.UNAUTHORIZED:
810810
errMsg = "There has been a problem while connecting to the "
811-
errMsg += "REST-JSON API server at '%s' " % addr
811+
errMsg += "REST API server at '%s' " % addr
812812
errMsg += "(%s)" % getSafeExString(ex)
813813
logger.critical(errMsg)
814814
return

sqlmapapi.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def modulePath():
8181

8282
def main():
8383
"""
84-
REST-JSON API main function
84+
REST API main function
8585
"""
8686

8787
dirtyPatches()
@@ -95,18 +95,18 @@ def main():
9595

9696
# Parse command line options
9797
apiparser = ArgumentParser()
98-
apiparser.add_argument("-s", "--server", help="Run as a REST-JSON API server", action="store_true")
99-
apiparser.add_argument("-c", "--client", help="Run as a REST-JSON API client", action="store_true")
100-
apiparser.add_argument("-H", "--host", help="Host of the REST-JSON API server (default \"%s\")" % RESTAPI_DEFAULT_ADDRESS, default=RESTAPI_DEFAULT_ADDRESS)
101-
apiparser.add_argument("-p", "--port", help="Port of the REST-JSON API server (default %d)" % RESTAPI_DEFAULT_PORT, default=RESTAPI_DEFAULT_PORT, type=int)
98+
apiparser.add_argument("-s", "--server", help="Run as a REST API server", action="store_true")
99+
apiparser.add_argument("-c", "--client", help="Run as a REST API client", action="store_true")
100+
apiparser.add_argument("-H", "--host", help="Host of the REST API server (default \"%s\")" % RESTAPI_DEFAULT_ADDRESS, default=RESTAPI_DEFAULT_ADDRESS)
101+
apiparser.add_argument("-p", "--port", help="Port of the REST API server (default %d)" % RESTAPI_DEFAULT_PORT, default=RESTAPI_DEFAULT_PORT, type=int)
102102
apiparser.add_argument("--adapter", help="Server (bottle) adapter to use (default \"%s\")" % RESTAPI_DEFAULT_ADAPTER, default=RESTAPI_DEFAULT_ADAPTER)
103103
apiparser.add_argument("--database", help="Set IPC database filepath (optional)")
104104
apiparser.add_argument("--username", help="Basic authentication username")
105105
apiparser.add_argument("--password", help="Basic authentication password")
106106
(args, _) = apiparser.parse_known_args() if hasattr(apiparser, "parse_known_args") else apiparser.parse_args()
107107

108108
if (args.server or args.client) and not all((args.username, args.password)):
109-
apiparser.error("--username and --password are mandatory for REST-JSON API server/client usage")
109+
apiparser.error("--username and --password are mandatory for REST API server/client usage")
110110

111111
# Start the client or the server
112112
if args.server:

sqlmapapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
openapi: 3.0.3
22
info:
3-
title: sqlmap REST-JSON API
3+
title: sqlmap REST API
44
version: "1.0.0"
55
description: |
6-
OpenAPI/Swagger specification for sqlmapapi.py, the sqlmap REST-JSON API server.
6+
OpenAPI/Swagger specification for sqlmapapi.py, the sqlmap REST API server.
77
88
This specification describes the API surface implemented by `lib/utils/api.py`.
99
The API is expected to be protected with HTTP Basic authentication when started

0 commit comments

Comments
 (0)