You are on page 1of 67

A PROJECT REPORT

ON

“Password Manager”

Submitted in partial fulfilment of the requirement for the award of degree of

BACHELOR OF COMPUTER APPLICATION OF

BANGALORE UNIVERSITY

2021

BY

Imran A F (18NCSB7013)
Ganesh M (18NCSB7011)
Vimalnath V (18NCSB7070)

Under the guidance of

Prof. Nayana K V

DEPARMENT OF COMPUTER APPLICATION

ST. FRANCIS DE SALES COLLEGE

BENGALURU-560100
DECLARATION

We the projct team members, Imran A F, Ganesh M and Vimalnath V, hereby

declare that the Project Report titled “Password Manager” submitted to

Bangalore University, Bengaluru in paritial fulfilment of the requirements for


the

award of the Degree of Bechelor of Computer Application is a report of work

done by us under the supervision of Prof. Nayana K V. We also declare that


this

report any part of it has not submitted to any other University/Institute for the

award of any degree.

Signature of Student
CERTIFICATE

This is to certify that the project titled “Password Manager” submitted by

………….….…..…………………… Reg.No ………………………..

to Bangalore University, in partial fulfillment of the requirement for the award

the Bechelor of Computer Application in ……………..

Internal Examiner Lecture in Charge

External Exmainer HOD


ACKNOWLEDGEMENT

I would like to express my sincere gratitude and regards to my internals guide

Prof. Nayana K V for her constant inspiration, supervision and invaluable

guidance during the training. I would also like to thank father Rev Dr. Roy
P.K.

for giving such an opportunity to continue my training in the (St. Francis de


sales

college) and providing the facility.

At last, I would also like to extend my sincere gratitude to all my faculty


members

and specially Prof. Nayana K V (internal guide) for giving their valuable

suggestions.

Signature of Student
(Sign of HOD) (Sign of Internal Guide)

ABSTRACT

“Password Manager” is a small-scale project used for storing your login

information for all the websites you use and generating random passwords

for users. The user will have the access to add, update and remove his details

and he can fetch his data whenever needed.

It’s an GUI based application simple and easy to use. It has a lot’s of

feature which makes user experience better. In this application Passwords

can be stored for various applications and details required for maintaining

the Passwords are application or website name, username, password and

email id.

You would not get any problem while using it because it’s simple and

user friendly UI will make your work easy, faster and gives you a better

result.
TABLE OF CONTENTS

Table of Contents

1. INTRODUCTION
1.1. Basic introduction of Project
1.2. Objective and Scope
1.3. Tools and Technologies used

2. SYSTEM ANALYSIS
2.1. Preliminary analysis & Information gathering
2.2. Input/outputs
2.3. Feasibility Study
2.4. System Requirements Specification
2.5. Software Engineering Model Used
2.6. Cost Estimation
2.7. Project Scheduling

3. SYSTEM DESIGN
3.1. Project Planning
3.2. Modules
3.3. Data Flow Diagram
3.4. E-R Diagram
3.5. Data Base Design
3.6. Screen Shots

4. TESTING

5. IMPLEMENTATION & MAINTENANCE

6. REFERENCES
CHAPTER 1
INTRODUCTION
INTRODUCTION

1.1 Basic Introduction:

Password Manager is an GUI based application that allows users to store and

generate random passwords. It is created in Python using Tkinter and Mysql

database to manage passwords for several application. A password manager

is a program that houses all your passwords, as well as other information, in

one convenient location with one master password.

The benefits of using Password Manager are:

 A Password Manager will do the work of creating the complicated

passwords you need to help protect your online accounts.

 You need to remember only the password manager’s password. That

single password will give you access to all of your others.

Not only do password managers help securely house your passwords, but

they can also generate passwords that are unique and complex, which makes

them more difficult to crack or guess. It also simplifies your life by making

account access easier for you and more diffifcult for hackers. You don’t have

to memorize any passwords except for the password to your password


manager.

That means you can actually follow unpleasant butuseful security advice, like

never reusing a password and always using long, strong and complex
passwords.
[1]
1.2 Objectives and scope:

In this project, we will build an application which will store the User’s
password, as well as other information, in one convenient location with one
master password. Python Features and methods are used to implement in this
project. Today, people have a large number of passwords for social media sites,
work logins, shopping pages, online banking and much more. While it is
important to use strong passwords and to use different passwords on each site,
it can be a difficult task to remember all them. With a password manager, you
simply enter the GUI app, provide the master password you set for the password
manager in that software, then log in to the GUI app and the username and
password will be stored for you. However, the primary purpose of
this project to make Password Manager application user-friendly so that any
individual can interact with the system.

The main scope and deliverables of the project would be to:

 Understand and prepare detailed user requirement and specifications.


 Prepare high level and detailed design specifications of the system.
 Prepare Test Plan & Test cases.
 Develop the system and coding.
 Perform unit testing, integration testing and system testing.
 Demonstrate a bug free application after suitable modification, if needed.
 Develop a GUI application using Python Tkinter.

[2]
1.3 Tools And Technologies:

Python: -

Python is an interpreted high-level and general-purpose programming language.


Its language constructs and object-oriented approach aim to help programming
write clear, logical code for small and large-scale projects.
Python is dynamically-typed and garbage-collected. It supports structured,
Object-oriented and functional programming.
Python was created in the late 1980’s, and first released in 1991, by Guido Van
Rossum at Centrum Wiskunde & Informatica in the Netherlands as a successor
to ABC programming language.

Python GUI Framework:

A Graphical User Interface (GUI) is the first thing your user sees and interacts

with when he opens your application or website. Having a good GUI goes a long

way in increasing your platform’s reputation and user count. A user interface

usually includes a host of visual elements like icons, buttons, graphics, displayed

text, and several other forms of input, like checkbox, text input boxes, and such.

Tkinter :
Often referred to as the go-to GUI toolkit by a majority of Python developers,

Tkinter was created to equip modern developers with a standard interface

to the Tk GUI toolkit with its Python bindings. The name Tkinter comes


from Tk

[3]
interface. Tkinter was written by Fredrik Lundh and it is free software released

under a Pyhton license.

a) Window:

This term has different meanings in different contexts, but in general it

refers to a rectangular area somewhere on the user's display screen.

b) Widget:

The generic term for any of the building blocks that make up an

application in a graphical user interface.

1. Core widgets: Containers: frame, labelframe, toplevel, paned

window. Buttons: button, radiobutton, checkbutton (checkbox),

and menubutton. Text widgets: label, message, text. Entry widgets:

scale, scrollbar, listbox, slider, spinbox, entry (singleline),

optionmenu, text (multiline), and canvas (vector and pixel

graphics).

2. Tkinter provides three modules that allow pop-up dialogs to be

displayed: tk.messagebox (confirmation, information, warning and

error dialogs)

c) Themed Tk:

This allows Tk widgets to be easily themed to look like the native

desktop environment in which the application is running, thereby

addressing a long-standing criticism of Tk (and hence of Tkinter). Some

widgets are exclusive to ttk, such as the combobox, progressbar and

treeview widgets.

[4]
d) Frame:

In Tkinter, the Frame widget is the basic unit of organization for complex

layouts. A frame is a rectangular area that can contain other widgets.

e) Pack:

Pack it into position so it becomes visible. Developers also have the

option to use ‘ .grid() ’ (row=int, column=int to define rows and columns

to position the widget, defaults to 0) and ‘ .place() ’ (relx=int or decimal,

rely=int or decimal, define coordinates in the frame, or window) .

Tkinter is included with standard Linux, Microsoft Windows and Mac OS X

installs of Python.

MySQL:

MySQL is an open-source relational database management system

(RDBMS). language for relational database management systems. It is used for

storing, manipulating and retrieving data in databases. Its name is a combination

of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the

abbreviation for Structured Query Language. A relational database organizes

data into one or more data tables in which data types may be related to each

other these relations help structure the data.  SQL is used to create, modify and

extract data from the relational database, as well as control user access to the

database.

[5]
CHAPTER 2
SYSTEM ANALYSIS

[6]
SYSTEM ANALYSIS

2.1 Preliminary Analysis & Information Gathering :

System analysis is the process of gathering and interpreting facts, diagnosing


problems and using the information to recommend improvements on the
system. System analysis is a problem-solving activity that requires intensive
communication between the system users and system developers.
System analysis or study is an important phase of any system development
process. The system is viewed as a whole, the inputs are identified and the
system is subjected to close study to identify the problem areas. The solutions
are given as a proposal. The proposal is reviewed on user request and suitable
changes are made. This loop ends as soon as the user is satisfied with the
proposal.

2.2 Input /Output:

Input Design:

Input design is the link that ties the information system into the world
of its users. The input design involves determining the inputs, validating the
data, minimizing the data entry and provides a multi-user facility. Inaccurate
inputs are the most common cause of errors in data processing. Errors entered
by the data entry operators can be controlled by input design. The user-
originated inputs are converted to a computer-based format in the input design.
Input data are collected and organized into groups of similar data. Once
identified, the appropriate input media are selected for processing. All the input
data are validated and if any data violates any conditions, the user is warned by
a message. If the data satisfies all the conditions, it is transferred to the
appropriate tables in the database. In this project the student details are to be
entered at the time of registration. A page is designed for this purpose which is
user friendly and easy to use. The design is done such that users get appropriate
messages when exceptions occur.

[7]
Output Design:

A quality output is one, which meets the requirements of the end user
and presents the information clearly. In any system results of processing are
communicated to the users and to other system through outputs. In output
design it is determined how the information is to be displaced for immediate
need and also the hard copy output. It is the most important and direct source
information to the user. Efficient and intelligent output design improves the
system’s relationship to help user decision-making.

1. Designing computer output should proceed in an organized, well thought out


manner; the right output must be developed while ensuring that each output
element is designed so that people will find the system, can use easily and
effectively.

2. Select methods for presenting information.

3. Create document, report, or other formats that contain information produced


by the system.

4.The output form of an information system should accomplish one or more of


the following objectives.

i. Convey information about past activities, current status or projections of the


future.
ii. Signal important events, opportunities, problems, or warnings.
iii. Trigger an action. Confirm an action.

2.3 Feasibility Study:

Feasibility study is most important and it concerns great to the student and
faculty which new system is to be developed. It includes the study of success
and level of satisfaction of the user will get from the system. Feasibility means
possibilities (to some extent), i.e., this study the possibility of implementation of
[8]
new system as a substitute to old system removing all shortcomings and
including all new requirements.

2.4 System Requirement Specification:

Hardware Requirements
Memory Space:
Minimum - 32 MB

Recommended - 64 MB

PROCESSOR - Intel Pentium IV, 1GHZ or above

RAM - 256MB or above

Software Requirements

OPERATING SYSTEM - WindowsXP Professional or above

DEVELOPING LANGUAGE -

FRONT END - PYTHON (Tkinter)

BACKEND - PYTHON

DATABASE - MY SQL

[9]
2.5 SOFTWARE ENGENEERING MODEL USED:

This document plays a vital role in the development of life cycle (SDLC) as it
describes the complete requirement of the system. It means for use by
developers and will be the basic during testing phase. Any changes made to the
requirements in the future will have to go through formal change approval
process.

SPIRAL MODEL was defined by Barry Boehm in his 1988 article, “A spiral
Model of Software Developed and Enhancement. This model was not the first
model to discuss iterative development, but it was the first model to explain by
the iteration models.

As originally envisioned, the iterations were typically 6 months to 2 years long.


Each phase starts with a design goal and ends with a client reviewing the
progress thus far. Analysis and engineering efforts are applied at each phase of
the project, with an eye toward the end goal of the project.

The steps for Spiral Model can be generalized as follows:

i. The new system requirements are defined in as much details as possible.


This usually involve interviewing a number of users representing all the
external and internal users and other aspects of the existing system.

2. A preliminary design is created for the new system.


3. A first prototype of the new system is constructed from the preliminary
design. This is usually a scaled-down system, and represents approximation
of the characteristics of the final product.
4. A second prototype is evolved by a fourfold procedure:
5. Evaluating the first prototype in terms of its strengths, weakness, and risks
6. Defining the requirements of the second prototype.

[10]
7. Planning and designing the second prototype.
8. Constructing and testing the second prototype.
9. The final system is constructed, based on the refined prototype.

The following diagram shows how a spiral model act like:

[11]
2.6 Cost Estimations

Economic analysis is the most frequently used technique for evaluating the
effectiveness of a proposed system. It is commonly known as cost/benefit
analysis: the procedure is to determine the benefits and savings that are
expected from a proposed system and compare them with cost. If benefits
outweigh cost, a decision is taken to design and implement the system.
Otherwise, further justification or alternative in the proposed system will have
to be made if it is to have a chance of being approved. This is an ongoing effort
that improves in accuracy at each phase of the system life cycle. Total estimated
cost of the project.
Financing of the project in terms of its capital structure, debt e/unity ratio and
promoters share of total cost.
Existing investment by the promoter in any other business
Projected cash flow and profitability.

2.7 Project scheduling

Project scheduling is a mechanism to communicate what tasks need to get done


and which organizational resources will be allocated to complete those tasks in
what time frame. A project schedule is a document collecting all the work
needed to deliver the project on time.

A project is made up of many tasks, and each task is given a start and end (or
due date), so it can be completed on time. Likewise, people have different
schedules, and their availability and vacation or leave dates need to be
documented in order to successfully plan those tasks.

[12]
Project scheduling provides the following benefits:

 Assists with tracking, reporting on, and communicating progress.

 Ensures everyone is on the same page as far as tasks, dependencies, and


deadlines.

 Helps highlight issues and concerns, such as a lack of resources.

 Helps identify task relationships.

 Can be used to monitor progress and identify issues early.

[13]
CHAPTER 3
SYSTEM DESIGN

[14]
SYSTEM DESIGN

3.1 Project planning:

Project management begins with planning, which perhaps the single largest
responsibility of the project management Proper planning is recognized as a
critical ingredient for a successful project. The project plan provides the
fundamental basis for project management.
A software plan is usually produced before the development activity begins and
is updated as development proceeds and data about progress of the project
become available. The major activities of project planning is :

● Cost estimation

● Schedule and Milestone determination

● Project-Staffing

● Quality control plans

● Controlling and monitoring plan

Cost and schedule estimation is the amount of total cost and time nedded for
successfully completing the project. In addition, cost and schedule for the
different activities of development process to be used are also estimated, as the
development process only specifies the activities, not the cost and time
requirement for them. In this project, the cost is calculated on the effort of the
hardware and software cost.

Activities carried out are scheduling the project according to the time

[15]
limit and obtaining the correct output.
The project plans for all the software quality assurance activities that needed to
be performed in order to ensure the quality objectives are met. A project plan
also provides methods for handling change and methods for monitoring a
project. Project planning is the single most important management
activity and output of this forms the basis of monitoring and control.

3.2 Modules:

a) Pyperclip:  Pyperclip is the cross-platform Python module which is


used for copying and pasting the text to the clipboard.

b) Random: The random module is a built-in module to generate the


pseudo-random variables. It can be used perform some action
randomly such as to get a random number, selecting a random elements
from a list, shuffle elements randomly, etc.

c) PIL: PIL is the Python Imaging Library adds image processing


capabilities to your Python interpreter. This library provides extensive file
format support, an efficient internal representation, and fairly powerful
image processing capabilities.

d) SignUp: With the SignUp module, you can quickly and easily create a
Account for Password Manager GUI app. So you can access its feature.

e) Login: This module validates the user, and returns an error statement if it
doesn’t find the specified user in the data base.

[16]
f) User: User privileges are provided to the user, where he is able to to
store and generate random passwords.

i. Add Data: This module provides features for adding the password or
other details of user in the database. The user must register/signup
himself first, so that he is able to login and store or generate a random
password for his online accounts.

ii. Update Data: This module enables the user to update his existing data. If
he wants update his data that he has already stored in the database.

iii. Remove Data: When an user wants to remove his data from his database,
he is able to do it with the help of this module and is able to successfully
remove
that specific data.

g). Password Generator: This module generates passwords based on the


customization that you set to create an unpredictable strong password for your
accounts. It helps to create a random and customized password for users that
helps them to create a strong password which provides greater security.

h). MySQL: MySQLdb is an interface to the popular MySQL database server


for Python.

The design goals are:

 Compliance with Python database API version 2.0 


 Thread-safety
 Thread-friendliness (threads will not block each
other)

[17]
3.3 Data Flow Diagram:

[18]
3.4 E-R Diagram:

The Graphical representation of organizational system elements and the


association among the elements is called ER Diagram.

a) The elements make up a system referred to entities.


b) A relationship is the association that describes the interaction between
entities.
c) An ER Diagram may also indicate the cardinality of the relationship.
d) The ER notation also allows for distinguishing different types of entities.

e) A plain rectangle is used for what is termed as Fundamental Entity which is a


person, place or thing
f) Attribute is a property an entity uniquely.
g) Relationship specifies how two entities share information in the database.

SYMBOL MEANING

ENTITY

RELATIONSHIP

ATTRIBUTE

[19]
[20]
3.5 Database Design:
user_id int
Username varchar(50)
Password varchar(30)

useraccounts

userdata

Website varchar(50)
Username varchar(50)
Password varchar(50)
Email_id
varchar(50)

[21]
3.6 Screenshots:

Welcome Page:

[22]
SignUp Page:
Login Page:

Password Manager:

[23]
CODING:

INTRO PAGE:

from tkinter import *

from PIL import ImageTk

root = Tk()

root.geometry("1590x800+0+0")

root.title("demo")

root.config(bg="#ea5455")

def lg_in():

root.destroy()

import register

btn_img = ImageTk.PhotoImage(file="button_sign-u.png")

title = Label(text="Welcome to Password Manager", font=("Verdana 15


underline", 50,

"bold"),relief="groove", bg="#ea5455", fg="white")

title.place (x=0, y=150, relwidth=1)

des = Label (text="It Gives you a easy access to store,generate, and manage\n

[24]
your "

"passwords for local applications and online services.", font=("helvetica", 25,

"italic"), bg="#ea5455", fg='white')

des.place(x=330, y=350)

sign_up_btn = Button(image=btn_img, borderwidth=0, bd=0, command=lg_in,

bg="#ea5455")

sign_up_btn.place(x=650, y=550)

root.mainloop()

SignUp Page:

from tkinter import *

from tkinter import messagebox

import mysql.connector

root = Tk()

root.geometry("1590x800+0+0")

root.title("demo")

root.config(bg="#ea5455")

img_reg = PhotoImage(file="images/button_sign_up.png")

frame1 = Frame(bg="white", bd=0)

[25]
frame1.place(x=550, y=30, width=500, height=740)

lbl_sign_up = Label(text="SIGN UP", font=("times new roman", 30, "bold"),

bg="white", fg="black")

lbl_sign_up.place(x=690, y=70)

username = Label(text="Enter your Email", font=("helvetica", 15,), bg="white")

username.place(x=600, y=200)

user_mail = Entry(text="hell", font=("helvetica", 15), bg="white",


relief="ridge", borderwidth=1)

user_mail.place(x=600, y=260, width=300)

user_mail.focus()

paswd = Label(text="New Password", font=("helvetica", 15,), bg="white")

paswd.place(x=600, y=330)

new_pswd = Entry(font=("helvetica", 15), show="*", relief="ridge",


borderwidth=1)

new_pswd.place(x=600, y=380, width=300)

cfrm_paswd = Label(text="Confirm Password", font=("helvetica", 15,),


bg="white")

cfrm_paswd.place(x=600, y=440, height=35)

cnfrm_pswd = Entry(font=("helvetica", 15), show="*", relief="ridge",


borderwidth=1)

cnfrm_pswd.place(x=600, y=490, width=300)

def regs():

[26]
if new_pswd.get() == "" or cnfrm_pswd.get() == "" or user_mail.get() == "":

messagebox.showerror("Error", "All fields are Required")

elif new_pswd.get() != cnfrm_pswd.get():

messagebox.showerror("Error", "Password and Confirm Password doesn't


match")

else:

try:

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

cur.execute("INSERT INTO UserAccounts (mail_id, password)


VALUES(%s, %s)",

(user_mail.get(), new_pswd.get()))

db.commit()

db.close()

root.destroy()

import log_in

except EXCEPTION as e:
[27]
messagebox.showerror("Error", f"Error Due to {e}")

reg_btn = Button(image=img_reg,bg="white", bd=0, command=regs)

reg_btn.place(x=600, y=560)

root.mainloop()

Login Page:

from tkinter import *

from tkinter import messagebox

import mysql.connector

from PIL import ImageTk

root = Tk()

root.geometry("1590x800+0+0")

root.title("PASSWORD MANAGER")

root.config(bg="#ea5455")

def login():

if email_txt.get() == "" or paswd_txt == "":

messagebox.showerror("Error", "All fields are Required")

else:

[28]
try:

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

cur.execute("SELECT * FROM UserAccounts WHERE mail_id=%s and


password=%s",

(email_txt.get(), paswd_txt.get()))

# cur.execute("ALTER TABLE UserAccounts userID int PRIMARY

KEY AUTO_INCREMENT")

row = cur.fetchone() # fetches that user credentials in a single tuple

if row is None:

messagebox.showerror("Error", "Invalid Username or Password")

else:

root.destroy()

import main

except EXCEPTION as e:

[29]
messagebox.showerror("Error", f"Error Due to {e}")

frame1 = Frame(bg="white", bd=0)

frame1.place(x=550, y=30, width=500, height=740)

btn_login = PhotoImage(file="images/button_log-in.png")

title = Label(text="Log In", bg="white", font=("Californian FB", 35, "bold"))

title.place(x=710, y=80)

label = Label(text="Username", compound=LEFT, font=("helvetica", 18),


bg="white")

label.place(x=600, y=200)

email_txt = Entry(text="hell", font=("helvetica", 15), bg="white",


relief="sunken", bd=1)

email_txt.place(x=600, y=260, width=300)

email_txt.focus()

pass_lbl = Label(text="Password", font=("helvetica", 18), bg="white")

pass_lbl.place(x=600, y=320)

paswd_txt = Entry(font=("helvetica", 15), show="*", relief="sunken", bd=1)

paswd_txt.place(x=600, y=380, width=300)

[30]
sign_in = Button(image=btn_login, bd=0, bg="white", command=login)

sign_in.place(x=610, y=500)

root.mainloop()

Password Manager:

from tkinter import *

from PIL import ImageTk

from random import *

import pyperclip

from tkinter import messagebox

import mysql.connector

from tkinter import ttk

import string

def clear():

website_entry.delete(0, END)

password_entry.delete(0, END)

mail_entry.delete(0, END)

username_entry.delete(0, END)

# # -------------------------------Password Saver ---------------------------

[31]
def save():

website = website_entry.get()

username = username_entry.get()

password = password_entry.get()

mail_id = mail_entry.get()

if website == "" or username == "" or password == "" or mail_id == "":

messagebox.showerror(title="Oops", message="Please don't leave any


fields empty. ")

else:

is_ok = messagebox.askyesno(title="Website", message=f"Do you confirm


to add the details entered")

if is_ok:

try:

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

cur.execute("INSERT INTO UserData (Website, Username,


Password, mail_id) VALUES(%s, %s, %s, %s )",

[32]
(website, username, password, mail_id))

db.commit()

db.close()

fetch_data()

clear()

except EXCEPTION as e:

messagebox.showerror("Error", f"Error Due to {e}")

def update():

website = website_entry.get()

username = username_entry.get()

password = password_entry.get()

mail_id = mail_entry.get()

try:

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

[33]
cur.execute("UPDATE UserData SET Username=%s, Password=%s,
mail_id=%s WHERE Website=%s",

(username, password, mail_id, website))

db.commit()

db.close()

fetch_data()

clear()

except EXCEPTION as e:

messagebox.showerror("Error", f"Error Due to {e}")

def delete():

website = website_entry.get()

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

cur.execute("DELETE FROM UserData WHERE Website= %s",

(website,))

db.commit()

db.close()

[34]
fetch_data()

clear()

window = Tk()

window.geometry("1590x800+0+0")

window.title("PASSWORD MANAGER")

window.config(bg="#ea5455")

frame1 = Frame(width=1482, height=740, bg="white")

frame1.place(x=20, y=30)

frame2 = Frame(frame1, width=600, height=570, bg="white", borderwidth=1,


relief="solid")

frame2.place(x=30, y=150)

frame3 = LabelFrame(frame1, text='Password Generator', font=("helvetica",


18), width=800, height=260,

bg="white", borderwidth=1, relief="solid")

frame3.place(x=650, y=140)

def check():

upper = upper_var.get()

lower = lower_var.get()
[35]
number = number_var.get()

symbol = symbol_var.get()

ps = ''”

if upper == 'on':

ps += string.ascii_uppercase

if lower == 'on':

ps += string.ascii_lowercase

if number == 'on':

ps += string.digits

if symbol == 'on':

ps += string.punctuation

else:

generate_entry.delete(0, END)

generate_entry.insert(0, "Please check any one option")

return ps

def generate(ev):

pswrd = check()

password = ''

for i in range(0, slider.get()):

password = password + choice(pswrd)

[36]
generate_entry.delete(0, END)

password_entry.delete(0, END)

generate_entry.insert(0, password)

password_entry.insert(0, password)

pyperclip.copy(password)

upper_var = StringVar()

lower_var = StringVar()

number_var = StringVar()

symbol_var = StringVar()

label = Label(frame3, text='Customize Your Password', font=("helvetica", 18,


'underline'), bg='white')

label.place(x=100, y=80)

slider = Scale(frame3, label='Password Length', font=("helvetica", 12),


from_=0, to=50, length=250, resolution=1,

orient=HORIZONTAL, troughcolor='white', relief='groove',


activebackground="#ea5455", bg='#ffcccb',

bd=0, command=generate)

slider.place(x=100, y=140)

upper_check = Checkbutton(frame3, text='Uppercase', variable=upper_var,


font=("helvetica", 13), bg='white',

onvalue='on', offvalue='off')

[37]
upper_check.place(x=380, y=130)

upper_check.select()

lower_check = Checkbutton(frame3, text='Lowercase', variable=lower_var,


font=("helvetica", 13), bg='white',

onvalue='on', offvalue='off')

lower_check.place(x=380, y=180)

lower_check.select()

number_check = Checkbutton(frame3, text='Numbers', variable=number_var,


font=("helvetica", 13), bg='white',

onvalue='on', offvalue='off')

number_check.place(x=525, y=130)

number_check.deselect()

symbol_check = Checkbutton(frame3, text='Symbols', variable=symbol_var,


font=("helvetica", 13), bg='white',

onvalue='on', offvalue='off')

symbol_check.place(x=525, y=180)

symbol_check.deselect()

generate_entry = Entry(frame3, width=40, font=("helvetica", 15),


relief="ridge", borderwidth=1)

generate_entry.place(x=150, y=20, height=35)

[38]
add_image = ImageTk.PhotoImage(file="button_add.png")

update_img = ImageTk.PhotoImage(file="button_update.png")

delete_img = ImageTk.PhotoImage(file="button_delete.png")

title = Label(text="Password Manager", font=("Oswald", 30, "bold"),


bg="white")

title.place(x=590, y=60)

web_label = Label(frame2, text="Website or App Name", font=("helvetica",


20), bg="white")

web_label.place(x=40, y=50)

username_label = Label(frame2, text="Username", font=("helvetica", 20),


bg="white")

username_label.place(x=40, y=150)

password_label = Label(frame2, text="Password", font=("helvetica", 20,),


bg="white")

password_label.place(x=40, y=250)

mail_label = Label(frame2, text="Email Id", font=("helvetica", 20),


bg="white")

mail_label.place(x=40, y=350)

[39]
website_entry = Entry(frame2, width=40, font=("helvetica", 15), relief="ridge",
borderwidth=1)

website_entry.focus()

website_entry.place(x=40, y=100, height=25)

username_entry = Entry(frame2, width=40, font=("helvetica", 15),


relief="ridge", borderwidth=1)

username_entry.place(x=40, y=200, height=25)

password_entry = Entry(frame2, width=40, font=("helvetica", 15),


relief="ridge", borderwidth=1)

password_entry.place(x=40, y=300, height=25)

mail_entry = Entry(frame2, width=40, font=("helvetica", 15), relief="ridge",


borderwidth=1)

mail_entry.place(x=40, y=400, height=25)

add_btn = Button(frame2, image=add_image, borderwidth=0, bg="white",


command=save)

add_btn.place(x=15, y=480)

update_btn = Button(frame2, image=update_img, bg="white", borderwidth=0,


command=update)

[40]
update_btn.place(x=210, y=480)

delete_btn = Button(frame2, image=delete_img, bg="white", borderwidth=0,


command=delete)

delete_btn.place(x=410, y=480)

# ==================== Treeview================

def get_cursor(event):

cursor_row = password_tree.focus()

contents = password_tree.item(cursor_row)

row = contents['values']

clear()

website_entry.insert(0, row[0])

username_entry.insert(0, row[1])

password_entry.insert(0, row[2])

mail_entry.insert(0, row[3])

frame4 = Frame(frame1, width=800, height=300, bg="white", borderwidth=1,


relief="solid")

frame4.place(x=650, y=420)

style = ttk.Style()

style.configure("Treeview", rowheight=28)
[41]
style.map("Treeview", background=[('selected', '#ea5455')])

password_tree = ttk.Treeview(frame4, columns=("website", "username",


"password", "mail_id"))

password_tree.tag_configure('oddrow', background='white')

password_tree.tag_configure('evenrow', background='#ffcccb')

password_tree.column("website", width=140)

password_tree.heading("username", text="Username", anchor="w")

password_tree.heading("website", text="Website", anchor="w")

password_tree.heading("password", text="Password", anchor="w")

password_tree.heading("mail_id", text="Email", anchor="w")

password_tree['show'] = 'headings'

password_tree.pack(expand=True, fill=BOTH)

password_tree.bind("<ButtonRelease-1>", get_cursor)

def fetch_data():

count = 0

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

cur.execute("SELECT * FROM UserData ")

[42]
rows = cur.fetchall()

if len(rows) != 0:

password_tree.delete(*password_tree.get_children())

for row in rows:

if count % 2 == 0:

password_tree.insert(parent='', index=END, values=row, tags='evenrow')

db.commit()

else:

password_tree.insert(parent='', index=END, values=row, tags='oddrow')

db.commit()

count += 1

db.close()

fetch_data()

window.mainloop()

Database Creation & Connection:

# ---------------Database Creation------------

import mysql.connect

db = mysql.connector.connect(

host='localhost',

[43]
user='root',

passwd='root')

cur = db.cursor()

cur.execute(“CREATE DATABASE password_manager”)

#----------Table Creation----------

import mysql.connect

db = mysql.connector.connect(

host='localhost',

user='root',

passwd='root',

database="password_manager")

cur = db.cursor()

cur.execte(“CREATE TABLE useraccounts (userID int PRIMARY KEY


AUTO_INCREMENT, Username VARCHAR(30), Password VARCHAR(30)”
)

cur.execte(“CREATE TABLE userdata (Website VARCHAR(50), Username


VARCHAR(30), Password VARCHAR(30), Email_id VARCHAR(30)” )

db.commit()

[44]
CHAPTER 4

TESTING

[45]
SYSTEM TESTING

Testing is an important phase encountered in any developed product or


framework is the testing phase. It is because, the developed product should be
free from errors and it should be validated for accuracy. The product should
work under normal conditions as long as the user gives proper inputs and
therefore it should be checked for its robustness and should withstand and
inform the users about the erroneous input.

The testing phase involves testing the system using various test data.
Preparation of test data plays a vital role in the system testing. After preparing
the test data, the system is tested using those test data. Errors are found and
corrected by using the following testing steps and corrections are recorded for
future reference. Thus a series of testing is performed on the system before it is
ready for implementation.

Testing is applied at different levels in the development lifecycle. Each level of


testing done is different in nature and has different objectives at each level. The
focus of all levels of testing is to find errors, but different types of errors are
looked for at each level.

The quality of system is confirmed by the thoroughness of its testing. Duration


and cost of testing and debugging is a significant fraction of the system
development cycle and hence influences overall productivity during the
development. In this phase, the errors in the programs or modules are localized
and modifications are done to eliminate them. The testing makes a logical
assumption that all parts of the system work efficiently and the goal is achieved.

[46]
VERIFICATION & VALIDATION TESTING

The purpose of the requirement phase is to verify all behavioral characteristics


and performance requirements. Validation is achieved through a series of
testing that demonstrate conformity with requirements. Both the plan and the
procedures are designed to ensure that all the functional requirements are
satisfied in the program.

● All behavioral characteristics are achieved.

● All performance requirements are attained.

BLACK-BOX TESTING:

Black-box testing is an approach to testing where the tests are derived from the
program or component specification. The system is a ‘block box’ whose
behavior can only be determined by studying its inputs and the related outputs.
Another name for this is functional testing because the tester is only concerned
with the functionality and not the implementation of the software. The
following methods are commonly used:

The following methods are commonly used:

• Equivalence partitioning
• Boundary-value analysis
• Error guessing.
Equivalence Partioining:

[47]
Equivalence partitioning is a systematic process that identifies, on the basis of
whatever information is available, a set of interesting classes of input conditions
to be tested, where each class is representative of a large, set of other possible
tests.

Boundary-value analysis:
Boundary-value analysis is a test case design technique that complements
equivalence portioning. Rather than selecting any element of an equivalence
class, BVA leads to the selection of text cases at the “edges” of the code.

Error Guessing:
Error guessing is an ad hoc approach, based on intuition and experience, to
identify tests that are considered likely to expose errors. The basic idea is to
make a list of possible errors or error-prone situations and then develop tests
based on the list.
• Empty or null lists/ strings
• Zero instances/ occurrences
• Blanks or null characters in strings
• Negative numbers.

Features to be tested

• Verify that the entries are of the correct format.


• No duplicate entries should be allowed.
• All links should take the user to the correct page.

WHITE-BOX TESTING

[48]
White box testing is conducted to ensure that internal operations are performed
according to specifications and all internal components are adequately
exercised. This type of testing is called as white-box testing or glass-box testing.
White-box testing of software is predicated on close examination of
procedural detail. Providing test cases that exercise specific sets of conditions
and/or loops tests logical paths through the software. The “status of the
program” may be examined at various points to determine if the expected or
asserted status corresponds to the actual status.

WHITE BOX TEST IS DONE TO

• Guarantee that all independent paths within a module have been exercised
at least once.
• Exercise all logical decisions on their true or false sides
• Execute all loops at their boundaries and within their operational bounds.
• Exercise internal data structure to assure their validity.

Testing was done for the grouping row and column pixels.

THERE ARE SOME BASIC FORMS OF LOGIC COVERAGE

• Statement coverage: Each statement is executed at least once.


• Decision coverage: Each statement is executed at least once; each
decision takes on all possible outcomes at least once.
• Condition coverage: Each statement is executed at least once; each
condition in a decision takes on all possible outcomes at least once.

[49]
• Decision/condition coverage: Each statement is executed at least once;
each decision takes on all possible outcomes at least once; each condition
in a decision takes on all possible outcomes at least once.
• Multiple/condition coverage: Each statement is executed at least once; all
possible combinations of condition outcomes in each decision occur at
least once.

• Whether correct statistical values are getting from the given grouped
rows, grouped pixels.

UNIT TESTING

Unit testing focuses on the verification effort of the smallest unit of


design module. Attention is diverted to individual modules, independently to
locate errors. This has enabled the detection of errors in coding and logic. The
various modules of the system are tested in unit testing method. Using the
detailed description as a guide, important control parts are tested to uncover
errors within the boundary of the module. The relative complexity of tests and
the error detected as a result is limited by the constrained scope established for
unit testing. This test focuses on each module individually, ensuring that it
functions properly as a unit, and hence the name Unit Testing.

INTEGRATION TESTING

The program as a whole is integrated into a single component and checked with
test data. This is to check that the whole program works together correctly. The
various modules are integrated first. Then the system is tested as a whole. The
[50]
behavior of each module with another is identified in this testing. Any
misbehavior will lead to dangerous problems or errors in the system. All these
problems can be filtered off using this testing.

We combined all the modules into a single component and tested for integrity.
We found the crude form of our project is meeting the basic requirements like
functioning of the application based on the requirement.
 Bottom-up Integration: low-level components are integrated and tested
before the higher-level components have been developed.
 Top-down Integration: The high-level components of a system are
integrated and tested before their design and implementing has been
completed.

The steps in top-down integration are:

• Begin with the top module in the execution hierarchy.


• Stub modules are produced, and some may require multiple versions.
• Stubs are often more complicated than they first appear.
• The next module to be tested is any module with at least one previously
tested super ordinate module.

After a module has been tested, an actual module and its required stubs replace
one of its stubs.
The following points must considered by a software engineer to clear the
potential interfacing problems in the process of designing the software.

1. Design error-handling paths that test all information coming from other
elements of the system.
2. Conduct a series of tests that simulate bad data or other potential errors at the
software interface.

[51]
3. Record the results of tests to use evidence if finger pointing occurs.
4. Participate in the planning and design of system testes to ensure that
software is adequately tested.

ACCEPTANCE TESTING

User Acceptance Testing is a critical phase of any project and requires


significant
participation by the end user. It also ensures that the system meets the functional
requirements.

TEST RESULTS:

All the test cases mentioned above passed successfully. No defects encountered.

[52]
CHAPTER 5
IMPLEMENTATION
&
MAINTENANCE

[53]
SYSTEM IMPLEMENTATION & MAINTENANCE

Implementation means converting a new system or revised system into an


operational one. Conversion is main aspect of implementation. It is the process
of designing from the old system to the new one. Several procedures and
documents are carried during the conversion phase. Implementation of a
modified application to replace an existing one. Using the same computer this
type of conversion is relatively easy to handle, provided there are no major
changes in the files.

In implementation, the training for the system user, how to work with this
software should be given. The development of operating procedure to repair and
enhance the system should be done. The installation new computers with
required hardware and software specification are to be performed, if the present
system is working manually. If the hardware specification of the present system
is below the recommended specification the existing system should be replaced
with new one or up gradation of the existing system should be done. It is
necessary to check whether the required application should be working
properly.

Implementation is the stage in the project where the theoretical design is turned
in to a working system and is giving confidence on the new system for the
users, which will work efficiently and effectively. It involves careful planning
investigation of the current system and its constraints. If the implementation
neither is nor carefully planned it can cause confusion. Thus it can be
considered as the most crucial stage in achieving a successful new system and
in giving the users confidence that the new system will work be effective. It is

[54]
during the implementation phase the system takes shape.

The main stages in the implementation are


• Planning
• Training
• System Testing

MAINTENANCE

Software development efforts result in the delivery of a software product which


satisfies user requirements. Accordingly, the software product must change or
evolve. Once in operation, defects are uncovered, operating environments
change, and new user requirements surface. Software maintenance is an integral
part of a software life cycle. The software maintenance is defined as the totality
of activities required to provide cost effective support to software.

The software life cycle processes essentially depicts maintenance as one of the
primary life cycle processes, and describes maintenance as the process of a
software product undergoing modification to code and associated
documentation due to a problem or the need for improvement. The objective is
to modify the existing software product while preserving its integrity.

Software maintenance is the totality of activities required to provide cost-


effective support to a software system. Activities are performed during the pre-
delivery stage as well as the post-delivery stage. Pre-delivery activites include
planning for post-delivery operations, supportabilty and logistics determionation
Post-delivery activities include software modification, training

[55]
and operating a help-desk.

There are number of reasons, why modifications are required like


● Client requirement

● Host Modifications

● Organization changes

Need for maintenance:


Maintenance is needed to ensure that the software continues to satisfy user
requirements. Maintenance is applicable to software developed using any life
cycle model (for example – spiral). The system changes due to corrective and
non-corrective software actions. Maintenance must be performed in order to:

 Correct faults

 Improve the design

 Implementation enhancement

 Interface with other systems

 Perfecting existing functions

CONCLUSION

[56]
This project is designed for the users who surf through internet a lot and create a
number of online accounts and they can’t keep track or memorize all of their
online acconts login details. That’s where our Password Manager comes in use
it helps them to houses all their passwords in encrypted database. Even it helps
in generating a stronger, random and complex passwords which makes them
more difficult to crack or guess. Thus, you can have easy access for your
accounts and more difficult for hackers.

Future Enhancement:

This project has very vast scope in future. As the user’s requirement is always
going to be changed which is not static. Project can be updated as per the user
requirement and it is very flexible in terms of expansion. The enhancement of
the project can easily be made without changing the programming structure.

The following are the future enhancement of the project

 Enhancement of UI of application

 Converting the Desktop application into Web application.

REFERENCES

[57]
1) https://www.python.org/doc/

2) https://docs.python.org/3/library/tk.html

3) https://www.youtube.com/watch?
v=YXPyB4XeYLA&t=15620s&ab_channel=freeCodeCamp.org

4) https://www.youtube.com/watch?
v=3vsC05rxZ8c&t=12s&ab_channel=TechWithTim

5) https://www.udemy.com/course/100-days-of-code/

6) https://stackoverflow.com

[58]
[59]

You might also like