-
Notifications
You must be signed in to change notification settings - Fork 0
/
file_rx.sh
27 lines (25 loc) · 735 Bytes
/
file_rx.sh
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
#!/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
port=777
clear
echo "J~Net File Reciever Port $port"
#echo "Enter Secure Password"
#read password
echo -en "\e[92mPlease Wait \c"
sudo nc -v -w 2 $host_ip -l -p $port > downloads/file.7z
count=0
total=34
pstr="[=======================================================================]"
while [ $count -lt $total ]; do
sleep 0.06 # 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 "All Done!"
bash view_file.sh
bash menu.sh