From c5d3198101db7d983f993874f1805ca1566a0292 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 7 Jan 2016 21:46:20 +0100 Subject: [PATCH] Minor refactoring --- sqlmapapi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()