mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-20 06:28:55 +00:00
Renaming REST-JSON API to REST API
This commit is contained in:
parent
8a2ad7d128
commit
543661721d
6 changed files with 25 additions and 25 deletions
12
sqlmapapi.py
12
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue