Python 3.4: Unknown format code 'x'
I have issue about packet sniffer in Python3. version of python: 3.4 I followed some tutorial that works, but not on my computer. This code has to get mac address, convert it to string and in main() method should print to me destination mac, source mac and protocol. code: sniffer_demo.py import socket import struct import textwrap def main(): conn = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(3)) while True: raw_data, addr = conn.recvfrom(65536) # one's and zero's put to the method ehternet_frame dest_mac, src_mac, eth_proto, data = ethernet_frame(raw_data) print('\nEthernet