Skip to content

Commit 5740981

Browse files
author
Programer043
authored
Fixed a Bug
1 parent 143cea0 commit 5740981

1 file changed

Lines changed: 30 additions & 27 deletions

File tree

GUI PasswdGen V2.py

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,38 @@ def Generate():
3535
lo = low.get()
3636
sm = smy.get()
3737
nu = num.get()
38-
if up or lo :
39-
if up and lo and nu and sm:
40-
PasswdGen(letters_full)
41-
elif up and nu and sm and not lo:
42-
PasswdGen(upcase_full)
43-
elif lo and nu and sm and not up:
44-
PasswdGen(lowcase_full)
45-
elif up and lo and sm and not nu:
46-
PasswdGen(letters_with_symbol)
47-
elif up and sm and not lo and not nu:
48-
PasswdGen(upcase_with_symbol)
49-
elif lo and sm and not up and not nu:
50-
PasswdGen(lowcase_with_symbol)
51-
elif up and lo and nu and not sm:
52-
PasswdGen(letters_with_digits)
53-
elif up and nu and not lo and not sm:
54-
PasswdGen(upcase_with_digits)
55-
elif lo and nu and not up and not sm:
56-
PasswdGen(lowcase_with_digits)
57-
elif up and lo and not nu and not sm:
58-
PasswdGen(letters)
59-
elif up and not lo and not nu and not sm:
60-
PasswdGen(upcase)
61-
elif lo and not up and not nu and not sm:
62-
PasswdGen(lowcase)
38+
if lenght.get() >= 8:
39+
if up or lo :
40+
if up and lo and nu and sm:
41+
PasswdGen(letters_full)
42+
elif up and nu and sm and not lo:
43+
PasswdGen(upcase_full)
44+
elif lo and nu and sm and not up:
45+
PasswdGen(lowcase_full)
46+
elif up and lo and sm and not nu:
47+
PasswdGen(letters_with_symbol)
48+
elif up and sm and not lo and not nu:
49+
PasswdGen(upcase_with_symbol)
50+
elif lo and sm and not up and not nu:
51+
PasswdGen(lowcase_with_symbol)
52+
elif up and lo and nu and not sm:
53+
PasswdGen(letters_with_digits)
54+
elif up and nu and not lo and not sm:
55+
PasswdGen(upcase_with_digits)
56+
elif lo and nu and not up and not sm:
57+
PasswdGen(lowcase_with_digits)
58+
elif up and lo and not nu and not sm:
59+
PasswdGen(letters)
60+
elif up and not lo and not nu and not sm:
61+
PasswdGen(upcase)
62+
elif lo and not up and not nu and not sm:
63+
PasswdGen(lowcase)
64+
else:
65+
messagebox.showerror("Error","You need to select option!")
6366
else:
64-
messagebox.showerror("Error","You need to select option!")
67+
messagebox.showerror("Error","You need to select Upper or Lower case Letters!")
6568
else:
66-
messagebox.showerror("Error","You need to select Upper or Lower case Letters!")
69+
messagebox.showerror("Error","Lenght Cannot be less than 7")
6770
Root = Tk()
6871
Root.title("PasswdGen V2")
6972
Root.geometry("250x300")

0 commit comments

Comments
 (0)