Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

RANDOM PASSWORD GENERATOR

Random password generator is a programme that generates reliable


random passwords of chosen specifications using alphabets, numbers, and
symbols.

BACHELOR OF TECHNOLOGY
B.Sc.IT

SUBMITTED BY:
PRANETA PATEL (212022067)
ARCHANA DEVMORARI (212022021)
DHRUVI PATEL (212022075)
KRISHA JARIWALA (212022070)
PARMI GAJERA (212022022)

GUIDED BY:
Mr. Rithik Vaishya
RANDOM PASSWORD GENERATOR

Team No. 6

Team Leader: Praneta Patel

Team Members:
1. Archana Devmorari
2. Dhruvi Patel
3. Krisha Jariwala
4. Parmi Gajera
5. Praneta Patel

Official E-mail ID of leader:- praneta.patel.bscit2022@aurouniversity.edu.in

Contact no of leader:- 6355527635

University:-Auro University

Batch:-2022-25
Date:- 28th April, 2023

pg. 2
Table Of Contents
TABLE OF FIGURES .............................................................................................................................. 4
EXECUTIVE SUMMARY .................................................................................................................... 5
1. BACKGROUND ............................................................................................................................ 6
1.1. AIM .......................................................................................................................................... 6
1.2. TECHNOLOGIES ....................................................................................................................... 6
1.3. HARDWARE ARCHITECTURE ................................................................................................... 6
1.4. SOFTWARE ARCHITECTURE..................................................................................................... 6
2. SYSTEM ......................................................................................................................................... 7
2.1. REQUIREMENTS ...................................................................................................................... 7
2.1.1. FUNCTIONAL REQUIREMENTS ............................................................................... 7
2.1.2. USER REQUIREMENTS............................................................................................... 7
2.1.3. ENVIRONMENT REQUIREMENTS............................................................................ 7
2.2. DESIGN AND ARCHITECTURE .................................................................................................. 8
2.3. IMPLEMENTATION .................................................................................................................. 9
2.4. GRAPHICAL USER INTERFACE (GUI) LAYOUT ........................................................................ 10
2.7. EVALUATION .............................................................................................................................. 11
1 Code of the Project:- ..................................................................................................................... 11
2 CONCLUSION:- .............................................................................................................................. 20
3 Further Development or Research: ............................................................................................... 21

pg. 3
TABLE OF FIGURES

Figure 1 Screen of the application 15


Figure 2 Password generated for weak strength 16
Figure 3 Working of Reset Button 17
Figure 4 Strong Password with password strength changed to 11 18

Figure 5 Working of commands in menu bar 19

pg. 4
EXECUTIVE SUMMARY

In the modern world, where everything is done online, online security is crucial. Our accounts
are prevented from being hacked or stolen by passwords. Having said that, coming up with a
strong password and keeping it in mind is a tedious process. And many people are not good at
picking random password and tend to choose their birth date or their name as a password which
may create Privacy issues and traditional Desktop computers are able to hack them easily in
few fractions of second.
On internet, typical password lists contain most user-generated passwords. Certain passwords
are simple to remember, but they are also simple for an opponent to decipher. But random
passwords are made up of random character combinations, they are difficult to remember and
difficult to decipher. And it is also difficult for few users to remember password for each
account, websites and digital accounts so when we generate a random password, it
automatically autosaves it to user's device. We may create a programme that receives input
from the user and uses that information to produce a random password.
Random password generator is meant to be the safest platforms to create new passwords. This
is because random means something that is not predictable, it is not something based on data
set (previous outcomes, patterns). Thus in spite of setting same character set and running the
algorithm number of times, there are rare chances that we will get the same output. So we can
also say that two different users running algorithm at same time with same character set would
get unique passwords.
To overcome cyber attacks we must make it habitual to use a different password for each site
referred. This would reduce chances that a hacker can go through all the data and sites you
have visited.
Using a password generator would help you build a strong password and would prevent you
from choosing a easy to crack password like silly mnemonics according to your likes and
dislikes which might be easily cracked if someone known wants to enter your private data. One
should also make it a habit to change password regularly and to use a password manager to
store the passwords securely.

Technology Used: -
The technology used for the creation of this project is Python. The mode is chosen with
consideration for the libraries it offers, resulting in an interactive and user-friendly interface.
Field of Project: -As discussed above in today’s world security is prime key to one’s secured
life. To maintain this security, we have a specialised domain of cyber security. Under this
domain the prime role is played by “PASSWORD”.Password creation is a tedious job and thus
to ease this job we have created a user-friendly application that would create random password
as per user’s requirement.

pg. 5
1. BACKGROUND
1.1. AIM
To ease the efforts of users creating different and strong passwords for various platforms
satisfying their unique needs. The primary aim of using a generator is to generate a well
protected and unpredictable passwords for all accounts of the users.

1.2. TECHNOLOGIES
• Tkinter
• PIl
• Random
• String

1.3. HARDWARE ARCHITECTURE


• CPU-i3 8th GenCore ™ i5-11300H
• GPU- 3.10GHz.
• RAM- 4.0GB
• Storage-256GB SSD

1.4. SOFTWARE ARCHITECTURE


A 64-bit operating system is required. Some software required for the system to work are:-
• Windows 10 & 11
• PyCharm
• VSCode
• Annaconda
• Spyder
The libraries used in the applications are:
1. String
2. Random
3. Tkinter
4. Pyperclip
5. PIL
The module of each library used:-
i) Ascii
ii) Sample
iii) Widget
iv) Menu
v) ImageTk
vi) Image

pg. 6
2. SYSTEM
2.1. REQUIREMENTS
• Python
• GUI Libraries
• Windows Operating System
• IDE
• Pillow Library
• String Library
• Random Library

2.1.1. FUNCTIONAL REQUIREMENTS


• Installed Python platform of 3.10 version. (We have used spyder python 3.10).

2.1.2. USER REQUIREMENTS


• Easy to use Interface
• User to enter user name

2.1.3. ENVIRONMENT REQUIREMENTS

It needs WIFI which means internet connections for its usage and another
environmental usage of it is ANACONDA which is an open-source distribution of the
Python and R programming languages for data science that aims to simplify package
management and deployment. It also uses Tkinter which is a python binding toolkit
with GUI which also includes standard Linux, Microsoft Windows and macOS installs
of Python. The name Tkinter comes from Tk interface.

pg. 7
2.2. DESIGN AND ARCHITECTURE

ENTER THE USER


NAME

SELECT THE STRENGTH


OF REQUIRED PASSWORD
IN TERMS OF (A)WEAK,
(B)MEDIUM, (C) STRONG

CLICK ON GENERATE
BUTTON

TRUE SATISFIED WITH FALSE


THE GENERATED
PASSWORD

END CLICK
RESET

pg. 8
2.3. IMPLEMENTATION

• Application Logic

We have created this application, that would produce a random password on the
basis of strength and length provided by the user. As per the application name goes
‘Random Password Generator’, the password created is random. This is because of
implementation of random module.

The password is generated with three main aspects i.e. upper and lower case
alphabets, digits, and special characters, which is included using string module.
The password generated by our application is randomly suggested by using random
library and since, we have used sample module the letters won’t repeat itself.

To avail the use of application the user first needs to enter the user name. Then
moving forward one would have to enter the desired strength of the password.

The strength of password is to be chosen by the user. Universally accepted criteria


for the strength of the password has been kept :-
• Weak password- would generate a password with only letters including
both upper and lower case.
• Medium Password – would generate a password with combination of
letters (both upper and lower) and digits.
• Strong password - would generate a password with combination of letters
(upper and lower) , digits and punctuations.
After selecting the strength of the password we have offered the user to enter
required length of the password, providing a spinbox for the same with limits 8-15.
After this the user has been provided with a generate button.
Now, the generated password is displayed in the next label. In case the user is not
satisfied with the password, we have offered them with a reset button, this would
empty the field of generated password and the user is supposed to click on generate
button again. The user can repeat this steps infinitely until one gets a satisfiable
password.
After the user gets the required password, we have provided the user with a cut,
copy, paste option in the menu bar under ‘edit’ tab.
And the user can finally exit the application either from menu bar by clicking on
exit tab or normally by clicking the exit button on top right side of application..

pg. 9
2.4. GRAPHICAL USER INTERFACE (GUI) LAYOUT

A graphical user interface is an interface that makes an application user interactive and
hence user friendly. Pyhton provides us with a variety of libraries from GUI, but mainly
used ones are
• Tkinter
• Python QT
Since we are just beginners as application developers we have used Tkinter library to
develop our application of Random Password Generator. Tkinter offers us a variety of
modules that we can use to make our application more interactive and user friendly. Here
are the modules that we have added in our application with a short description of each and
every module and where we implemented in our code:-
• Widgets used are:-
1. Menu = It is included I in GUI to build menu. WE have implemented it
in our application with exit, edit and help tabs.

2. Label = It is used to generate a single line widget such as text,


photographs and many more. We have used this widget to display a
welcoming text to our application, to accept the user name of user, to
display text for selecting strength of password and to present the
generated password to the user.

3. Radiobutton = It is used to implement one of many selections. We can


also link each button with a defined function. In our application we have
utilised this function to select the strength of password and each button
is linked to a function called ‘selection’.

4. Spinbox = It is a variation of basic Tkinter Entry widget that allows you


to choose from a defined set of values. In our case we have applied this
widget to choose the length of password from 8-15.

5. Button = It is used to display buttons in Tkinter. Just like Radiobutton


here also we can link a function to the buttons. WE have used this
widgets to display ‘Generate Password’ and’ ‘Reset’ buttons linked to
functions generator and reset respectively.

6. Entry = It is used to construct input fields. In our application it is used


to display the generated password.

pg. 10
2.7. EVALUATION

It only took us about two days to create a simple logical code for Random password generator
which was just a basic code without implementing GUI in it. Then after we
Then we thought of adding characters like Uppercase, Lowercase, minimum of 8-characters
and maximum of 16-characters should be needed to create a password we also addedfew of
special characters.
We wanted to make it look little bit more attractive, so we thought of adding an image to it
which made us bit tedious as firstly we were not able to change the size of image but with just
minor editing, we were able to do it easily.
We also added a reset button and Menu bar for usage.
It takes about 1 sec to generate an output.

pg. 11
3. CODE OF THE PROJECT

import random,string
from tkinter import *
from PIL import Image, ImageTk
root=Tk()
root.title("Random Password Generator")
Font=('arabic',12,'italic','bold')

root.geometry('485x380')
image_0=Image.open("D:\\IBM MINI PROJECT\\istockphoto-1367134732-170667a.jpg")
bck=ImageTk.PhotoImage(image_0)

lbl=Label(root,image=bck)
lbl.place(x=0,y=0)

def selction():
selection= choice.get()

def reset():
passwordFeild.delete(first=0,last=16)

def generator():
weak=string.ascii_lowercase +string.ascii_uppercase
medium= string.ascii_uppercase + string.ascii_lowercase + string.digits
strong=string.ascii_lowercase + string.ascii_uppercase + string.digits + string.punctuation

if choice.get()==1:
passwordFeild.insert(0,random.sample(weak,val.get()))
elif choice.get()==2:

pg. 12
passwordFeild.insert(0,random.sample(medium,val.get()))
elif choice.get()==3:
passwordFeild.insert(0,random.sample(strong,val.get()))

choice=IntVar()
#creating a menu bar
menubar= Menu(root,background='blue',fg='white')
menubar.add_command(label="Exit",command=root.quit)

edit=Menu(menubar,tearoff=False,background='black',fg='white')
edit.add_command(label="Cut")
edit.add_command(label="Copy")
edit.add_command(label="Paste")
menubar.add_cascade(label="Edit",menu=edit)

help=Menu(menubar,tearoff=0,background='black',fg='white')
help.add_command(label="About")
menubar.add_cascade(label="Help",menu=help)

root.config(menu=menubar)

#creating welcome label


passwordLabel=Label(root,text='WELCOME TO PASSWORD
GENERATOR',font=('arabic',17,'bold'),bg='blue',fg='white',)
passwordLabel.pack()
#labels for user interaction:-
Label(root,text='Enter User Name',fg='green').pack()
passwordFeild=Entry(root,font=Font,width=25,bd=2)
passwordFeild.pack()

label_space=Label(root)

pg. 13
label_space.pack()
label_password=Label(root,text="Strength of Password" ,fg='green')
label_password.pack()

label_space=Label(root)
label_space.pack()

rb1=Radiobutton(root,text='Weak',value=1,variable=choice,fg='green',command=selction)
rb1.pack()
label_space=Label(root)
label_space.pack()

rb2=Radiobutton(root,text='Medium',value=2,variable=choice,fg='green',command=selction)
rb2.pack()
label_space=Label(root)
label_space.pack()

rb3=Radiobutton(root,text='Strong',value=3,variable=choice,fg='green',command=selction)
rb3.pack()
label_space=Label(root)
label_space.pack()

val=IntVar()
spinlenth= Spinbox(root,from_=8, to_=15,textvariable=val,width=15)
spinlenth.pack()

button_submit=Button(root, text='Generate Password',fg='green',command=generator)


button_submit.pack()

pg. 14
button_reset=Button(root, text='RESET',fg='green',command=reset)
button_reset.pack()

passwordFeild=Entry(root,font=Font,width=25,bd=2)
passwordFeild.pack()

root.mainloop()

OUTPUT OF THE PROJECT:

Figure 1 Screen of the application

pg. 15
Figure 2 Password generated for weak strength

pg. 16
Figure 3 Working of Reset Button

pg. 17
Figure 4 Strong Password with password strength changed to 11

pg. 18
Figure 5 Working of commands in menu bar

pg. 19
4. CONCLUSION:-

When choosing a password manually, individuals frequently choose words that are personal to
them and that are connected to certain events. This makes it possible for hackers to use a variety
of password-cracking techniques.
These particular circumstances are avoided by the randomly generated passwords. The
difficulty in remembering the randomly generated password can be one of the disadvantages.
However, the security achieved by a randomly generated password is much better than a
manually selected password. The security protections are strengthened by the encryption and
decryption standard that is presented here. It is affordable since the encryption and decryption
requirements are straightforward. The study mentioned above also raises awareness of and
interest in doing further research in this area.

These procedures allowed us to successfully develop a Python project for a random password
generator. We learned about the GUI and random libraries, as well as the well-known tkinter
library, which we used to render graphics in our display window.

We learned how to design labels, spinboxes, input textfields, and buttons. Our Python effort to
develop a password generator was successfully finished in this manner.

pg. 20
5. Further Development or Research:

• User safety :- By using pysqlite interface we can store user’s data. So that the user’s
choice and password provided is saved. Hence, it would be convenient for the user
to select a new password keeping in mind the old criteria.

• Providing User with more Options :- Here, we provide user with more options
regarding what should be added in the password to be generated, like

a. just digits
b. just characters
c. combination of characters and didgits with some specific special
chsracters.

• Giving assurance to the new user:- Providing Graphs using seaborn, of our past
users , would establish an assurance to the new users about how secure and reliable
our application is.

• Allowing users to have passwords with keywords they select:- Here, we can provide
them with a label where they can enter a phrase or a word, which would be randomly
shuffled and the algorithm can go like that the password would be created with
letters that would be nearby the words in the phrase, or sometimes random letters
from every word in the phrase. Similarly we can also add restrictions to some words
that should not be added in the password.

• Determining the strength of password generated:- We can also add a feature of


password entropy, wherein we can display how strong the generated is password.

pg. 21
6. REFERENCES AND LITERATURE SURVEY

6.1. REFERENCES

1. What is Random Password Generator. RoboForm. (1999). Retrieved March 29, 2023,
from https://www.roboform.com/password-generator.
2. Malaika Nicholas, (2016, August 9). How does Random Password Generator
Works. Dashlane. Retrieved March 29, 2023, from https://blog.dashlane.com/how-
random-password-generators-work/

3. Shiner, J. (2005). Password Manager App. 1Password. Retrieved 2023, from


https://1password.com/password-generator/
4. Random Password Generator. Avast. (1988). Retrieved 2023, from
https://www.avast.com/en-in/random-password-generator#pc
5. Random Module in Python. w3school. (1999). Retrieved 2023, from
https://www.w3schools.com/python/module_random.asp
6. Rubenking, N. J. (2022, April 28). How To Use Random Password Generator.
PCMag. Retrieved March 29, 2023, from https://www.pcmag.com/how-to/how-to-
use-a-random-password-generator
7. Margaret Rouse, (2015, August 30). What is Password Generator. Techopedia.
Retrieved March 29, 2023, from
https://www.techopedia.com/definition/31414/password-generator
8. Luthra, T. (2022, November 10). Random Password Generator in Python.
Scaler.com. Retrieved April 30, 2023, from https://www.scaler.com/topics/random-
password-generator-in-python

pg. 22
6.2. LITERATURE SURVEY

Malaika Nicholas summarises a general concept of what is random password generator and
how it works. She introduces the three kinds of random generators namely:
a)Pseudorandom generators, b)True random generators, c) Cryptographically secure
pseudo-random generators. Further in the article she describes the importance of
randomness in the password generated.

Neil. J. Rubenking, firstly gives an idea whether password generators are random or not.
Then after he provides an overall idea about pseudo-random algorithm which is used by
various password managers. Hence, he briefs about the concept of seed. After providing a
basic information regarding the algorithm of pseudo-random algorithm, he enlightens us
with password managers and their effect on randomness. On this he adds that whenever
one is setting parameters for a random password, one should always include use of all
available set of characters, as mathematically the concept of randomness describes more
the number of elements more randomness is generated, supporting this he gives us an
example.

Margarete Rouse, describes the essentiality of password generators. According to her this
type of application helps those who have to create a new password on a daily basis. For
instance a password generator application plays a major role in banking. This is because
for a highly secured account, the bank may have to provide a password in form of OTP
every time the customer wishes to log into his/her account.

pg. 23
7. APPENDIX

1 selection() = It is a user defined function that would store the choice of user for what
strength of password , user wants.
2 reset() = A user defined function created, to empty the generated password field.
3 generator() = A user defined function which contains the main logic of generating a
random password.The logic goes like:
• First we assign the variable what type of values should be contained in it .
• Then after, using if – elif conditions as per the choice of user regarding the
strength as conditions. And finally inserting values in passwordFeild using insert
method.
4 passwordLabel = variable for Label to display message ‘WELCOME TO PASSWORD
GENERATOR’.
5 rb1= Radiobutton for Weak strength.
6 rb2 = Radiobutton for Medium strength.
7 rb3 = Radiobutton for Strong strength.
8 val = variable which stores the selected length.
9 spinlenth = a variable that would set Spinbox for length of password.
10 button_submit = Button to generate password.
11 button_reset = Button to reset the generated password field.
12 passwordFeild = Entry widget that would diplay the generated password.

pg. 24

You might also like