READING

python ile rasgele sifreler uretmek – 3

python ile rasgele sifreler uretmek – 3

Kullanimi : python3 password3.py 10 22   #10 adet 22 karakterden olusan sifre uretir.

import string, sys, random
def rasgele (adet, ras):
    for i in range(adet):
        karakterler = string.hexdigits + string.punctuation
        rand = (random.sample(karakterler, ras))
        print(*rand, sep="")

rasgele(int(sys.argv[1]),int(sys.argv[2]))

Ornek Ekran Ciktisi:
screenshot_2016-11-15_16-37-02


RELATED POST

Your email address will not be published. Required fields are marked *