Messeging With Netcat Script With Bash On Linux
Page 1 of 1
Messeging With Netcat Script With Bash On Linux
Updated
Send message
- Code:
#!/bin/bash
# (c) J~Net 2016
# Usage: ./send.sh "test message"
#
myvar="$@"
if [ -z "$*" ]; then
echo "Enter Text To Send: "
read myvar; fi
sudo ballbags
echo $myvar > msg.txt
clear
echo "Binary Server AKA SENDER"
clear
echo -en "\e[92mPlease Wait \c"
echo $myvar | nc localhost 776
count=0
total=34
pstr="[=======================================================================]"
while [ $count -lt $total ]; do
sleep 0.006 # this is work
count=$(( $count + 1 ))
pd=$(( $count * 73 / $total ))
printf "\r%3d.%1d%% %.${pd}s" $(( $count * 100 / $total )) $(( ($count * 1000 / $total) % 10 )) $pstr
done
echo "Message Sent!, Please Wait 5 Seconds..."
sleep 5
sh send.sh
Receive
- Code:
#!/bin/bash
# (c) J~NET 2016
#
echo -en "\e[92m "
clear
echo "Waiting For New Message"
sudo nc -l -p 776 > rmsg.txt
#echo "All Done!"
#echo -en"\e[94m \c"
clear
cat rmsg.txt
echo -en "\e[70m \c"
echo "Continue [ENTER]:"
read input123
sh recieve.sh
Last edited by jamied_uk on 22nd July 2016, 19:42; edited 1 time in total
Re: Messeging With Netcat Script With Bash On Linux
Updated Files
app.box.com/s/pjcaiicqhp3jeluiedbddd4u424v6e8r
app.box.com/s/pjcaiicqhp3jeluiedbddd4u424v6e8r
Re: Messeging With Netcat Script With Bash On Linux
Check Out
jnet.forumotion.com/t1328-message-netcat-bash-part-3-auto-grabbing-menu#1853
jnet.forumotion.com/t1328-message-netcat-bash-part-3-auto-grabbing-menu#1853
Re: Messeging With Netcat Script With Bash On Linux
Voice Chat Upgrade
app.box.com/s/lptnaa5vj4vc6kzreskczkeewc1a9s23
app.box.com/s/lptnaa5vj4vc6kzreskczkeewc1a9s23
Re: Messeging With Netcat Script With Bash On Linux
Encrypted (Rot 13 Version)
send.sh
Recieve.sh
send.sh
- Code:
#!/bin/bash
function rot13 {
if [ -r $1 ];
then cat $1 | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]';
else echo $* | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]';
fi
}
# (c) J~NET 2018
#
# jnet.forumotion.com/t1326-messeging-with-netcat-script-with-bash-on-linux?highlight=netcat+chat
#
# Install especk
# sudo apt install -y espeak
#
# Usage: ./send.sh "test message"
#
# Setup:
host="localhost"
port="776"
#
#
myvar="$@"
if [ -z "$*" ]; then
msg="Enter Text To Send: "
echo $msg
espeak -v en "$msg" -g 01ms -a 110 -p 58 -s 175
#
read myvar; fi
#
#
# sudo ballbags # this is just to get sudo for future commands that may require sudo!
#
echo $myvar > msg.txt
# Do Encryption / Replacements here!!!
value=$(<msg.txt)
value_enc=$(rot13 $value)
cat $value_enc > msge.txt
clear
echo "Binary Server AKA SENDER"
clear
echo -en "\e[92mPlease Wait \c"
echo $value_enc | nc "$host" "$port"
count=0
total=34
pstr="[=======================================================================]"
while [ $count -lt $total ]; do
sleep 0.006 # this is work
count=$(( $count + 1 ))
pd=$(( $count * 73 / $total ))
printf "\r%3d.%1d%% %.${pd}s" $(( $count * 100 / $total )) $(( ($count * 1000 / $total) % 10 )) $pstr
done
echo "Message Sent!, Please Wait 5 Seconds..."
echo ""
sleep 6
clear
bash send.sh
Recieve.sh
- Code:
#!/bin/bash
#
# (c) J~NET 2018
#
# sudo apt install -y espeak
#
# jnet.forumotion.com/t1326-messeging-with-netcat-script-with-bash-on-linux?highlight=netcat+chat
#
# Usage: ./Recieve.sh
#
# Setup Connection!
port="776"
#
#
sudo ballbags # this is just to get sudo for future commands that may require sudo!
echo -en "\e[92m "
clear
echo "Waiting For New Message"
sudo nc -l -p "$port" > rmsge.txt
# Do Decryption / Replacements Here!!!
#value='cat rmsg.txt'
value=$(cat rmsge.txt | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]')
#
echo $value > rmsg.txt
#
#
#echo "All Done!"
#echo -en"\e[94m \c"
clear
cat rmsg.txt
espeak -v en -f rmsg.txt -g 01ms -a 110 -p 58 -s 175
#
echo -en "\e[70m \c"
#
# echo "Continue [ENTER]:"
# read input123
sleep 5
#
# Loop
bash Recieve.sh
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum