0% found this document useful (0 votes)
27 views16 pages

Password Management System Project

Uploaded by

pradhumankamble6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views16 pages

Password Management System Project

Uploaded by

pradhumankamble6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PM SHRI KENDRIYA

VIDYALAYA No. 2 AFS, PUNE

COMPUTER SCIENCE PROJECT

PASSWORD MANAGEMENT SYSTEM

Subject: Computer Science (083)

Submitted by: Guided


by:
Shruti Chandravanshi Hari Shankar Rai
(PGT CS)
Class: 12th A
Roll no:

Academic Year: 2024 – 2025


ACKNOWLEDGEMENT

I would like to express my special thanks of


gratitude to our Bharat Bhushan, Principal, PM
SHRI K V No. 2, AFS, Pune and to my CS teacher
Hari Shankar Rai sir who gave me the golden
opportunity to do this wonderful project and
provided all necessary support to do the project on
the topic Password Management System which
also allowed me to do a lot of research and I came
to know about so many new things, I am really
thankful to them.

Secondly, I would also like to thank my parents and


friends who helped me a lot in completing this
project within the limited time frame.
Shruti Chandravanshi

CERTIFICATE

This to certify that Shruti Chandravanshi of class


12A has successfully completed his/her python
project on the topic ‘Password Management
system’ for the subject Computer Science (083)
as prescribed by CBSE, under the guidance of Hari
Shankar Rai, PGT CS, during the academic year
2024 -2025.

Internal Principal
External Examiner
Examiner
CONTENTS

[Link] Topic Page


no.
1 Introduction 5
2 About the Project 6
3 Code 7
4 Output 10
5 Bibliography & 14
References
INTRODUCTION

The Password Management System is a Python


program designed to securely manage your
passwords. This tool helps you store, retrieve,
and manage passwords for various accounts.

The project features a simple GUI application


built using the Tkinter module, providing a user-
friendly interface. Users can add, retrieve, list,
and delete passwords with ease, ensuring they
never forget or misplace their credentials.

The project uses simple Python concepts and


structure formatting in order to make the code
more efficient and readable.
ABOUT THE PROJECT
The objective of this project is to enable students to apply their
programming skills to address real-world challenges, enhancing
their logical thinking and programming abilities throughout the
process.
This Python project provides a secure and efficient solution for
managing passwords, allowing users to store, retrieve, list, and
delete passwords with ease.

This Python program incorporates various concepts, including:


Modules
User-defined functions
Dictionaries
Lists
If, elif, else statements
File handling

Different data types such as strings and integers are manipulated


within this program.
We have applied various concepts from this module, such as
creating a GUI window screen, labels, and buttons.
The program starts with an elegant opening GUI screen,
welcoming the user and displaying options for different
functionalities. Users can add a new password by entering a
username and password, retrieve a password by entering the
username, list all stored passwords, or delete a specific password.
Each action is accompanied by informative message boxes that
provide feedback to the user.
By integrating these features, the Password Manager aims to
enhance online security and convenience, enabling users to
maintain strong, unique passwords for their accounts without the
hassle of remembering them all.

CODE
import tkinter as tk
from tkinter import messagebox

def add():
username = [Link]()
password = [Link]()
if username and password:
f = open("[Link]", 'a')
[Link](f"{username} {password}\n")
[Link]("Success", "Password
added !!")
[Link]()
else:
[Link]("Error", "Please enter
both the fields")

def get():
username = [Link]()
passwords = {}
try:
f = open("[Link]", 'r')
data = [Link]()
for k in data:
i = [Link]()
if len(i) == 2:
passwords[i[0]] = i[1]
except EOFError:
print("ERROR !!")
if passwords:
for i in passwords:
if i == username:
mess = f"Password for {username} is
. {passwords[i]}\n"
break
else:
mess = "No Such Username Exists !!"
[Link]("Passwords", mess)
else:
[Link]("Passwords", "EMPTY
LIST!!")

def getlist():
passwords = {}
try:
with open("[Link]", 'r') as f:
data = [Link]()
for k in data:
i = [Link]()
if len(i) == 2:
passwords[i[0]] = i[1]
except EOFError:
print("No passwords found!!")
if passwords:
mess = "List of passwords:\n"
for name, password in [Link]():
mess += f"Password for {name} is
{password}\n"
[Link]("Passwords", mess)
else:
[Link]("Passwords", "Empty
List !!")

def delete():
username = [Link]()
temp_passwords = []
try:
with open("[Link]", 'r') as f:
data = [Link]()
for k in data:
i = [Link]()
if len(i) == 2 and i[0] != username:
temp_passwords.append(f"{i[0]}
{i[1]}")
with open("[Link]", 'w') as f:
for i in temp_passwords:
[Link](i+"\n")
if any(username == [Link]()[0] for k in data
if len([Link]()) == 2):
[Link]("Success", f"User
{username} deleted successfully!")
else:
[Link]("Info", f"No user named
{username} was found.")
except Exception as e:
[Link]("Error", f"Error deleting
user {username}: {e}")

app = [Link]()
[Link](0,0)
[Link]("600x300")
[Link](bg='#aed6f1')
[Link]("Password Management System")

center_frame = [Link](app)
center_frame.place(relx=0.5, rely=0.5, anchor =
[Link])

entry = [Link](app, bg='#aed6f1', fg='#FFFFFF',


text='Welcome . to Password Management System!',
font=('Footlight MT . Light',16,'bold'))
[Link](x=10, y=30, width=600, height=40)

labelName = [Link](center_frame, text="USERNAME:")


[Link](row=0, column=0, padx=15, pady=15)
entryName = [Link](center_frame)
[Link](row=0, column=1, padx=15, pady=15)

labelPassword = [Link](center_frame,
text="PASSWORD:")
[Link](row=1, column=0, padx=10, pady=5)
entryPassword = [Link](center_frame)
[Link](row=1, column=1, padx=10, pady=5)

buttonAdd = [Link](center_frame, text="Add",


command=add)
[Link](row=2, column=0, padx=15, pady=8,
sticky="we")

buttonGet = [Link](center_frame, text="Get",


command=get)
[Link](row=2, column=1, padx=15, pady=8,
sticky="we")
buttonList = [Link](center_frame, text="List",
command=getlist)
[Link](row=3, column=0, padx=15, pady=8,
sticky="we")
buttonDelete = [Link](center_frame, text="Delete",
command=delete)
[Link](row=3, column=1, padx=15, pady=8,
sticky="we")

[Link]()

Output
Add:
List:
Get:

Delete:
BIBLIOGRAPHY & REFERENCES

Computer Science with Python by Sumita Arora

class 12th.

[Link]

[Link]

Common questions

Powered by AI

The project uses message boxes to provide immediate and clear feedback for actions like successful password addition or retrieval errors. This ensures that users are informed about the status of their actions, enhancing usability. Informative feedback helps users understand what has occurred, increasing confidence and reducing errors while using the application .

The graphical layout provides a more user-friendly and accessible interface compared to command-line interfaces, making the application easier for users of all skill levels to operate. Users can perform actions like adding and retrieving passwords intuitively using buttons and entry fields without needing command syntax knowledge, aligning with the project's objective to enhance logical thinking and programming skills by including user-centric design .

The application uses logic structures like if-elif-else to control program flow and validate inputs and actions. For example, the 'add' and 'get' functions utilize these structures to check input and decide on operations like writing to files or displaying messages. This ensures the program operates as expected even under varying inputs and conditions .

The application reflects modular programming by dividing functionality into independent functions such as 'add', 'get', 'getlist', and 'delete'. This separation allows easier maintenance, testing, and updating of code. Each function handles a specific task and interacts with GUI elements to perform its intended function, demonstrating cohesion and separation of concerns .

The Password Management System uses Tkinter to create a graphical user interface that allows users to interact with the program in a visual and user-friendly manner. This enhances the user experience by providing a simple and intuitive way to add, retrieve, list, and delete passwords. The GUI includes labels, entry fields, and buttons that make it easy for users to navigate the application and perform actions without needing to interact with a command line interface .

The project uses try-except blocks to manage file operations, attempting to read and write to files while catching exceptions like EOFError to prevent crashes. However, error handling could be improved by catching more specific exceptions, such as FileNotFoundError, and providing more informative error messages to guide user resolution steps .

The project uses file handling to store passwords persistently in a text file named 'passwords.txt'. Functions like open(), readlines(), and write() are used to read and write password data. When a password is added, it's appended to the file. For retrieval and deletion, the file is read into memory, manipulated, and written back. This approach allows persistent storage but raises concerns about security risks such as unauthorized access to the text file unless additional encryption is applied .

The 'add' function checks if both the username and password fields have been filled before proceeding to append them to the file. It uses entry fields for input and checks their contents; if either is empty, it shows an error message box, ensuring the user must provide complete input data to store a password, thereby preventing incomplete records in the password file .

Dictionaries are used for storing username-password pairs, allowing efficient retrieval, listing, and deletion of passwords by key (username). A potential improvement could be using more sophisticated data structures to enhance performance for a larger scale or securing the dictionary data with encryption for better security .

Storing passwords as plain text in files is insecure because unauthorized individuals could easily access the stored passwords if they gain access to the file. To improve security, one could encrypt passwords before storing them, using libraries like hashlib or cryptography to hash the passwords. This prevents attackers from retrieving user passwords even if they access the storage file .

You might also like