Last active
January 3, 2020 20:56
-
-
Save c-goes/9da5a9de09c0e2b6188d084be97b00ce to your computer and use it in GitHub Desktop.
IPv6 ULA generator
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 string | |
import random | |
h = string.hexdigits[:16] | |
def c(l): | |
return ''.join(random.choice(h) for _ in range(l)) | |
print(f"fd{c(2)}:{c(4)}:{c(4)}::/48") | |
print(f"fd{c(2)}:{c(4)}:{c(4)}:{c(4)}::/64") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment