def __init__(self, interface, logger, base_configs=None):
        """See base class documentation
        """
        self._base_configs = None
        self._capture_file_path = ""
        self._interface = ""
        self._logger = logger
        self._process = None
        self._temp_capture_file_path = ""

        if interface == "":
            raise sniffer.InvalidDataError("Empty interface provided")
        self._interface = interface
        self._base_configs = base_configs

        try:
            subprocess.check_call(['ifconfig', self._interface, 'down'])
            subprocess.check_call(
                ['iwconfig', self._interface, 'mode', 'monitor'])
            subprocess.check_call(['ifconfig', self._interface, 'up'])
        except Exception as err:
            raise sniffer.ExecutionError(err)
def __init__ ( self , interface , logger , base_configs = None ) : self . _base_configs = None self . _capture_file_path = "" self . _interface = "" self . _logger = logger self . _process = None self . _temp_capture_file_path = "" if interface == "" : raise sniffer . InvalidDataError ( "Empty interface provided" ) self . _interface = interface self . _base_configs = base_configs try : subprocess . check_call ( [ 'ifconfig' , self . _interface , 'down' ] ) subprocess . check_call ( [ 'iwconfig' , self . _interface , 'mode' , 'monitor' ] ) subprocess . check_call ( [ 'ifconfig' , self . _interface , 'up' ] ) except Exception as err : raise sniffer . ExecutionError ( err )
See base class documentation