def ignore_script(script):
 sid = script.get('id')
 output = script.get('output')
 if (sid in IGNORE_SCRIPTS_IDS):
  return True
 if (output in IGNORE_SCRIPTS.get(sid, [])):
  return True
 if (output in IGNORE_SCRIPT_OUTPUTS):
  return True
 if (IGNORE_SCRIPTS_REGEXP.get(sid) and (output is not None) and IGNORE_SCRIPTS_REGEXP[sid].search(output)):
  return True
 if ((output is not None) and any((expr.search(output) for expr in IGNORE_SCRIPT_OUTPUTS_REGEXP))):
  return True
 return False

def ignore_script ( script ) : sid = script . get ( 'id' ) output = script . get ( 'output' ) if ( sid in IGNORE_SCRIPTS_IDS ) : return True if ( output in IGNORE_SCRIPTS . get ( sid , [ ] ) ) : return True if ( output in IGNORE_SCRIPT_OUTPUTS ) : return True if ( IGNORE_SCRIPTS_REGEXP . get ( sid ) and ( output is not None ) and IGNORE_SCRIPTS_REGEXP [ sid ] . search ( output ) ) : return True if ( ( output is not None ) and any ( ( expr . search ( output ) for expr in IGNORE_SCRIPT_OUTPUTS_REGEXP ) ) ) : return True return False
predicate that decides whether an nmap script should be ignored or not .