Skip to content

Instantly share code, notes, and snippets.

@vladignatyev
Created March 29, 2020 08:10
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 vladignatyev/5f33b84c867df8a2f49171f10e61bbd4 to your computer and use it in GitHub Desktop.
Save vladignatyev/5f33b84c867df8a2f49171f10e61bbd4 to your computer and use it in GitHub Desktop.
Python script to generate secure passwords
L = 12; import os; voc = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()'; print(''.join([voc[int.from_bytes(os.urandom(1), "big") % len(voc)] for i in range(L)]))
@vladignatyev
Copy link
Author

vladignatyev commented Mar 29, 2020

Usage from the bash:

curl -s https://gist.githubusercontent.com/vladignatyev/5f33b84c867df8a2f49171f10e61bbd4/raw/58a1af02b70ef0180571aa1b3c3d2681d69576ca/pass.py | python3 -u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment