An open API service indexing awesome lists of open source software.

https://github.com/meghanab1909/electora-secure-voting-system

This is my Semester 4 Mini Project 2 for Computer Networks, developed in a pair, on the topic Secure Voting System using Socket Programming in Python.
https://github.com/meghanab1909/electora-secure-voting-system

mysql openssl python python-tkinter smtplib tcp-socket twilio-api

Last synced: 6 months ago
JSON representation

This is my Semester 4 Mini Project 2 for Computer Networks, developed in a pair, on the topic Secure Voting System using Socket Programming in Python.

Awesome Lists containing this project

README

          

## Project Overview
Electora is a Secure Voting System implemented in Python Tkinter using Socket Programming. This project uses TCP socket as TCP prioritizes reliability over speed of transmission.

## Files of this Repository


Poll1.py

This python file is responsible to receiving the poll admin details. The poll admin details are stored in a table in mySQL. Only after authenticating the poll admin, Poll2.py shall open.



Features of Poll1.py


  1. Receives poll admin details

  2. Checks SQL database to verify and authenticate

  3. Necessary validations are present






Poll2.py

This python file is responsible for making the poll, sending the poll info to the server and live stats. In addition to this, there is also a poll time feature. By default the poll time is set to 5:00pm (but it can be modified).



Features of Poll2.py

  1. Recives the poll details

  2. Submits the poll info to server

  3. Displays live stats

  4. End Poll Option, to end the poll prior to the set poll time

  5. Keeps track of poll time. If poll time is exceeded then the poll is terminated automatically with the results being sent to registered voters.

  6. Necessary validations are present






Server.py

This python file is the Server file of this project. It is the integral part of the project responsible for many functions.



Features of Server.py

  1. Receives poll data and writes into SQL database

  2. Checks voter details. If the voter details are found, the OTPs are sent via phone number (using twilio) and email (using SMTP) for authentication.

  3. If the authenticated, the server sends the poll info to the voter

  4. Receives the votes of the voters, sets the voter id status to voted (updates in SQL database) and stores it in a csv file. The csv file aides the live stats of Poll2.py.

  5. Keeps track of poll time. If the time is exceeded OR end poll button is pressed, it terminates all the functions indicating the poll is terminated.

  6. Necessary validations are present





Voter.py

This python file is the voter file where the voters can get authenticated and vote for the candidate of their choice.



Features of voter.py

  1. Receives the login details of voters and sends to server

  2. If voter found, the OTPs are sent for authentication.

  3. Once authenticated, the voter can see the poll info sent by server

  4. Vote is submitted

  5. Necessary validations are present




## Prequisites
1. Python
2. Tkinter
3. MySQL (Create the database and necessary tables)
4. SMTP (Recommended to create an email specific to this project)
5. Twilio (Create a twilio account, video reference: https://www.youtube.com/watch?v=-fqGGqXHQ2E&pp=ygUGdHdpbGlv)
6. OpenSSL
7. Numpy and Matplotlib

## Before Running the Project
1. Download the project files in this repository
2. Generate csr, crt and key files. Check the code and do the necessary additions. The parts where the additions are to be made are highlighted.

## Run the project

(Please run the project in the following sequence)
1. Server.py
2. Poll1.py (On the poll admin getting authenticated, Poll2.py shall open)
3. _Once the poll is made_, Voter.py


Server.py -> Poll1.py -> (Poll2.py should open after poll admin is authenticated) -> voter.py

*Note: To get a better understanding of the project, kindly watch the screen recording of the project (project.mp4) uploaded in the repository. If the video is not being displayed/loaded on github please download it*

## Project Contributors _(In Alphabetical Order)_
1. Meghana Saisri Bisa - github username: Meghanab1909

2. Mitha M K