Generador de contraseñas aleatorias

Iniciado por Gh0st.C, Mayo 19, 2011, 10:32:50 PM

Tema anterior - Siguiente tema

0 Miembros y 2 Visitantes están viendo este tema.

No queria estudiar para biología, el sistema reproductor, la menstruación :P (?), asique me puse a hacer este simple código que (obviamente) genera passwords aleatorios 8), por si se te acabaron las ideas, o si no queres  pensar, o lo que sea. ::)
Me alegraría que les sirva.

Código: python
#!/usr/bin/python

import random

from random import choice



Ran1 = random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Ran2 = random.choice(range(0,100))

Ran3 = random.choice('abcdefghijklmnopqrstuvwxyz')

Ran4 = random.choice('|@#$%&()=')

Convert = str(Ran2)

Junta = Ran1+Convert+Ran3+Ran4

i = 0

while i <1:

    Ran1 = random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

    Ran2 = random.choice(range(0,100))

    Convert2 = str(Ran2)

    Ran3 = random.choice('abcdefghijklmnopqrstuvwxyz')

    Ran4 = random.choice('\@#$%&/()=')

    Junta2 = Convert2+Ran4+Ran1+Ran3

    i+=1

print Junta + Junta2   

Thanks

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login


Citarpor si se te acabaron las ideas, o si no queres  pensar,
jajaj muy bueno.
Gracias.

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login