diff --git a/sqlmapapi.py b/sqlmapapi.py index 974e22b44..a4baa6ef3 100755 --- a/sqlmapapi.py +++ b/sqlmapapi.py @@ -19,10 +19,11 @@ from lib.core.settings import RESTAPI_DEFAULT_PORT from lib.utils.api import client from lib.utils.api import server -if __name__ == "__main__": +def main(): """ REST-JSON API main function """ + # Set default logging level to debug logger.setLevel(logging.DEBUG) @@ -45,3 +46,6 @@ if __name__ == "__main__": client(args.host, args.port) else: apiparser.print_help() + +if __name__ == "__main__": + main()