Salgachat (Salgado + Chat) is a multiuser chat written in C.
Features:
- Multithread-oriented (POSIX Threads).
- Colors and fancy log on server-side.
- Commands such as
/list
,/exit
, ... - Non-canonical input from
stdin
with special handlers. - Printable messages limit.
Just git clone
and follow the below:
cd salgachat
make
Loguva and Libcolor are both created by me, and they are statically linked with the other files.
- Server:
./server-salga [bind port]
- Client:
./client-salga [server ip] [port]
Now you can connect the max clients that the server can handle, and have fun with the chatroom! The max clients can be changed by recompiling the server passing through the macro CLIENTSMAX and its value.
Yeah, you can talk to your friends with this chat app, but for now, it isonly a 4fun project. So, don’t use it to transmit sensitive information.
- Why?
Because it's not encrypted. The whole protocol (user, messages, commands, flags) is sent in plain text. I'll show you below with Wireshark:
Let’s suppose that you want to send your own password from any service on the internet:
Inside wireshark:
In summary, anyone can do a main-in-the-middle attack, and you know where this ends...
For now, there are a few commands available to use:
/list
=> List the number of users connected now./exit
=> Exit the user from chat.
There are two ways of QUITING
in salgachat:
- Typing
/exit
. - Sending a
SIGINT
with Ctrl+C.
- Protocol encryption.
- Advanced colors for each user.
- Better handlers to Arrow Keys, such as history system with doubly linked list.
- Improve CLI usage.