Designed and coded a password manager in Python with Arduino integration

Overview

Python-Password-Manger-NJRC

Designed and coded a password manager in Python with Arduino integration. The Program uses a master user to login, and stores account data such as usernames and passwords to the master user. While logging into the program with the master user the Arduino was used as a two-factor authentication key. The program detects a connection to the Arduino and checks if certain parameters are met before completing the login procedure.

Introduction

The Password Manager, creates and stores a master user profile, where an Arduino is used as part of a Two-Factor Authentication method, using Arduino inputs and outputs as part of the process. It stores the data for accounts by their names, where it stores the account name, username/e-mail, and password. This can be used whenever you need to store a password you want to remember on your device.

Final Design

The details of design for the different components are described within the notes about their implementation. As a part of the overall design 4 functions were designed:

• sign_in(user_dir), to ask for username, password, and security question answer. Then checks inputs against stored values to verify they are correct if not, it will continually loop until correct user details are entered.

• create_table(), to create a table in a sqlite3 database.

• store_data(), to store inputted data in a sqlite3 table.

• lookup_data(), to retrieve stored inputs, from a sqlite3 table using an inputted string that is compared against currently stored strings.

Implementation

Imported engi1020.ardunio, random, sleep, pickle and sqlite3 modules.

Created a class User, to store user objects for later use and created an empty user dictionary, user_dir, also created a class Account for later use.

Created variables conn = sqlite3.connect(‘sqldata.db’) and c = conn.cursor(), to connect to an sqlite3 data base.

Worked on sign_in(user_dir)

• Create a variable that opens and reads pickle file with the stored User object, then created variable stored_user, which loads stored User from the pickle file, then added stored_user in the user_dir dictionary.

• While loop for while true, print “What is your username?”

o	Store input in variable acc_username.

o	Then compared acc_username against stored username in the user_dir.

o	If acc_username = stored username, break out of loop.

o	Else print “username does not exist”.

• While loop for while true, print “What is your password?”

o	Store input in variable acc_password.

o	Then compared acc_password against stored password in the user_dir.

o	If acc_password = stored password, break out of loop.

o	Else print “You have entered the incorrect password try again”.

Worked on create_table()

• Used c.execute, to add a new table accounts to the sqlite3 database.

Worked on store_data()

• Used c.execute, to insert values for account name, username/email and password, to the created accounts table.

Worked on lookup_data(acc_name)

• Created tuple data = (‘Account Name: ‘, ‘Username/E-Mail: ‘, ‘Password: ‘)

• Used c.execute to lookup accounts where the account name is equal to the input argument acc_name.

• Set variable find = list(c.fetchall()) to store looked up account.

• If no account is found print “This account does not exist, RETRY”

• Else, created for loop where account name, username/email, and password, print right after the counterparts of the tuple data.

Once functions were created, worked on creating a user and storing a user and using the create table to start the data storing.

Worked on sign in process

• While loop for while true, print “Create User? Or Sign In?”

o	Set variable to inputted answer

o	If inputted answer equals create user, print "WARNING! Creating a new account will DELETE the current account! Are you sure you want to proceed?"

o	Set variable to inputted answer
 
  	If inputted answer equals yes, continue with user creation.
  
  	Then asked for name, username, password, and confirmed password, and stored inputs to variables.

• While loop for while password does not equal confirmed password, continuously runs until both strings are equal.

• Else continue with user creation and create security question and answer.

o	Save all inputted user info to new_user object, then add to user_dir dictionary. 

o	Create a variable that opens and writes pickle file that stores the new_user object.

o	Used c.execute to check if a table accounts exists, if it does use c.execute to delete table.

o	Then create new table accounts, for new data.

o	Then used sign_in(user_dir) to sign in for first time. After signed in break original while loop.
 
  	Else, anything other than Yes inputted, pass so while loop repeats.

o	Elif inputted answer equals sign in, then use sign_in(user_dir) to sign in. After signed in break original while loop.

o	Else anything other than create user, or sign in inputted print “Error” and original while loop repeats.

Worked on security question and answer check

• While loop for while true, prints security question stored in user object in dictionary.

• Set variable for inputted answer.

o	If inputted answer is equal to stored answer break loop.

o	Else print “Security question answer wrong, RETRY”, and while loop repeats.

Worked on Two-Factor Authentication, Step One

• While loop for while true, print “Two-Factor Authentication, Step One”

o	Used Arduino, printed to lcd screen 5, 4, 3, 2, 1. With sleep(1) between each number and after 1 to count down from 5 to 0.

o	Then used digital_read(2) for the button, and digital_read(7) for the touch sensor.

o	If button and touch sensor reads equal to 1, print “Step One successful!”, and break while loop.

o	Else, print ”Step One failed, RETRY”, and while loop repeats.

Worked on Two-Factor Authentication, Step Two

• While loop for while true, print “Two-Factor Authentication, Step Two”

o	Used random.randint() to produce a random 4-digit number from 1000-9999 and set it to a variable.

o	Printed variable to lcd screen, and user must input 4-digit number seen on lcd screen to console.

o	If inputted 4-digit number is qual to random 4-digit number, print "Step Two successful!" and print "Two-Factor Authentication complete!". Then break while loop.

o	Else, print ”Step Two failed, RETRY”, and while loop repeats.

Print “Welcome ‘name of user’! You have signed in successfully”.

Worked on, account storing, account lookup and logging out of program

• While loop for while true, print "Would you like to Store an account?, Lookup an account?, or LogOut?".

• Set variable for user input

o	If user input is equal to store, ask and store inputs to variables for account name, username/email, and password, of the account you would like to store.
  
  	The store collected data in Account object and set it to a varible acc_data.
  
  	Used store_data() to store collected account data using Account object.

o	Elif user input is equal to lookup, print "What is the name of the account you would like to Lookup?".
  
  	Set a variable acc_name to store user input.
  
  	Used lookup_data(acc_name) to lookup account.

o	Elif user input is equal to logout, print "LogOut successful! Goodbye ‘name of user ‘"), and used exit() to quit program.

o	Else, print “Error”, and while loop repeats.
Owner
Noah Colbourne
I am a first year Engineering student at Memorial University of Newfoundland, with a strong interest in coding and software development
Noah Colbourne
A 3rd party Moonraker component to create timelapse of 3D prints.

A 3rd party Moonraker component to create timelapse of 3D prints.

Mainsail-Crew 166 Dec 26, 2022
A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler.

Env-MCRO A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler. (btw this image is a bit outdated, some of the silkscreen

EnviousData 68 Oct 14, 2022
A global contest to grow and monitor your own food with Raspberry Pi

growlab A global contest to grow and monitor your own food with Raspberry Pi A capture from phototimer of my seed tray with a wide-angle camera positi

Alex Ellis 442 Dec 23, 2022
Transform a Raspberry Pi into a network diagnostic machine.

EtherView Last updated jan 30, 2022. Welcome to the EtherView project! This is a project to transform a RaspberryPi into a portable network diagnostic

1 Jan 30, 2022
A LiteX project which builds a SoC with DRAM / HDIM output via the GPDI SYZYGY addon.

ButterStick GPDI LiteX demo A LiteX project which builds a SoC with DRAM / HDIM output via the GPDI SYZYGY addon. Getting started Connect GPDI board t

4 Nov 21, 2021
Programming of Robotics Systems course at the University of Aveiro, Portugal, 2021-2022.

Programação de Sistemas Robóticos Miguel Riem Oliveira Universidade de Aveiro 2021-2022 Projeto AtlasCar Projecto RACE IROS 2014 AtlasCar2 ATOM IROS 2

Miguel Riem de Oliveira 22 Jul 13, 2022
Cow Feeder is a bot automatically execute trade on cowswap

Cow Feeder is a bot automatically execute trade on cowswap, includes functions: Monitoring Ethereum network gas price and execute trade whe

6 Apr 20, 2022
An open source two key macro-pad modeled to look like a cartoony melting popsicle

macropopsicle An open source two key macro-pad modeled to look like a cartoony melting popsicle. Build instructions Parts List -1x Top case half (3D p

17 Aug 18, 2022
Simple Weather Check base on Hefeng api, Work on raspberry Pi

Simple Weather Check base on Hefeng api, Work on raspberry Pi

Retr0mous 28 Sep 17, 2022
Inykcal is a software written in python for selected E-Paper displays.

Inykcal is a software written in python for selected E-Paper displays. It converts these displays into useful information dashboards. It's open-source, free for personal use, fully modular and user-f

Ace 727 Jan 02, 2023
Minimal and clean dashboard to visualize some stats of Pi-Hole with an E-Ink display attached to your Raspberry Pi

Clean Dashboard for Pi-Hole Minimal and clean dashboard to visualize some stats of Pi-Hole with an E-Ink display attached to your Raspberry Pi.

Alessio Santoru 104 Dec 14, 2022
Home Assistant custom components MPK-Lodz

MPK Łódź sensor This sensor uses unofficial API provided by MPK Łódź. Configuration options Key Type Required Default Description name string False MP

Piotr Machowski 3 Nov 01, 2022
Control DJI Tello with Raspberry Pi and PS4 Controller

Control-DJI-Tello-with-Raspberry-Pi-and-PS4-Controller Demo of this project see

MohammadReza Sharifi 24 Aug 11, 2022
Used python functional programming to make this Ai assistant

Python-based-AI-Assistant I have used python functional programming to make this Ai assistant. Inspiration of project : we have seen in our daily life

Durgesh Kumar 2 Dec 26, 2021
Hardware: CTWingSKIT_BC28 Development Toolkit

IoT Portal Monitor Tools hardware: CTWingSKIT_BC28 Development Toolkit serial port driver: ST-LINK hardware development environment: Keli 5 MDK IoT pl

Fengming Zhang 1 Nov 07, 2021
OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick

OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick. It can handle being the brains of your entire stick, or just handling the bells and wh

Sleep Unit 23 Nov 24, 2022
Modi2-firmware-updater - MODI+ Firmware Updater With Python

MODI+ Firmware Updater 실행 준비 python3(파이썬3.9 혹은 그 이상의 버전)를 컴퓨터에 설치 python3 -m pip

LUXROBO 1 Feb 04, 2022
Aqara Camera G3 integration for Home Assistant

Aqara Camera G3 integration for Home Assistant ATTENTION: The component only works after enabled telnet. Only supportd stream. Not support still image

14 Dec 18, 2022
Smart Tech Automation Remote via Kinematics Gesture control for IoT devices

STARK Smart Tech Automation Remote via Kinematics Gesture control for IoT devices View Demo · Report Bug · Request Feature Table of Contents About The

Juseong (Joe) Kim 1 Jan 29, 2022
The main aim of this project is to avoid the accidents in shredding ( Waste Recycling Industry )

shredder-Machine-Hand-Safety The main aim of this project is to avoid the accidents in shredding ( Waste Recycling Industry ) . The Basic function of

Shubham Chaudhari 1 Nov 15, 2021