Professional Documents
Culture Documents
Submitted By
Sourabh S
ROLL NO:
UNDER THE SUPERVISION OF
MRS. PAVITHRA R
Teacher-in-Charge:
PAVITHRA R ----------------
(Signature)
----------------
(Signature)
Principal
Name: SOURABH S
Roll no:06
INDEX
SECTION TOPIC PAGE No.
1. Overview of Python 1
2. Project Synopsis 2
3. System Requirement 3
6. Program Output 8
7. Limitations 9
8. Bibliography 10
SECTION 1:
PYTHON OVERVIEW
Python is a high level interpreted interactive and object oriented scripting
language.
Python is designed to be highly readable .It uses English Keywords frequently
where as other languages use punctutation, and it has fewer syntactical
constructions than other languages.
History of Python
Python was developed by Guido van Rossum in the late eighties and early
nineties at the National Research Institute for Mathe- matics and Computer
Science in the Netherlands.
Python is derived from many other languages, including ABC, Modula-
3,C, C++,Algol-68,SmallTalk, and Unix shell and other scripting languages.
1
Project Synopsis
Password generator and password logger using python.
It creates strong passwords which make it hard for black-hat hackers to crack it. It also stores
it locally as a QR code for easy access in the future.
The purpose of the project is to build an application program to reduce the manual work of
making strong passwords and remembering them.
• It has no loose ends which means it has a very little chance of giving a user error.
• Reduce time consumption
• Easy operations for operator of the system
• No paper work requirement
2
System Requirement
OS Required Windows,linux,macOS
Localization English
3
Modules Used For This Project
OS - The OS module in Python provides functions for interacting with the operating
such as objects, numbers, and strings. It also provides functionality other than
representing time, like waiting during code execution and measuring the efficiency of
your code.
Pip - pip is a package manager for Python. That means it's a tool that allows you to
install and manage additional libraries and dependencies that are not distributed as
etc.
Array - Python array module gives us an object type that we can use to denote
an array. This is a collection of a type of values. In a way, this is like a Python list, but
Png - PyPNG allows PNG image files to be read and written using pure Python.
4
Conversion to and from PAM files means that on the command line, processing PAM
Pyqrcode - The pyqrcode module is a QR code generator that is simple to use and
written in pure python. The module can automates most of the building process for
creating QR codes. Most codes can be created using only two lines of code!
5
Program Code
#password generator
import pip
import os
import subprocess
import sys
import random #to generate random password
import array
import time
while True:
try:
import png
import pyqrcode
break
except ImportError:
package = ['pypng','pyqrcode']
for inst in package:
subprocess.check_call([sys.executable, "-m", "pip",
"install",inst])
os.system('cls')
time.sleep(1)
break
import pyqrcode
import png
while True:
def str(s):
global psswd
psswd = ''
lowera = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'm', 'n', 'o', 'p', 'q','r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
uppera = [ ]
passwd = []
for i in lowera:
uppera.append(i.upper())
num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symb = ['@', '#', '$', '%', '=', ':', '?', '.', '/', '|', '~',
'>','>','*', '(', ')']
all = lowera + uppera + num + symb
rlow = random.choice(lowera)
rupp = random.choice(uppera)
rnum = random.choice(num)
rsymb = random.choice(symb)
rall = rlow + rupp + rnum + rsymb
for i in range(s - 3):
rall = random.choice(all) + rall
tp1 = array.array('u',rall)
random.shuffle(tp1)
for x in tp1:
psswd = psswd + x
6
print("password generated:", psswd)
print("saving password...")
global wr
usrnm = input("enter the username of the password: ")
wr = 'Password for '+usrnm + " " + psswd + ' created at ' +
time.ctime() +"\n"
def store():
f = open('created_passwd.txt', 'a')
f.write(wr)
f.close()
def checker():
f = open('created_passwd.txt', 'r+')
for y in f:
if psswd in y:
f.truncate(-1)
str()
f.close()
else:
return
store()
checker()
while True:
try:
a = int(input("enter the length of the password to be
generated: "))
if a < 6:
print("Password is weak. Try again.")
elif a > 22:
print("Password is too big. Try again.")
else:
str(a)
qn = input('Create a QR code for easy access? (y/n)')
qn.islower()
if qn == 'y':
qr = pyqrcode.create(wr)
qrnm = input("What should the QR code be named as? ")
+".png"
qr.png(qrnm, scale=6)
print("qrcode successfully saved")
break
elif qn == 'n':
print('okay')
break
else:
print('Error Try again')
except ValueError:
print("Enter numbers not alphabets ")
break
br = input("Generate an other password?(y/n)")
br.islower()
if br == 'y':
pass
elif br == 'n':
print('okay')
break
7
Program Output
8
Limitations
This code can only make passwords but it can not read it or view created
passwords.
The project can have attractive Graphical User Interface and many more user
friendly options in the future.
9
Bibliography
1. Computer Science with python for Class – 12 - Sumitha Aroa
2. Stackoverflow.com
3. https://www.w3schools.com/python
10
THANK YOU
11