Last active
June 28, 2023 12:41
-
-
Save xanderlent/489799d25f2e4c26c58cd3d6f32c750b to your computer and use it in GitHub Desktop.
IPv6 ULA Random Prefix Generator (Python one-liner)
This file contains 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
import secrets; prefix = list("fd" + secrets.randbits(40).to_bytes(5, "big").hex() + "::/48"); prefix.insert(4, ":"); prefix.insert(9, ":"); print("".join(prefix)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment