├── README.md ├── Şifre Oluşturucu.py └── Şifre Oluşturucu2.py /README.md: -------------------------------------------------------------------------------- 1 | # Password-Generator 2 | Password Genarator-Şifre Oluşturucu 3 | Python üzerinden random şifre oluşturmak için yazılmış basit bir program. 4 | -------------------------------------------------------------------------------- /Şifre Oluşturucu.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | import time 4 | try: 5 | while True: 6 | def generate_password (length,level,output=[]): 7 | chars = string.ascii_letters 8 | if level > 1: 9 | chars = "{},{}".format(chars,string.digits) 10 | if level > 1: 11 | chars = "{},{}".format(chars,string.punctuation) 12 | #if level > 1: 13 | #chars = "{},{}".format(chars,string.hexdigits) 14 | 15 | 16 | for i in range(length): 17 | output.append(random.choice(chars)) 18 | 19 | return"".join(output) 20 | 21 | print (""" 22 | Level 0 = Çok kolay 23 | Level 1 = Kolay 24 | Level 2 = Orta 25 | Level 3 = Zor 26 | Level 4 = Çok Zor 27 | """) 28 | print("Lütfen Bekleyin...") 29 | time.sleep(5) 30 | password_length = int(input("Uzunluk: ")) 31 | password_level = int(input("Zorluk Derecesi: ")) 32 | password = generate_password(password_length, password_level) 33 | print("\nSenin Şifren: {}".format(password)) 34 | continue 35 | except KeyboardInterrupt: 36 | print ("\n Çık & Resetle ") 37 | print ("\n Developer Abdurrahman Aydın") 38 | time.sleep(3) -------------------------------------------------------------------------------- /Şifre Oluşturucu2.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | 4 | password = [] 5 | letters = string.ascii_letters 6 | numbers = string.digits 7 | symbols = string.punctuation 8 | 9 | try: 10 | input_letters = int(input("Kaç adet harf olsun ?: ")) 11 | except: 12 | print ("Lütfen sayı gir") 13 | exit() 14 | 15 | try: 16 | input_numbers = int(input("Kaç adet sayı olsun ?: ")) 17 | except: 18 | print ("Lütfen sayı gir") 19 | exit() 20 | 21 | try: 22 | input_symbol = int(input("Kaç adet sembol olsun: ")) 23 | except: 24 | print ("Lütfen sayı gir") 25 | exit() 26 | 27 | for z in range(input_letters): 28 | n = random.choice(letters) 29 | password.append(n) 30 | 31 | for x in range(input_numbers): 32 | n = random.choice(numbers) 33 | password.append(n) 34 | 35 | for c in range(input_symbol): 36 | n = random.choice(symbols) 37 | password.append(n) 38 | 39 | password = "".join(password) 40 | 41 | 42 | print("Şifre hazır!") 43 | print("Şifren ---> ",password," <---") --------------------------------------------------------------------------------