Kill a scan
(taskid)
| 541 | |
| 542 | @get("/scan/<taskid>/kill") |
| 543 | def scan_kill(taskid): |
| 544 | """ |
| 545 | Kill a scan |
| 546 | """ |
| 547 | |
| 548 | if (taskid not in DataStore.tasks or DataStore.tasks[taskid].engine_process() is None or DataStore.tasks[taskid].engine_has_terminated()): |
| 549 | logger.warning("[%s] Invalid task ID provided to scan_kill()" % taskid) |
| 550 | return jsonize({"success": False, "message": "Invalid task ID"}) |
| 551 | |
| 552 | DataStore.tasks[taskid].engine_kill() |
| 553 | |
| 554 | logger.debug("(%s) Killed scan" % taskid) |
| 555 | return jsonize({"success": True}) |
| 556 | |
| 557 | @get("/scan/<taskid>/status") |
| 558 | def scan_status(taskid): |
nothing calls this directly
no test coverage detected
searching dependent graphs…