Skip to content

A C++ project implementing a secure client-server file sharing system on Linux using socket programming, authentication, and encryption for reliable data transfer.

License

Notifications You must be signed in to change notification settings

Sandeeppattanaik07/Assignment-4--Network-File-Sharing-Server-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ Secure Network File Sharing System (Client–Server Model)

A secure C++ project implementing a client–server file sharing system using TCP sockets in Linux/WSL, supporting authentication, encrypted upload/download, file listing, server logging, and progress bars.


βœ… 1. Project Overview

This project demonstrates a secure file-sharing mechanism where:

  • Users authenticate using a username & password.
  • Files can be uploaded to the server.
  • Files can be downloaded from the server.
  • All server files can be listed.
  • XOR encryption is used for secure transfer.
  • Server logs all activities in server_log.txt.

This project covers Linux socket programming, encryption, client–server communication, and file transfer over TCP.


βœ… 2. Features

πŸ” Authentication

Users authenticate using credentials stored in users.txt.

⬆️ Secure File Upload

  • Encrypted file transfer
  • Chunk-based upload
  • Real-time progress bar
  • Automatic save on server

⬇️ Secure File Download

  • Encrypted transfer
  • Progress bar
  • Auto-save to /downloads/ folder

πŸ“‚ File Listing

View all server files inside shared_files/.

πŸ”’ XOR Encryption

Simple XOR-based encryption applied during upload/download.

πŸ“ Server Logging

Every login, upload, download is logged in server_log.txt.


βœ… 3. Folder Structure

Assignment-4--Network-File-Sharing-Server-Client/
β”œβ”€β”€ Client/
β”‚ β”œβ”€β”€ client.cpp
β”‚ β”œβ”€β”€ client
β”‚ └── downloads/
β”‚
β”œβ”€β”€ Server/
β”‚ β”œβ”€β”€ server.cpp
β”‚ β”œβ”€β”€ server
β”‚ β”œβ”€β”€ users.txt
β”‚ β”œβ”€β”€ server_log.txt
β”‚ └── shared_files/
β”‚
β”œβ”€β”€ screenshots/
β”‚ β”œβ”€β”€ img1.png
β”‚ β”œβ”€β”€ img2.png
β”‚ β”œβ”€β”€ img3.png
β”‚ β”œβ”€β”€ img4.png
β”‚ β”œβ”€β”€ img5.png
β”‚ β”œβ”€β”€ img6.png
β”‚ β”œβ”€β”€ img7.png
β”‚ β”œβ”€β”€ img8.png
β”‚ β”œβ”€β”€ img9.png
β”‚ β”œβ”€β”€ img10.png
β”‚ β”œβ”€β”€ img11.png
β”‚ β”œβ”€β”€ img12.png
β”‚ β”œβ”€β”€ img13.png
β”‚ β”œβ”€β”€ img14.png
β”‚ └── img15.png
β”‚
β”œβ”€β”€ README.md
└── LICENSE

βœ… 4. How to Run

▢️ Start the Server

cd Server
g++ server.cpp -o server
./server

▢️ Start the Client

cd Client
g++ client.cpp -o client
./client

βœ… 5. Screenshots (All 15 Included)

πŸ“Έ 1. Client Login Screen

screenshot1

πŸ“Έ 2. Entering Username & Password

screenshot2

πŸ“Έ 3. Login Successful on Client

screenshot3

πŸ“Έ 4. Server Authenticating User

screenshot4

πŸ“Έ 5. Server Login Success Message

screenshot5

πŸ“Έ 6. Client Main Menu

screenshot6

πŸ“Έ 7. Uploading File – Progress Bar

screenshot7

πŸ“Έ 8. Upload Completed Successfully

screenshot8

πŸ“Έ 9. Downloading File – Progress Bar

screenshot9

πŸ“Έ 10. File List on Server

screenshot10

πŸ“Έ 11. Download Completed

screenshot11

πŸ“Έ 12. Server After File Transfer Logging

screenshot12

πŸ“Έ 13. Client Folder Showing Downloaded Files

screenshot13

πŸ“Έ 14. Server Folder Showing Uploaded Files

screenshot14

πŸ“Έ 15. GitHub Repository Overview

screenshot15

βœ… 6. Learning Outcomes

You will understand:

  1. Linux socket programming

  2. TCP client–server communication

  3. File transfer using streams

  4. Chunk-based transmission

  5. XOR encryption/decryption

  6. Logging techniques

  7. Git & GitHub workflow

  8. WSL/Linux development environment

βœ… 7. Future Enhancements

  1. Multi-client support (threaded)

  2. AES/RSA encryption instead of XOR

  3. GUI interface

  4. SHA-256 integrity verification

  5. Pause/Resume downloads

βœ… 8. Project Report File

πŸ“„ Download Project Report (PDF)

βœ… 9. License

MIT License.

βœ… 10. Author

Sandeep Pattanaik

CSE(Cyber Security) Student

ITER, S'O'A University

About

A C++ project implementing a secure client-server file sharing system on Linux using socket programming, authentication, and encryption for reliable data transfer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages