Skip to content

Instantly share code, notes, and snippets.

@DOKL57
Last active April 22, 2019 12:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save DOKL57/e54ac54675d6c597dd351d554f60148b to your computer and use it in GitHub Desktop.
Save DOKL57/e54ac54675d6c597dd351d554f60148b to your computer and use it in GitHub Desktop.
Python password generator
import random
num = input('login ')
pas = ''
for x in range(16): #Number of characters in password (16)
pas = pas + random.choice(list('1234567890abcdefghigklmnopqrstuvyxwzABCDEFGHIGKLMNOPQRSTUVYXWZ')) #The characters from which the password will be composed
print('Hello, ', num, 'your password is: ', pas)
Copy link

ghost commented Nov 14, 2018

import random

login = ["login","admin","user"]

for x in login:
passwd = list('1234567890abcdefghigklmnopqrstuvyxwzABCDEFGHIGKLMNOPQRSTUVYXWZ!@#$%^&*()-=_|/?><')
random.shuffle(passwd)
passwd = ''.join([random.choice(passwd) for x in range(10)])

print("LOGIN: {}".format(x))
print("PASSWD: {}".format(passwd))
print("----------------------")

input()

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