Welcome aboard fellow developer, this is where you will find projects which you are free to contribute to. You can contribute by submitting your own scripts, which you think would be amazing for other people to see.
It is a set of 5 programs used together to send a file from office A to office B very securely
- Part 1 : Desktop application built with WPF that takes file as input, encrypt the file, encode to base64, and write the output to txt file
- Part 2 : Script written in Python that decrypts the file created in (Part 1) written in C#, and writes the output to a new file. (Decrypting a file using a language different from the language used in the encryption is to gain more experience)
- Part 3 : Web application built with ASP.NET core that receive files from client A using API, save them, and provide to client B when asked for. It have authentication to prevent others from upload or download and record every file upload and download to a database table
- Part 4 : Desktop application built with WPF that take file as input and send the file to web app (Part 3)
- Part 5 : Desktop application built with WPF (runnable on program of Part 2) that download files from the web application (Part 3)
Download the project from github to your desktop:
-
With Git : If you’re familiar with git and have it installed on your computer, you can clone the repository to download the files.
1. Click the green button labeled
Code
2. Copy the URL of the repository
3. Next, on your local machine, open your bash shell and change your current working directory to the location where you would like to clone your repository
cd "path-to-your-folder"
4. Once you have navigated to the directory where you want to put your repository, you can use
git clone https://github.com/MouhammadAyoub/Encrypted-File-Sharing-System.git
5. When you run
git clone https://github.com/MouhammadAyoub/Encrypted-File-Sharing-System.git
, You should see output likeCloning into 'test-repo'... remote: Counting objects: 5, done. remote: Compressing objects: 100% (4/4), done. remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (5/5), done. Checking connectivity... done.
-
Without Git : When downloading materials to your laptop, it is easiest to download the entire repository.
1. Click on the green
Code
button, then download the repository as a ZIP file2. Find the downloaded .zip file on your computer, likely in your Downloads folder
3. Unzip it, this will create a folder named after the GitHub repository
-
Steps you must do to make the system work properly :
-
Exercice 1 : Nothing
-
Exercice 2 :
-
Before you install PIP on Windows, check if PIP is already installed:
-
Type cmd in the Windows search bar and click the
Command Prompt
icon -
Type in the following command at the command prompt
pip help
-
If PIP responds, then PIP is installed. Otherwise, there will be an error saying the program could not be found
-
-
Before installing PIP, download the get-pip.py file:
-
Type cmd in the Windows search bar and click the
Command Prompt
icon -
Run the following command to download the get-pip.py file
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
-
-
Installing PIP on Windows:
-
To install PIP type in the following
python get-pip.py
-
-
Download Pakages:
-
To install
Crypto
library using PIP type in the following in the cmdpip install pycryptodome
-
-
-
Exercice 3 :
- Launch MySQL Workbench and create a database with the following specifications
- Change the server, database, user and password values of the MySqlConnection function in the
Program.cs
file
- Correct all paths to folders in the
Program.cs
file
-
Exercice 4 :
- Replace the current localhost in HttpWebRequest by your localhost in the
MainWindow.xaml.cs
file
- Replace the current localhost in HttpWebRequest by your localhost in the
-
Exercice 5 :
- Replace the current localhost in HttpWebRequest by your localhost in the
MainWindow.xaml.cs
file
- Correct all paths to folders in the
MainWindow.xaml.cs
file
- Replace the current localhost in HttpWebRequest by your localhost in the
-
- Exercice 1 : The first step you need to do is to use the desktop application in Exercise 1 to
Encrypt The File
you want to send
Note : This is the content of the File
we need to encrypt
Note : Once you choose the file to be encrypted, the Save button will become clickable, and by clicking on it you can choose where you want to save the encrypted file
Note : This is the content of the file that we saved After Encrypting It
- Exercice 2 : The Exercise 2 is a Python script whose job is to
Decrypt The File
we just encrypted by receiving two arguments, the first is the path of the file we need to decrypt and the second is the path where we want to save the result, but we can't use it alone because it doesn't have a user interface, so we'll use it in Exercise 5 later
- Exercice 3 : This is our web API which contains API functions that we have to use in other applications, and it is also the intermediate place where the file will be stored between office A and office B
Note : We have a GetToken
function which provides strong site security without which authentication cannot succeed, and anyone who doesn't have a username and password or enter wrong values can't get the token
Note : We have an UploadFiles
function that enables us to upload many files and store them in the web app by just giving the paths to these files
Note : We also have a DownloadFile
function which enables us to download the file from the web application simply by entering its name
- Exercice 4 : The function of this desktop application is to
Send The Files
of our choice to the web application for the purpose of storing it
Note : Once the file is selected (of course we have to choose one of the files that we have already encrypted using the ثxercice 1 application), the Send Button
will be clickable, and by clicking on it you will be able to send the file to the web application.
- Exercice 5 : The function of this application is to allow Office B to
Download Encrypted Files
that Office A has uploaded to the web application
Note : Once the file name is entered (we did not put a drop down list of the file names on the web application in order to maintain high security, so the user must enter the file name accurately), the Download Button
will be clickable, and by clicking on it will not only download the file, but also decrypt it by implicitly using the Python script in Exercise 2.
The contribution guidelines are as per the guide HERE.
- Fork this repository
- Clone your forked repository
- Add your scripts
- Commit and push
- Create a pull request
- Star this repository
- Wait for pull request to merge
- Celebrate your first step into the open source world and contribute more
Distributed under the MIT License. See LICENSE
for more information.
Copyright © 2022, Mohammad Ayoub
-
Email : mouhammad.ayoub@outlook.com
-
Project Link : https://github.com/MouhammadAyoub/Encrypted-File-Sharing-System
- How to Contribute to Open Source Projects – A Beginner's Guide
- How to Write a Good README File for Your GitHub Project