2017-11-25 09:23:50 +00:00
|
|
|
from __future__ import print_function
|
2016-08-14 06:48:30 +00:00
|
|
|
import string
|
2016-10-08 17:09:59 +00:00
|
|
|
import random
|
2016-08-14 06:48:30 +00:00
|
|
|
|
2016-10-08 17:09:59 +00:00
|
|
|
letters = [letter for letter in string.ascii_letters]
|
|
|
|
digits = [digit for digit in string.digits]
|
|
|
|
symbols = [symbol for symbol in string.punctuation]
|
2016-08-14 06:48:30 +00:00
|
|
|
chars = letters + digits + symbols
|
2016-10-08 17:09:59 +00:00
|
|
|
random.shuffle(chars)
|
2016-08-14 06:48:30 +00:00
|
|
|
|
|
|
|
min_length = 8
|
|
|
|
max_length = 16
|
2016-10-08 17:09:59 +00:00
|
|
|
password = ''.join(random.choice(chars) for x in range(random.randint(min_length, max_length)))
|
|
|
|
print('Password: ' + password)
|
2016-08-14 06:48:30 +00:00
|
|
|
print('[ If you are thinking of using this passsword, You better save it. ]')
|
2018-01-06 06:54:10 +00:00
|
|
|
|
|
|
|
|
2017-09-28 21:35:52 +00:00
|
|
|
# ALTERNATIVE METHODS
|
|
|
|
# ctbi= characters that must be in password
|
|
|
|
# i= how many letters or characters the password length will be
|
|
|
|
def password_generator(ctbi, i):
|
|
|
|
# Password generator = full boot with random_number, random_letters, and random_character FUNCTIONS
|
2018-01-06 06:54:10 +00:00
|
|
|
pass # Put your code here...
|
|
|
|
|
|
|
|
|
2017-09-28 21:35:52 +00:00
|
|
|
def random_number(ctbi, i):
|
2018-01-06 06:54:10 +00:00
|
|
|
pass # Put your code here...
|
|
|
|
|
|
|
|
|
2017-09-28 21:35:52 +00:00
|
|
|
def random_letters(ctbi, i):
|
2018-01-06 06:54:10 +00:00
|
|
|
pass # Put your code here...
|
|
|
|
|
|
|
|
|
2017-09-28 21:35:52 +00:00
|
|
|
def random_characters(ctbi, i):
|
2018-01-06 06:54:10 +00:00
|
|
|
pass # Put your code here...
|