Hola , pues hice un generador de passwords en Python basado en un code en C++ de Jh0uBrt
Eh aqui el code en ambos lenguajes XD

CODIGO C++
#include<iostream>
#include<cstdlib>
#include<ctime>

using namespace std;
//Original By Jh0uBrt
//Modified by [Z]tuX
int main()
{
srand(time(NULL));
int Cifras,Nl;
char Letras[45] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0','"','#','%','&','/','-','_','='};
cout<<"Cuantas cifras tendra la clave a generar?: ";
cin>>Cifras;
cout<<endl<<"Clave : ";
while (Cifras>0){
Nl=rand()%44;
cout<<Letras[Nl];
Cifras--;
}
return 0;
}



CODIGO PYTHON

#Generador de Passwords
#Ver 0.1
import random
a = 3600
letras = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0','"','#','%','&','/','-','_','=']
cifras = input("Cuantas cifras tendra la clave a generar?: ")
print 'Clave: '
while (cifras>0):
nl = random.randint(0,a)%44
print letras[nl],
cifras=cifras-1

#By [Z]tuX

edit post

Comments

0 Response to 'Generador de Passwords en C++ y Python'

Publicar un comentario