@get('/scan/<taskid>/kill')
def scan_kill(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_kill()' % taskid))
  return jsonize({'success': False, 'message': 'Invalid task ID'})
 DataStore.tasks[taskid].engine_kill()
 logger.debug(('[%s] Killed scan' % taskid))
 return jsonize({'success': True})

@ get ( '/scan/<taskid>/kill' ) def scan_kill ( 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_kill()' % taskid ) ) return jsonize ( { 'success' : False , 'message' : 'Invalid task ID' } ) DataStore . tasks [ taskid ] . engine_kill ( ) logger . debug ( ( '[%s] Killed scan' % taskid ) ) return jsonize ( { 'success' : True } )
kill a scan .