@app.route('/scans/<int:scan_id>/pause', methods=['GET'])
@requires_auth
def scan_pause(scan_id):
 scan_info = get_scan_info_from_id(scan_id)
 if (scan_info is None):
  abort(404, 'Scan not found')
 if (not scan_info.w3af_core.can_pause()):
  abort(403, 'Scan can not be paused')
 scan_info.w3af_core.pause()
 return jsonify({'message': 'Success'})

@ app . route ( '/scans/<int:scan_id>/pause' , methods = [ 'GET' ] ) @ requires_auth def scan_pause ( scan_id ) : scan_info = get_scan_info_from_id ( scan_id ) if ( scan_info is None ) : abort ( 404 , 'Scan not found' ) if ( not scan_info . w3af_core . can_pause ( ) ) : abort ( 403 , 'Scan can not be paused' ) scan_info . w3af_core . pause ( ) return jsonify ( { 'message' : 'Success' } )
pause a scan .