-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsend.sh
More file actions
44 lines (42 loc) · 1.02 KB
/
send.sh
File metadata and controls
44 lines (42 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# (c) J~NET 2021
# jnet.sytes.net
#
# https://jnet.forumotion.com/t1729-jnet-multi-tool-2021#2677
# https://jnet.forumotion.com/t1744-secure-chat-bash-app#2702
#
host_ip=`cat config/remote_host.txt`
port=`cat config/port.txt`
while true;
do
#
input="$@"
if [ -z "$*" ]; then
echo "Enter Text To Send: "
read input;
fi
#
echo $input > config/msg.txt
#zip -8 -r -q $input uploads/file.zip
clear
echo "Binary Server AKA SENDER"
clear
echo -en "\e[92mPress Ctrl + C To Confirm Sending New Secure Message! $input \c"
sleep 0.2
cat config/msg.txt | nc $host_ip $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..."
sleep 5
#exit
# sh send.sh
done
trap "sh send.sh; exit;" SIGINT SIGTERM;
sh send.sh