def main():
    connection = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(3))
    while True:
        (read_data, addr) = connection.recvfrom(65536)
        (send_mac, recv_mac, protocol, packet_data) = ethernet(read_data)
        print('\nEthernet Data:')
        print((Fore.GREEN + 'Destination: {}, Source: {}, Protocol: {}'.format(send_mac, recv_mac, protocol)))
def main():
    connection = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(3))
    while True:
        (read_data, addr) = connection.recvfrom(65536)
        (send_mac, recv_mac, protocol, packet_data) = ethernet(read_data)
        print('\nEthernet Data:')
        print((Fore.GREEN + 'Destination: {}, Source: {}, Protocol: {}'.format(send_mac, recv_mac, protocol)))