You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
542 B
Bash
14 lines
542 B
Bash
#!/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
|