parameters: (self, cred=None, debug=None)
docstring: Initialize SecureTeaIDS.
  
          Args:
              cred (dict): Credentials for IDS
              debug (bool): Log on terminal or not
  
          Raises:
              None
  
          Returns:
              None
docstring_summary: Initialize SecureTeaIDS.
docstring_tokens: Initialize SecureTeaIDS .
function: def __init__(self, cred=None, debug=None):
          """Initialize SecureTeaIDS.
  
          Args:
              cred (dict): Credentials for IDS
              debug (bool): Log on terminal or not
  
          Raises:
              None
  
          Returns:
              None
          """
          self.cred = cred
  
          # Initialize logger
          self.logger = logger.SecureTeaLogger(
                  __name__,
                  debug=debug
          )
  
          # Check for root
          if check_root():
              # Create DetectRecon object
              self.recon_obj = DetectRecon(threshold=self.cred["threshold"],
                                           eligibility_threshold=self.cred["eligibility_threshold"],
                                           severity_factor=self.cred["severity_factor"],
                                           debug=debug)
  
              interface = self.cred["interface"]
              if interface and interface != "XXXX":
                  self.interface = interface
              else:
                  self.logger.log(
                      "Collecting interface",
                      logtype="info"
                  )
                  self.interface = get_interface()
  
              # Create R2LEngine object
              self.r2l_rules = R2LEngine(debug=debug, interface=self.interface)
              self.logger.log(
                  "SecureTea Intrusion Detection started",
                  logtype="info"
              )
          else:
              self.logger.log(
                  "Run as root",
                  logtype="error"
              )
              sys.exit(1)
function_tokens: def __init__ ( self , cred = None , debug = None ) : self . cred = cred # Initialize logger self . logger = logger . SecureTeaLogger ( __name__ , debug = debug ) # Check for root if check_root ( ) : # Create DetectRecon object self . recon_obj = DetectRecon ( threshold = self . cred [ "threshold" ] , eligibility_threshold = self . cred [ "eligibility_threshold" ] , severity_factor = self . cred [ "severity_factor" ] , debug = debug ) interface = self . cred [ "interface" ] if interface and interface != "XXXX" : self . interface = interface else : self . logger . log ( "Collecting interface" , logtype = "info" ) self . interface = get_interface ( ) # Create R2LEngine object self . r2l_rules = R2LEngine ( debug = debug , interface = self . interface ) self . logger . log ( "SecureTea Intrusion Detection started" , logtype = "info" ) else : self . logger . log ( "Run as root" , logtype = "error" ) sys . exit ( 1 )