Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 28

THE ASHOK LEYLAND SCHOOL, HOSUR

RANDOM PASSWORD GENERATOR


PROJECT REPORT
2023-2024
COMPUTER SCIENCE

Name : __________________________________________
Class : __________________________________________
Roll No. : __________________________________________

1
THE ASHOK LEYLAND SCHOOL, HOSUR
COMPUTER SCIENCE PROJECTREPORT
2023-2024
BONAFIDE CERTIFICATE
Certified to be the bonafide Project Work done by_______________________
________________________________________________________________
of class XII in The Ashok Leyland School, Hosur during the year 2023-2024.

Date: Teacher In-charge

Submitted for AISSCE practical examination held on ___________________at


The Ashok Leyland School- Hosur during the year 2023-2024.

Name of the Candidate : ______________________________


Roll No. :_______________________________
Center Code :_______________________________

Internal Examiner Principal External Examiner

2
ACKNOWLEDGEMENT

I extend my thanks to "The Ashok Leyland School" for their support


in achieving excellence in this project.
I'm grateful to my teacher, Dr. V. Janani, for granting me the
opportunity to work on this project. Her guidance and the information
she provided significantly enhanced my programming knowledge and
skills.
The guidance and resources I received were instrumental in the
success of my project. I'd also like to express my appreciation to our
school Principal, Ms. Poorna Durachi, for her assistance in making
this project a success.
Last but not least, my heartfelt gratitude goes out to my parents and
friends for their guidance and support in successfully completing this
project.

3
ABSTRACT

Passwords are digital keys that guard the gateway to the online lives, acting as
the first line of defence against unauthorized access to the personal information,
accounts and digital assests. They play a vital role in preserving our privacy,
financial security and data integrity. Strong and unique passwords are essential
to thwart cyber attacks and protect against identity theft, communication and
transactions. In today’s interconnected world, where the risk of data breaches
and cyber threats is ever-present, the importance of robust password practices
cannot be overstated. A well-generated password is characterized by its length,
complexity and unpredictability making it resistant to hacking attempts and
unauthorized access. Automated password generators use algorithms to produce
strings of characters that include a mix of letters, numbers and special symbols,
ensuring a high degree of randomness and security. A Random Password
Generator application offers the capability to create passwords tailored to
specific security needs. It provides three distinct levels of password generation:
Basic, intermediate and advanced. Each level employs its unique method for
crafting passwords. The basic level generates passwords with a mix of
uppercase and lowercase letters. The intermediate level extends this by
including numbers alongside uppercase and lowercase characters. The advanced
level, on top of the previous features, adds symbols and special characters to
enhance password complexity. Additionally, rather than generating entirely
random passwords, this application incorporates user-provided names and
augments them with three numerical digits to create a personalized yet secure
password. The application is built using python programming language. A
python module called tkinter is imported for the graphical user interface (GUI).
To keep the back up of the tasks entered and data storage SQL has been used.

4
TABLE OF CONTENT

S. No Topic Page No.


1 Introduction 5
2 Hardware/Software 7
Requirements
3 Details 8

4 Project Code 13

5 Output 16

6 Conclusion 26
7 Bibliography 27

5
INTRODUCTION

The "More Complex Password Generator" is a versatile and user-


friendly desktop application designed to address the pressing need
for secure and easily manageable passwords in today's digital age.
With the growing importance of strong passwords to protect
sensitive information, this application aims to empower users with a
simple yet powerful tool for generating, assessing, and managing
their passwords. In addition to the core features mentioned in the
initial report, this extended report provides a comprehensive
overview of the project, delving into the technical details and future
enhancements of the application.

6
HARDWARE AND SOFTWARE
REQUIREMENTS
The hardware requirements for using the "More Complex Password
Generator" include a basic internet connection and a mobile device for
installing the application. On the software front, Python serves as the
programming language, while MySQL facilitates efficient data management.
An Integrated Development Environment (IDE) such as IDLE, PyCharm,
Visual Studio Code, or Spyder is necessary for code development. The
Tkinter library is employed for creating the graphical user interface (GUI).

This minimalistic set of hardware and software requirements ensures


accessibility and ease of use for a wide range of users. The lightweight
nature of the application allows it to run seamlessly on most computing
devices, making it a practical solution for individuals seeking enhanced
password security in their online activities.

DETAILS
7
Password Length Customization: The ability to customize password length is a
fundamental feature. Users can specify the desired length, tailoring passwords
to meet specific security requirements. Whether it's a short PIN or a long
passphrase, this feature adapts to different use cases.

Character Type Selection: Users have granular control over the character types
included in the password. This includes the following options: lowercase
letters, uppercase letters, digits, and special symbols. These options ensure
that passwords can be designed to meet the specific requirements of different
platforms and services.

Password Policy: A password policy defines the rules for password creation.
Users can choose from predefined policies, such as weak, medium, or strong.
Additionally, for advanced users, the "custom" option allows them to define a
specific character set for password generation, catering to unique security
needs.
Password Strength Assessment: Password strength is a critical aspect of
security. The application automatically assesses the strength of the generated
password based on a set of common password security rules. It categorizes
passwords into three categories: weak, moderate, or strong, providing users
with valuable feedback on the security level of their passwords. For example, a
password like "Password123!" would be categorized as strong, while "12345"
would be considered weak.

Password History:

8
Password History Tracking: The password history feature goes beyond simple
password generation. It maintains a chronological record of previously
generated passwords. Users can not only view the history but also label and
annotate each password, adding context and relevance. This detailed history is
a powerful tool for tracking and managing multiple passwords across different
platforms and services.

Copy to Clipboard:
Clipboard Integration: The "Copy to Clipboard" feature streamlines the
process of using generated passwords. With a single click, users can copy the
generated password to their clipboard, allowing for easy pasting into various
applications, websites, and services. This feature reduces the likelihood of
errors during manual entry and enhances user convenience .

Save Password:
Password Saving: Beyond just copying passwords to the clipboard, the
application also provides a means to save the generated password to a text
file. Users can select the location and filename for the saved password, adding
an extra layer of organization and security to password management.

Generating Passwords

9
Password Length Input
The user-friendly interface ensures that setting the desired password length is
straightforward. This flexibility allows users to create passwords tailored to
their specific needs. For instance, a user might choose a shorter password for a
casual online forum account but opt for a longer, more complex password for a
banking application.

Character Type Selection:


The application provides a comprehensive selection of character types, which
can be toggled on or off according to the user's preferences. Let's consider an
example where a user wants to create a password for an email account. They
might select lowercase letters, uppercase letters, digits, and special symbols to
create a robust and diverse password.

Password Policy Selection:


Users can choose from predefined password policies, such as "weak,"
"medium," and "strong," depending on the level of security required. For
example, when creating a password for a social media account, the user might
opt for a "medium" policy to balance security and ease of use. Alternatively,
for an online banking account, they might choose the "strong" policy for
maximum protection.

Generate Password:
Upon clicking the "Generate Password" button, the application leverages the
selected options and policies to create a password. It then presents the
generated password to the user. This user-friendly process ensures that even
individuals with limited technical expertise can create strong, secure
passwords.

Password Strength:
10
Password Strength Evaluation:
A key aspect of the application is its automatic password strength evaluation.
This feature eliminates the guesswork by clearly indicating the security level of
the generated password. Let's consider an example: a user creates a password
and receives a "strong" rating. They can be confident that their password
meets industry-standard security requirements.

Saving Passwords:
The "Save Password" feature provides users with a convenient way to archive
and organize their generated passwords. When they click the "Save Password"
button, the application prompts them to select the location and filename for
the saved password. In practice, this functionality is immensely valuable for
keeping track of passwords across different accounts and services.

Copying Passwords:
The "Copy to Clipboard" functionality simplifies the process of using generated
passwords. Users can copy a password with a single click, reducing the
likelihood of errors during manual entry. For instance, when creating a new
online shopping account, users can seamlessly paste their generated password
during the registration process, enhancing both security and usability.

Viewing Password History:


The password history feature offers users a comprehensive view of their
generated passwords. It presents a chronological list of previously generated
passwords, along with any annotations or labels added by the user. For
instance, a user might label a password as "Banking," making it easy to identify
and use in the future.

11
Password Strength Evaluation:

Weak Passwords
The application categorizes passwords as "Weak" when they fall short of
industry-standard security requirements. A common scenario is a short and
simple password, such as "12345." By identifying these weaknesses, users are
encouraged to create stronger and more secure passwords.
Strong Passwords
"Strong" passwords are those that meet the stringent criteria for password
security. They typically include a mix of uppercase and lowercase letters, digits,
and special symbols. For example, a password like "P@$$w0rd123!" would be
categorized as strong.

Moderate Passwords

Passwords that do not meet the criteria for being weak or strong fall into the
"Moderate" category. These passwords, while not as robust as "strong"
passwords, are still considered secure for many applications. An example might
be a password like "SecurePwd2023."

12
PROJECT CODE
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
from tkinter import filedialog
import random
import string
import pyperclip

# Password history list


password_history = []

def generate_password():
length = int(length_entry.get())
use_lowercase = lowercase_var.get()
use_uppercase = uppercase_var.get()
use_digits = digits_var.get()
use_special = special_var.get()
policy = policy_entry.get()

if policy == "custom":
custom_characters = custom_characters_entry.get()
password = generate_custom_password(length, custom_characters)
else:
password = generate_policy_password(length, use_lowercase, use_uppercase,
use_digits, use_special, policy)

password_label.config(text="Generated Password: " + password)


password_history.append(password)
update_history()

strength = check_password_strength(password)
strength_label.config(text=f"Password Strength: {strength}")

13
def generate_policy_password(length, use_lowercase, use_uppercase, use_digits,
use_special, policy):
characters = ''
if use_lowercase:
characters += string.ascii_lowercase
if use_uppercase:
characters += string.ascii_uppercase
if use_digits:
characters += string.digits
if use_special:
characters += string.punctuation

if policy == "strong":
characters += "$#@" # Add additional special characters for strong passwords

password = ''.join(random.choice(characters) for _ in range(length))


return password

def generate_custom_password(length, custom_characters):


password = ''.join(random.choice(custom_characters) for _ in range(length))
return password

def copy_to_clipboard():
password = password_label.cget("text")[18:]
if password:
pyperclip.copy(password)
messagebox.showinfo("Copy to Clipboard", "Password copied to clipboard.")

def update_history():
history_text.config(state=tk.NORMAL)
history_text.delete('1.0', tk.END)
for i, password in enumerate(password_history, start=1):
history_text.insert(tk.END, f"Password {i}: {password}\n")
history_text.config(state=tk.DISABLED)

def check_password_strength(password):
if len(password) < 8:
return "Weak"

14
if any(char.isupper() for char in password) and any(char.islower() for char in password)
and any(char.isdigit() for char in password) and any(char in string.punctuation for char in
password):
return "Strong"
return "Moderate"

root = tk.Tk()
root.title("More Complex Password Generator")

title_label = tk.Label(root, text="Password Generator", font=("Helvetica", 16))


title_label.pack(pady=10)

length_label = tk.Label(root, text="Password Length:")


length_label.pack()
length_entry = tk.Entry(root)
length_entry.pack()

options_frame = ttk.LabelFrame(root, text="Character Types")


options_frame.pack(pady=10)

lowercase_var = tk.BooleanVar()
lowercase_check = tk.Checkbutton(options_frame, text="Lowercase",
variable=lowercase_var)
lowercase_check.grid(row=0, column=0, padx=10)

uppercase_var = tk.BooleanVar()
uppercase_check = tk.Checkbutton(options_frame, text="Uppercase",
variable=uppercase_var)
uppercase_check.grid(row=0, column=1, padx=10)

digits_var = tk.BooleanVar()
digits_check = tk.Checkbutton(options_frame, text="Digits", variable=digits_var)
digits_check.grid(row=1, column=0, padx=10)

special_var = tk.BooleanVar()
special_check = tk.Checkbutton(options_frame, text="Special Symbols",
variable=special_var)
special_check.grid(row=1, column=1, padx=10)

15
policy_label = tk.Label(root, text="Password Policy:")
policy_label.pack()
policy_entry = ttk.Combobox(root, values=["weak", "medium", "strong", "custom"])
policy_entry.set("weak")
policy_entry.pack()

custom_characters_label = tk.Label(root, text="Custom Characters:")


custom_characters_label.pack()
custom_characters_entry = tk.Entry(root)
custom_characters_entry.pack()

use_custom_policy = tk.BooleanVar()
custom_policy_check = tk.Checkbutton(root, text="Use Custom Policy",
variable=use_custom_policy)
custom_policy_check.pack()

generate_button = tk.Button(root, text="Generate Password",


command=generate_password)
generate_button.pack(pady=10)

copy_button = tk.Button(root, text="Copy to Clipboard", command=copy_to_clipboard)


copy_button.pack()

password_label = tk.Label(root, text="")


password_label.pack()

strength_label = tk.Label(root, text="Password Strength:")


strength_label.pack()

history_label = tk.Label(root, text="Password History:")


history_label.pack()

history_text = tk.Text(root, height=5, width=40, state=tk.DISABLED)


history_text.pack()

root.mainloop()

16
OUTPUT:

17
18
19
20
21
22
23
24
25
26
Conclusion:

The "More Complex Password Generator" project has successfully addressed the
critical need for robust password management in today's digital landscape. By
providing users with a versatile and user-friendly desktop application, this project
empowers individuals to create, assess, and manage secure passwords tailored to
their specific needs. The comprehensive set of features, including password
customization, policy selection, strength assessment, clipboard integration, and
password history tracking, ensures a holistic and user-centric approach to password
generation and management.

The project's success is attributed to the collaborative support and guidance received
from "The Ashok Leyland School." Special thanks to Dr. V. Janani for her mentorship
and the opportunity to work on this project. The continuous support from the school
Principal, Ms. Poorna Durachi, has played a pivotal role in the project's success.

Looking ahead, the project lays the foundation for potential enhancements and
future iterations. User feedback and evolving security standards can guide updates to
ensure the application remains current and effective in addressing emerging
challenges in password security.

27
BIBLIOGRAPHY

 CS with Python class XII Textbook (Sumita Arora)


 https://www.youtube.com/watch?
v=yQSEXcf6s2I&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV
 https://www.youtube.com/watch?
v=BSfbjrqIw20&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV&index=2
 https://youtube.com/watch?v=yuuDJ3-
EdNQ&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV&index=3

28

You might also like