From b55555e4e57ac6645ae4ffa0326bb862beeb9abf Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Sun, 3 Feb 2013 21:39:26 +0000 Subject: [PATCH] minor bug fix --- lib/utils/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/api.py b/lib/utils/api.py index 6dd8aa06d..20d141708 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -48,7 +48,7 @@ RESTAPI_SERVER_PORT = 8775 # Local global variables adminid = "" db = None -db_filepath = tempfile.mkstemp(prefix="sqlmapipc-", text=False)[1] +db_filepath = None tasks = dict() # API objects @@ -553,6 +553,7 @@ def server(host="0.0.0.0", port=RESTAPI_SERVER_PORT): global db_filepath adminid = hexencode(os.urandom(16)) + db_filepath = tempfile.mkstemp(prefix="sqlmapipc-", text=False)[1] logger.info("Running REST-JSON API server at '%s:%d'.." % (host, port)) logger.info("Admin ID: %s" % adminid)