parameters: (self,
                   debug=False,
                   config_path=None,
                   vt_api_key=None,
                   use_clamav=False,
                   use_yara=False,
                   monitor_changes=1,
                   monitor_usb=1)
docstring: Initialize MonitorEngine.
  
          Args:
              debug (bool): Log on terminal or not
              config_path (str): Configuration JSON file path
              vt_api_key (str): VirusTotal API Key
              monitor_changes (int): Monitor changes (1) or not (0)
              monitor_usb (int): Monitor USB (1) or not (0)
  
          Raises:
              None
  
          Returns:
              None
docstring_summary: Initialize MonitorEngine.
docstring_tokens: Initialize MonitorEngine .
function: def __init__(self,
                   debug=False,
                   config_path=None,
                   vt_api_key=None,
                   use_clamav=False,
                   use_yara=False,
                   monitor_changes=1,
                   monitor_usb=1):
          """
          Initialize MonitorEngine.
  
          Args:
              debug (bool): Log on terminal or not
              config_path (str): Configuration JSON file path
              vt_api_key (str): VirusTotal API Key
              monitor_changes (int): Monitor changes (1) or not (0)
              monitor_usb (int): Monitor USB (1) or not (0)
  
          Raises:
              None
  
          Returns:
              None
          """
          self.debug = debug
  
          # Initialize logger
          self.logger = AntiVirusLogger(
                  __name__,
                  debug=self.debug
          )
  
          if config_path:
              self._CONFIG_PATH = config_path
          else:
              self.logger.log(
                  "Configuration file not found",
                  logtype="error"
              )
              sys.exit(0)
  
          # Load Configuration
          self.config_dict = utils.json_to_dict(self._CONFIG_PATH)
          # Categorize OS
          self.os_name = utils.categorize_os()
          if self.os_name:
              # Load malicious-file log path
              self.changes_min_time = int(self.config_dict[self.os_name]["monitor"]["threshold_min"])
  
          self.monitor_changes = int(monitor_changes)
          self.monitor_usb = int(monitor_usb)
  
          # Create a pool of process
          self.process_pool = []
          # Initialize VirusTotal API key
          self.vt_api_key = vt_api_key
          # Store whether to use clamav and yara
          self.use_clamav = use_clamav
          self.use_yara = use_yara
function_tokens: def __init__ ( self , debug = False , config_path = None , vt_api_key = None , use_clamav = False , use_yara = False , monitor_changes = 1 , monitor_usb = 1 ) : self . debug = debug # Initialize logger self . logger = AntiVirusLogger ( __name__ , debug = self . debug ) if config_path : self . _CONFIG_PATH = config_path else : self . logger . log ( "Configuration file not found" , logtype = "error" ) sys . exit ( 0 ) # Load Configuration self . config_dict = utils . json_to_dict ( self . _CONFIG_PATH ) # Categorize OS self . os_name = utils . categorize_os ( ) if self . os_name : # Load malicious-file log path self . changes_min_time = int ( self . config_dict [ self . os_name ] [ "monitor" ] [ "threshold_min" ] ) self . monitor_changes = int ( monitor_changes ) self . monitor_usb = int ( monitor_usb ) # Create a pool of process self . process_pool = [ ] # Initialize VirusTotal API key self . vt_api_key = vt_api_key # Store whether to use clamav and yara self . use_clamav = use_clamav self . use_yara = use_yara