packets.py
def __set_target_mac(self, mac_addr: str) -> str:
        """
        Sets the target's MAC address by sending it UDP datagrams with
        empty byte strings to random ports contained in the ephemeral
        port range (IETF RFC 6335) and then looking up its registered
        MAC address in the attacker's ARP table.
        """
        if mac_addr is not None:
            return mac_addr
        with socket(AF_INET, SOCK_DGRAM) as sock:
            while True:
                for entry in self.__net_tables.arp_table:
                    if entry['ip_address'] == self.__target_ip:
                        return entry['hw_address']
                sock.sendto(b'', (self.__target_ip, randint(49152, 65535)))
                sleep(2)

        Sets the target's MAC address by sending it UDP datagrams with
        empty byte strings to random ports contained in the ephemeral
        port range (IETF RFC 6335) and then looking up its registered
        MAC address in the attacker's ARP table.
        
Sets the target's MAC address by sending it UDP datagrams with
empty byte strings to random ports contained in the ephemeral
port range  and then looking up its registered
MAC address in the attacker's ARP table.
Sets the target ' s MAC address by sending it UDP datagrams with empty byte strings to random ports contained in the ephemeral port range and then looking up its registered MAC address in the attacker ' s ARP table .
def __set_target_mac(self, mac_addr: str) -> str:
        if mac_addr is not None:
            return mac_addr
        with socket(AF_INET, SOCK_DGRAM) as sock:
            while True:
                for entry in self.__net_tables.arp_table:
                    if entry['ip_address'] == self.__target_ip:
                        return entry['hw_address']
                sock.sendto(b'', (self.__target_ip, randint(49152, 65535)))
                sleep(2)
def __set_target_mac ( self , mac_addr : str ) -> str : if mac_addr is not None : return mac_addr with socket ( AF_INET , SOCK_DGRAM ) as sock : while True : for entry in self . __net_tables . arp_table : if entry [ 'ip_address' ] == self . __target_ip : return entry [ 'hw_address' ] sock . sendto ( b'' , ( self . __target_ip , randint ( 49152 , 65535 ) ) ) sleep ( 2 )
Sets the target's MAC address by sending it UDP datagrams with
empty byte strings to random ports contained in the ephemeral
port range (IETF RFC 6335) and then looking up its registered
MAC address in the attacker's ARP table.
Sets the target ' s MAC address by sending it UDP datagrams with empty byte strings to random ports contained in the ephemeral port range ( IETF RFC 6335 ) and then looking up its registered MAC address in the attacker ' s ARP table .
"""
        Sets the target's MAC address by sending it UDP datagrams with
        empty byte strings to random ports contained in the ephemeral
        port range (IETF RFC 6335) and then looking up its registered
        MAC address in the attacker's ARP table.
        """
self
mac_addr
str