22 lines
487 B
Python
22 lines
487 B
Python
|
"""
|
||
|
Generador de claves
|
||
|
"""
|
||
|
|
||
|
import random
|
||
|
|
||
|
print('\nGenerador de Claves')
|
||
|
print('===================\n')
|
||
|
|
||
|
chars = 'abcdefghijklmnñopqrstuvwzyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ1234567890#$%¿?^¡!=+-()*/{}<>[]~\,._'
|
||
|
|
||
|
cantidad = int(input('Cuantas claves necesitas?_'))
|
||
|
largo = int(input('Que largo deben tener las claves?_'))
|
||
|
|
||
|
print('\nEstas son las claves :')
|
||
|
|
||
|
for pwd in range(cantidad):
|
||
|
clave = ''
|
||
|
for i in range(largo):
|
||
|
clave += random.choice(chars)
|
||
|
print(clave)
|