Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c696ff

Browse files
Merge pull request avinashkranjan#2855 from smty2018/pwd-checker
Common Password Checker GUI
2 parents 154e536 + 5a1ae92 commit 1c696ff

File tree

3 files changed

+10038
-0
lines changed

3 files changed

+10038
-0
lines changed

‎Common Password Checker/ReadMe.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Password Checker GUI :
2+
3+
GUI application that allows you to check if a given password is common or unique. Check if a password is common or unique based on a list of common passwords.Displays a message box with the results of the password check.
4+
5+
Requirements:
6+
pip install tkinter

‎Common Password Checker/app.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import tkinter as tk
2+
from tkinter import messagebox
3+
4+
def check_password(password):
5+
with open("pwd.txt", "r") as file:
6+
common_passwords = file.read().splitlines()
7+
8+
for i, common_pwd in enumerate(common_passwords, start=1):
9+
if password == common_pwd:
10+
messagebox.showinfo("Password Check", f"{password}: not unique (#{i})")
11+
return
12+
13+
messagebox.showinfo("Password Check", f"{password}: unique")
14+
15+
def main():
16+
app = tk.Tk()
17+
app.title("Password Checker")
18+
app.configure(bg="black")
19+
20+
label = tk.Label(app, text="Enter Password:", fg="white", bg="black")
21+
label.pack()
22+
23+
password_entry = tk.Entry(app, show="*")
24+
password_entry.pack()
25+
26+
check_button = tk.Button(app, text="Check", command=lambda: check_password(password_entry.get()))
27+
check_button.pack()
28+
29+
app.mainloop()
30+
31+
if __name__ == "__main__":
32+
main()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /