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

Function scan_data

lib/utils/api.py:580–601  ·  view source on GitHub ↗

Retrieve the data of a scan

(taskid)

Source from the content-addressed store, hash-verified

578
579@get("/scan/<taskid>/data")
580def scan_data(taskid):
581 """
582 Retrieve the data of a scan
583 """
584
585 json_data_message = list()
586 json_errors_message = list()
587
588 if taskid not in DataStore.tasks:
589 logger.warning("[%s] Invalid task ID provided to scan_data()" % taskid)
590 return jsonize({"success": False, "message": "Invalid task ID"})
591
592 # Read all data from the IPC database for the taskid
593 for status, content_type, value in DataStore.current_db.execute("SELECT status, content_type, value FROM data WHERE taskid = ? ORDER BY id ASC", (taskid,)):
594 json_data_message.append({"status": status, "type": content_type, "value": dejsonize(value)})
595
596 # Read all error messages from the IPC database
597 for error in DataStore.current_db.execute("SELECT error FROM errors WHERE taskid = ? ORDER BY id ASC", (taskid,)):
598 json_errors_message.append(error)
599
600 logger.debug("(%s) Retrieved scan data and error messages" % taskid)
601 return jsonize({"success": True, "data": json_data_message, "error": json_errors_message})
602
603# Functions to handle scans' logs
604@get("/scan/<taskid>/log/<start>/<end>")

Callers

nothing calls this directly

Calls 5

jsonizeFunction · 0.90
dejsonizeFunction · 0.90
debugMethod · 0.80
executeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…