Skip to content

ValueError: Unknown format code 'x' for object of type 'str' #1

@urwithajit9

Description

@urwithajit9

# Returns MAC as string from bytes (ie AA:BB:CC:DD:EE:FF) def get_mac_addr(mac_raw): byte_str = map('{:02x}'.format, mac_raw) mac_addr = ':'.join(byte_str).upper() return mac_addr
After running the above function the sniffer program is throwing below error;
ValueError: Unknown format code 'x' for object of type 'str'
I am running with sudo command on my Ubuntu machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions