MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / scan_status

Function scan_status

lib/utils/api.py:558–577  ·  view source on GitHub ↗

Returns status of a scan

(taskid)

Source from the content-addressed store, hash-verified

556
557@get("/scan/<taskid>/status")
558def scan_status(taskid):
559 """
560 Returns status of a scan
561 """
562
563 if taskid not in DataStore.tasks:
564 logger.warning("[%s] Invalid task ID provided to scan_status()" % taskid)
565 return jsonize({"success": False, "message": "Invalid task ID"})
566
567 if DataStore.tasks[taskid].engine_process() is None:
568 status = "not running"
569 else:
570 status = "terminated" if DataStore.tasks[taskid].engine_has_terminated() is True else "running"
571
572 logger.debug("(%s) Retrieved scan status" % taskid)
573 return jsonize({
574 "success": True,
575 "status": status,
576 "returncode": DataStore.tasks[taskid].engine_get_returncode()
577 })
578
579@get("/scan/<taskid>/data")
580def scan_data(taskid):

Callers 1

task_listFunction · 0.85

Calls 5

jsonizeFunction · 0.90
engine_processMethod · 0.80
engine_has_terminatedMethod · 0.80
debugMethod · 0.80
engine_get_returncodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…