This project builds a client/server network where the client can:
- Create a dictionary, populate it with data, serialise it, and send it to a server.
- Create a text file, optionally encrypt it, and send it to the server.
The server, in turn, provides configurable options to:
- Display or store the content received from the client.
- Decrypt files if encryption is applied by the client.
- Work seamlessly across separate machines or on the same machine.
The project uses Python’s socket programming to establish a reliable communication channel, with added flexibility in data formats and encryption options.
- Serialization Formats:
Supports binary, JSON, and XML formats for data serialisation. - Encryption and Decryption:
Optional encryption on the client-side for text files, with server-side decryption capability. - Configurable Output:
Server can print received data to the console or save it to a file. - Interoperability:
Works across local or remote machines.
In a world reliant on interconnected systems, client/server networks play a crucial role in data exchange. This project demonstrates:
- Practical use of Python's socket programming for real-world communication.
- Secure data transmission using encryption.
- Flexible server-side configurations for customised data handling.
- Establish Connection:
The client initiates a connection to the server using Python’s socket library. - Data Preparation and Serialization:
The client prepares a dictionary, serialises it in a chosen format (binary, JSON, or XML), and sends it to the server. - File Encryption and Transfer:
If enabled, the client encrypts a text file before transmission. - Server Processing:
The server receives the data, decrypts files if needed, and either displays the content or saves it. - Completion and Termination:
The connection is closed after the transfer and processing are complete.
- Python: Tested with version 3.11.
- Install required libraries by running:
pip install -r requirements.txt- Start the server:
- Run the server script to begin listening for incoming data.
python server.py- Run the client:
- Use the client script to send data to the server.
python client.pyThis project includes unit tests to ensure functionality. Run the tests using:
python -m unittestclient.py: Handles data creation, serialisation, and transmission from the client to the server.server.py: Processes incoming data from the client and handles encryption/decryption.requirements.txt: Lists required Python libraries.tests/: Contains unit tests for validating core functionalities.
The Secure Communication Framework can be transformed into an enterprise-grade solution for secure file transfer, encrypted messaging, and confidential data exchange. By integrating enhanced encryption protocols, multi-client support, and cloud-based storage options, this framework can serve businesses in finance, healthcare, and government sectors where data security is paramount. A potential expansion includes user authentication, role-based access control, and compliance auditing, making it a reliable, enterprise-ready product.
This system can be monetised through subscription-based enterprise licensing, offering tiered pricing for basic, advanced, and custom deployment packages. An additional revenue stream can come from API-based access, allowing third-party platforms to integrate secure communication functionalities into their own applications. Custom security consulting services can be provided to businesses looking for tailored encryption and compliance solutions. Another monetisation approach includes cloud-hosted deployments, where businesses pay for managed secure communication services without needing on-premise infrastructure.
Natalya Smith; Patrick Bracebridge; Sanet Shepperson Contributions are welcome! If you have ideas or improvements to share, please follow these steps:
-
Fork the Repository: Create your own copy of the repository by clicking the "Fork" button at the top right of this page.
-
Create a Feature Branch: Work on your changes in a dedicated branch.
git checkout -b feature/YourFeatureName- Commit Your Changes: Write clear and concise commit messages explaining what you’ve done.
git commit -m "Add YourFeatureName"- Push Your Changes: Push your feature branch to your forked repository.
git push origin feature/YourFeatureName-
Open a Pull Request: Submit your changes to the main repository by opening a pull request (PR). Ensure your PR description explains your changes clearly.
-
Review and Feedback: We will review your PR and may suggest improvements before merging it into the main branch.
Thank you for your interest in contributing!
As part of preparing this repository for collaboration, its commit history has been cleaned. This action ensures a more streamlined project for contributors and removes outdated or redundant information in the history.
The current state reflects the latest progress as of 24/01/2025.
For questions regarding prior work or additional details, please contact the author.
This project is licensed under the MIT License. See the LICENSE file for details.