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

Function scan_log

lib/utils/api.py:631–647  ·  view source on GitHub ↗

Retrieve the log messages

(taskid)

Source from the content-addressed store, hash-verified

629
630@get("/scan/<taskid>/log")
631def scan_log(taskid):
632 """
633 Retrieve the log messages
634 """
635
636 json_log_messages = list()
637
638 if taskid not in DataStore.tasks:
639 logger.warning("[%s] Invalid task ID provided to scan_log()" % taskid)
640 return jsonize({"success": False, "message": "Invalid task ID"})
641
642 # Read all log messages from the IPC database
643 for time_, level, message in DataStore.current_db.execute("SELECT time, level, message FROM logs WHERE taskid = ? ORDER BY id ASC", (taskid,)):
644 json_log_messages.append({"time": time_, "level": level, "message": message})
645
646 logger.debug("(%s) Retrieved scan log messages" % taskid)
647 return jsonize({"success": True, "log": json_log_messages})
648
649# Function to handle files inside the output directory
650@get("/download/<taskid>/<target>/<filename:path>")

Callers

nothing calls this directly

Calls 4

jsonizeFunction · 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…