12 lines
339 B
Python
12 lines
339 B
Python
#!/usr/bin/env python3
|
|
import string
|
|
import crypt
|
|
from random import *
|
|
characters = string.ascii_letters + "~@#$%^&*()-_+=23456789"
|
|
|
|
for i in range(0,4):
|
|
password = "".join(choice(characters) for x in range(randint(10, 15)));
|
|
salt = crypt.mksalt(method=crypt.METHOD_SHA512);
|
|
print (password);
|
|
print (crypt.crypt(password,salt=salt));
|