Messeging With Netcat Script With Bash On Linux

Go down

Messeging With Netcat Script With Bash On Linux

Post by jamied_uk on 22nd July 2016, 16:42



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
avatar
jamied_uk
Admin

Posts : 2408
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Messeging With Netcat Script With Bash On Linux

Post by jamied_uk on 22nd July 2016, 18:12

Updated Files

app.box.com/s/pjcaiicqhp3jeluiedbddd4u424v6e8r
avatar
jamied_uk
Admin

Posts : 2408
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Messeging With Netcat Script With Bash On Linux

Post by jamied_uk on 22nd July 2016, 20:35

Check Out
jnet.forumotion.com/t1328-message-netcat-bash-part-3-auto-grabbing-menu#1853
avatar
jamied_uk
Admin

Posts : 2408
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Messeging With Netcat Script With Bash On Linux

Post by jamied_uk on 10th April 2018, 13:02

Voice Chat Upgrade



app.box.com/s/lptnaa5vj4vc6kzreskczkeewc1a9s23
avatar
jamied_uk
Admin

Posts : 2408
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Messeging With Netcat Script With Bash On Linux

Post by jamied_uk on 12th April 2018, 16:54

Encrypted (Rot 13 Version)


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
avatar
jamied_uk
Admin

Posts : 2408
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Messeging With Netcat Script With Bash On Linux

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum