Last active
April 17, 2024 13:10
-
-
Save flymia/ec6baba024acfc76de82457dbc729cff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Thanks to: https://askubuntu.com/a/852027 | |
# Takes the following string: '\000\001\000\001\037\305\371\341\001\002\003\004\005\006' (example from /var/lib/dhcp/...) | |
# and converts it to a readable DHCPv6 DUID. | |
# usage: ./duid-converter.sh '\000\001\000\001\037\305\371\341\001\002\003\004\005\006' | |
printf $1 | hexdump -e '14/1 "%02x " "\n"' | sed 's/ /:/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment