Skip to content

Instantly share code, notes, and snippets.

@lordsutch
Created February 1, 2017 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordsutch/eb0d9438f72cbc4e5ee0dbc86ad0112a to your computer and use it in GitHub Desktop.
Save lordsutch/eb0d9438f72cbc4e5ee0dbc86ad0112a to your computer and use it in GitHub Desktop.
Generate a password/key for a MoCA network with Python 3.6+
#!/usr/bin/env python3.6
import string
import secrets
while True:
password = secrets.randbelow(100000000000000000)
if password >= 100000000000:
break
print(password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment