All Projects → edghyhdz → Silver Sniffle

edghyhdz / Silver Sniffle

Licence: mit
Ncurses TCP Chat

Projects that are alternatives of or similar to Silver Sniffle

Dubbogo
a golang micro-service framework compatible with alibaba dubbo
Stars: ✭ 258 (+578.95%)
Mutual labels:  tcp-server, tcp-client
Bizsocket
异步socket,对一些业务场景做了支持
Stars: ✭ 469 (+1134.21%)
Mutual labels:  tcp-server, tcp-client
Hprose Nodejs
Hprose is a cross-language RPC. This project is Hprose 2.0 for Node.js
Stars: ✭ 297 (+681.58%)
Mutual labels:  tcp-server, tcp-client
CSharpServer
Ultra fast and low latency asynchronous socket server & client C# library with support TCP, SSL, UDP protocols and 10K connections problem solution
Stars: ✭ 101 (+165.79%)
Mutual labels:  tcp-server, tcp-client
Simpleunitytcp
🖧 Simple Unity Project to show how TCP communication are builded in C# without multi-threading or Unity network (Unet) involved.
Stars: ✭ 22 (-42.11%)
Mutual labels:  tcp-server, tcp-client
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (+76.32%)
Mutual labels:  tcp-server, tcp-client
Cowboy
Cowboy.Sockets is a C# library for building sockets based services.
Stars: ✭ 364 (+857.89%)
Mutual labels:  tcp-server, tcp-client
trellio
Python3 asyncio based microframework for microservice architecture
Stars: ✭ 19 (-50%)
Mutual labels:  tcp-server, tcp-client
Nat Ddns
tcp代理转发工具,可用于内网穿透实现类似花生壳等工具的功能
Stars: ✭ 19 (-50%)
Mutual labels:  tcp-server, tcp-client
Netcoreserver
Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 799 (+2002.63%)
Mutual labels:  tcp-server, tcp-client
ctsTraffic
ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics
Stars: ✭ 125 (+228.95%)
Mutual labels:  tcp-server, tcp-client
Tinytcpserver
A small tcp server working under Mono or .NET (4.0) and provides hooks for handling data exchange with clients (works under mono and .net). Behaviour/protocol/reaction could be specified via custom C# script.
Stars: ✭ 14 (-63.16%)
Mutual labels:  tcp-server, tcp-client
network
exomia/network is a wrapper library around System.Socket for easy and fast TCP/UDP client & server communication.
Stars: ✭ 18 (-52.63%)
Mutual labels:  tcp-server, tcp-client
EasyFileTransfer
An easy way to transfer file with any size on network with tcp protocol.
Stars: ✭ 30 (-21.05%)
Mutual labels:  tcp-server, tcp-client
machat
An open source chat server implemented in Go
Stars: ✭ 73 (+92.11%)
Mutual labels:  tcp-server, tcp-client
Tacopie
C++ TCP Library - NO LONGER MAINTAINED
Stars: ✭ 359 (+844.74%)
Mutual labels:  tcp-server, tcp-client
tcp-net
Build tcp applications in a stable and elegant way
Stars: ✭ 42 (+10.53%)
Mutual labels:  tcp-server, tcp-client
cAndroid
cAndroid is tool for control your PC by Android phone
Stars: ✭ 23 (-39.47%)
Mutual labels:  tcp-server, tcp-client
Cppserver
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 528 (+1289.47%)
Mutual labels:  tcp-server, tcp-client
Chat Socket
A simple chat room using java socket with the client-server paradigm
Stars: ✭ 24 (-36.84%)
Mutual labels:  tcp-server, tcp-client

NCURSES Encrypted TCP Chat

This is an encrypted chat via the command line! It was done using ncurses to build the whole user interface. I wanted to do a client-server example of a chat, were also the messages would be encrypted from end to end.

Upon accepting the connection of a new client, the first message the server gets is the public key from the client, which is later sent to all listening sockets (clients). The messages are first encrypted using logged client's public keys before being sent to back to the server. Other listening clients will unencrypt their messages by using their private key.

The project consists of 3 main parts,

  • TCP Server -> you could use ngrok to accept network trafic on a dedicated port, and be like a real chat!
  • Client
  • Terminal user interface

In the gifs below, the right terminal was opened using telnet (install on linux) to showcase how a person not using the client would see the messages from users using this project's client.

Official Client Connected using telnet

The example below showcases two clients, were the messages are encrypted end to end.

Official Client A Official Client B

Conntact me on twitter Tweet | Create an issue

Table of Contents

  1. Motivation and Disclaimer
  2. Description
  3. Usage
  4. Dependencies
  5. Installation
  6. References
  7. Author

Motivation and Disclaimer

What can I say, I love ncurses and I wanted to do an example of something that required encryption, the idea of a TCP Chat was the first thing that came into my mind.

This was just a project made out of curiosity, the use that you might give to this tool is at your own risk.

Description

This command line TCP Chat was built using ncurses.

Server

The server is running constantly, and could also be used on a raspberry pi in combination with ngrok. By doing so, you could open your chat to other peers and have a secure way of messaging.

Client

The client has a nice UI to be used on the terminal. The client first connects to the server and sends its public key to the server. The server retrieves this information and sends it to all users using this client.

Every client will then encrypt their messages with the other listening clients' public keys. The server will then get each corresponding listening client's message and send it accordingly.

Once the encrypted message is received on the other clients' side, it is unencrypted using the user's private key.

The client renews its key pairs everytime you start it.

Usage

Once the installation has been done,

As per default, the port to which the server is connecting to is 54000

Starting the Server (In case you are running the server)

source silver_server

Starting the Client

source silver_sniffle -a 127.0.0.1 54000

127.0.0.1 and the port 54000 could be changed for example to your own TCP address if you've got one. Of course, the server would have to be running on that address.

Dependencies

  1. ncursessudo apt install libncurses5-dev libncursesw5-dev
  2. Open SSL sudo apt-get install libssl-dev
  3. cmake sudo apt-get -y install cmake

Installation

Clone this repository like so,

git clone https://github.com/edghyhdz/silver-sniffle.git

Once inside the root project folder silver-sniffle,

# Lets start by creating the build directory
mkdir build && cd build

# cmake that guy
cmake ..

# Finally
source install.sh

install.sh will run the final installation that will create a terimal shortcut named silver_server and silver_sniffle.

The final project folder structure is the following,

.
├── ...
├── build                     # Directory were project was built
│   ├──silver_server          # Server executable
│   ├── executable            # Client executable location
│   │   └─── silver_sniffle   # Client executable
│   └── certificates          # key pair location
└── ...

If everything was done allright, you should be able to run the server by doing the following,

source silver_server

Once the server is up and running, you should be able to run the client like so,

source silver_sniffle -a 127.0.0.1 54000

You can always re-route the client to another address.

References

The most relevant references are the following,

  1. Part of this code was taken from user Sloan Kelly, and adapted to this script to run on linux and work with Ncurses link to his repo here
  2. To encryt the messages, I took the this code snippet from ProgrammerSought as an example
  3. Finally, to generate the key pairs I used this code snippet from Dynamsoft

More references can be found inside the code.

Author

Edgar Hernandez

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].