This project is a Secure, Multi-client TCP/IP Chatroom built in Python. It has been upgraded from a basic text chat to a feature-rich, encrypted communication system.
- 🔒 Secure Encrypted Chat: All messages are encrypted using SSL/TLS (self-signed certificates), ensuring privacy from network snooping.
- 🕵️ Anonymous Mode: Join without a nickname to be assigned a random identity (e.g.,
Anon#1234). No password required. - 📁 File Transfer: Broadcast files to all connected users using the
/sendcommand. - ⚡ JSON Protocol: Uses a robust JSON-based protocol for reliable data and file exchange.
- 🛡️ Admin Privileges: Admins can kick/ban users (requires password login).
.
├── Chat-On/
│ ├── server.py # Secure Server script
│ ├── client.py # Secure Client script
│ ├── generate_cert.py # Script to generate SSL keys
│ ├── server.crt # SSL Certificate (generated)
│ ├── server.key # SSL Private Key (generated)
│ ├── servers.json # Server configuration
│ └── downloads/ # Received files are saved here
└── README.md # Documentation
- Python 3.x
cryptographylibrary
pip install cryptographyBefore running the server, you must generate the self-signed certificates:
cd Chat-On
python generate_cert.pyThis will create server.crt and server.key.
python server.pyYou will see: Secure Server Listening...
Open a new terminal (or multiple) and run:
python client.py- Anonymous: Leave the Nickname field BLANK and press Enter. You will be
Anon#XXXX. - Admin: Enter nickname
admin. You will be prompted for the password (adminpassby default). - Regular User: Enter any other unique nickname.
-
Send File:
/send <path_to_file>- Example:
/send C:\Images\my_photo.jpg - The file will be sent to all other users and saved in their
downloads/folder.
- Example:
-
Admin Only:
/kick <nickname>: Kick a user./ban <nickname>: Ban a user (prevents rejoin).
This project is open-source and available for modification under the MIT License.