From e15b9d3be785499ad6cd796b0d0264bf62edab56 Mon Sep 17 00:00:00 2001 From: fanta Date: Wed, 11 Mar 2026 21:39:12 +0100 Subject: [PATCH] =?UTF-8?q?c=C3=B3digo=20inicial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatssl.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 chatssl.sh diff --git a/chatssl.sh b/chatssl.sh new file mode 100755 index 0000000..f0d2993 --- /dev/null +++ b/chatssl.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# chatSSL - fanta - fanta@56k.es - 2026 +# apt install netcat-traditional + +port=1024 +password="1234" +ip="$1" + +code(){ while true; do read -r input ; cm=$(echo "$input" | openssl enc -pbkdf2 -k "$password" | openssl enc -a) ; echo "$cm" ; done } +decode(){ while true; do read -r cinput ; dm=$(echo "$cinput" | openssl enc -d -a | openssl enc -d -pbkdf2 -k "$password") ; echo "$dm" ; done } + +if (( $# == 1 )); then code | nc "$ip" "$port" | decode ; fi # Client +if (( $# == 0 )); then code | nc -l -p "$port" | decode ; fi # Server