Simple encrypted chat with Diffie-Hellman key exchange
Clone this repo and go to cloned directory. Run go build to build the program.
If you want Windows Cross Compiling, run on Linux:
GOOS=windows GOARCH=386 go buildIf you want to use Protocol Buffer (currently not used)
go get -u github.com/golang/protobuf/protoc-gen-go
export PATH=$PATH:$GOPATH/bin
protoc -I=./simple --go_out=./simple ./simple/simple.protoHelp menu:
$ ./godhchat --help
usage: ./godhchat [-h] [--port PORT] [--listen | --host HOST]
Diffie-Hellman Chat - encrypted chat with Diffie-Hellman key exchange
optional arguments:
-host string
IP address to connect to
-listen
listen to a port (Chat Server)
-port uint
port number for connection (default 6001)
[+] Written by 15520599In server side, run:
./godhchat --listento open default port 6001 and listen on all interfaces. You can specify which port you want with option --port.
In client side, run:
./godhchat --host localhostReplace localhost with server IP address if server did not run on local. Again, use --port to choose which port to connect to.
Use CtrlC to kill the program.
Server side:
$ ./godhchat --listen
Listenning on port: 6001
Connection from 127.0.0.1:56642
>>> asdf
<<< >>> good manClient side:
$ ./godhchat --host localhost
asdf
<<< good man
<<< >>> okDecode it:
$ echo -n 'UspNgg3ccUFF9SzYvcKJRumWyXJ49h-4oi8uR1lVk_GCOMTVoi2gXoJtT3tMvrM0' | base64 -d
base64: invalid input- CtrlD hangs the program.
Released under MIT License