def scan(self, 
             exit_on_failure: bool = True,
             quiet: bool = False) -> Union[None, List[NamedTuple]]:
        try:
            # region Variables
            network_devices: List[NamedTuple] = list()
            ipv4_address: str = ''
            mac_address: str = ''
            vendor: str = ''
            os: str = ''
            ports: List[int] = list()
            # endregion

            nmap_command: str = 'nmap ' + self.local_network + \
                                ' --open -n -O --osscan-guess -T5 -oX ' + self._nmap_scan_result
            if not quiet:
                self._base.print_info('Start nmap scan: ', nmap_command)
            if self._base.get_platform().startswith('Windows'):
                nmap_process = sub.Popen(nmap_command, shell=True, stdout=sub.PIPE, stderr=sub.STDOUT)
            else:
                nmap_process = sub.Popen([nmap_command], shell=True, stdout=sub.PIPE, stderr=sub.STDOUT)
            nmap_process.wait()
            assert isfile(self._nmap_scan_result), \
                'Not found nmap scan result file: ' + self._base.error_text(self._nmap_scan_result)

            nmap_report = ET.parse(self._nmap_scan_result)
            root_tree = nmap_report.getroot()
            for element in root_tree:
                try:
                    assert element.tag == 'host'
                    state = element.find('status').attrib['state']
                    assert state == 'up'

                    # region Address
                    for address in element.findall('address'):
                        if address.attrib['addrtype'] == 'ipv4':
                            ipv4_address = address.attrib['addr']
                        if address.attrib['addrtype'] == 'mac':
                            mac_address = address.attrib['addr'].lower()
                            try:
                                vendor = address.attrib['vendor']
                            except KeyError:
                                pass
                    # endregion

                    # region Open TCP ports
                    for ports_info in element.find('ports'):
                        if ports_info.tag == 'port':
                            ports.append(ports_info.attrib['portid'])
                    # endregion

                    # region OS
                    for os_info in element.find('os'):
                        if os_info.tag == 'osmatch':
                            try:
                                os = os_info.attrib['name']
                            except TypeError:
                                pass
                            break
                    # endregion

                    network_devices.append(self.Info(vendor=vendor, os=os, mac_address=mac_address,
                                                     ipv4_address=ipv4_address, ports=ports))
                except AssertionError:
                    pass

            remove(self._nmap_scan_result)
            assert len(network_devices) != 0, \
                'Could not find any devices on interface: ' + self._base.error_text(self._your['network-interface'])
            return network_devices

        except OSError:
            self._base.print_error('Something went wrong while trying to run ', 'nmap')
            if exit_on_failure:
                exit(2)

        except KeyboardInterrupt:
            self._base.print_info('Exit')
            exit(0)

        except AssertionError as Error:
            self._base.print_error(Error.args[0])
            if exit_on_failure:
                exit(1)

        return None