(taskid)
return jsonize({"success": True})
Stop a scan
Stop a scan
Stop a scan
def scan_stop(taskid):
    """
    Stop a scan
    """
    if (taskid not in DataStore.tasks or
            DataStore.tasks[taskid].engine_process() is None or
            DataStore.tasks[taskid].engine_has_terminated()):
        logger.warning("[%s] Invalid task ID provided to scan_stop()" % taskid)
        return jsonize({"success": False, "message": "Invalid task ID"})

    DataStore.tasks[taskid].engine_stop()

    logger.debug("[%s] Stopped scan" % taskid)
    return jsonize({"success": True})
def scan_stop ( taskid ) : if ( taskid not in DataStore . tasks or DataStore . tasks [ taskid ] . engine_process ( ) is None or DataStore . tasks [ taskid ] . engine_has_terminated ( ) ) : logger . warning ( "[%s] Invalid task ID provided to scan_stop()" % taskid ) return jsonize ( { "success" : False , "message" : "Invalid task ID" } ) DataStore . tasks [ taskid ] . engine_stop ( ) logger . debug ( "[%s] Stopped scan" % taskid ) return jsonize ( { "success" : True } )