a simple, colorful chat server implemented in python that can be accessed using netcat.
netcat-chat is a multi-user chat server that allows users to connect using netcat or telnet, common networking utilities. the server handles multiple connections simultaneously and provides a simple interface for chatting and performing basic commands.
- connect using netcat or telnet
- colorful output (gray for system messages, pink for user's own messages)
- simple commands for changing nicknames, listing users, and disconnecting
- broadcasts user join/leave messages
- configurable port via environment variable
/nick <name>
: change your nickname/list
: show online users/?
: show help message/bye
: disconnect from chat
/? for help
users online: 1
[08:23] user64100 connected
[08:23] user64100 changed his nick to taky
users online: 1
taky
[08:23] taky: heyo
/nick <name> - change your nick
/list - show online users
/? - show help
/bye - disconnect from chat
your current nick is: taky
[08:24] taky changed his nick to swrv
users online: 1
swrv
- start the server by running the python script
- by default, the server uses port 2222
- to use a different port, set the
CHAT_PORT
environment variable:export CHAT_PORT=5000 python chat_server.py
- connect to the server using netcat:
nc <server_ip> <port>
- once connected, you'll see a welcome message and the number of online users
- use the commands listed above to interact with the chat
- written in python
- uses threading to handle multiple client connections
- implements a simple protocol for chat messages and commands
- uses ansi color codes for colorful output
- allows port configuration via the
CHAT_PORT
environment variable
enjoy chatting!