Stop a scan
(taskid)
| 526 | |
| 527 | @get("/scan/<taskid>/stop") |
| 528 | def scan_stop(taskid): |
| 529 | """ |
| 530 | Stop a scan |
| 531 | """ |
| 532 | |
| 533 | if (taskid not in DataStore.tasks or DataStore.tasks[taskid].engine_process() is None or DataStore.tasks[taskid].engine_has_terminated()): |
| 534 | logger.warning("[%s] Invalid task ID provided to scan_stop()" % taskid) |
| 535 | return jsonize({"success": False, "message": "Invalid task ID"}) |
| 536 | |
| 537 | DataStore.tasks[taskid].engine_stop() |
| 538 | |
| 539 | logger.debug("(%s) Stopped scan" % taskid) |
| 540 | return jsonize({"success": True}) |
| 541 | |
| 542 | @get("/scan/<taskid>/kill") |
| 543 | def scan_kill(taskid): |
nothing calls this directly
no test coverage detected
searching dependent graphs…