Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/bin/sh
- echo "#####################"
- echo "# SSH VPN PING TOOL #"
- echo "# By : L3n4r0x #"
- echo "# Version: 1.0b. #"
- echo "#####################"
- echo
- echo "*** Persyaratan ***"
- echo "Primary: Koneksi Internet Terhubung"
- echo "1. Busybox Sudah Terinstall"
- echo "2. cURL binary sudah terinstall."
- echo " Bila tidak terinstall maka"
- echo " akan otomatis menginstall cURL di Device Anda."
- echo " NOTE: INTERNET CONNECTION Required"
- echo
- echo "Masukkan domain tujuan yang akan di ping (misal google.me):"
- read h
- clear
- if [ -e /system/xbin/curl ]; then
- echo "Masukkan Tiap Berapa detik ping Berjalan (angka):"
- echo "recommended: 1"
- echo "masukkan angkanya:"
- read sx
- echo "Masukkan Berapa Kali Ping Berjalan:"
- echo " Misal 1000, maka ping akan berjalan 1000 kali"
- echo "Masukkan AngkaNya:"
- read tx
- clear
- echo "Host: $h"
- echo "Ping $sx/seconds"
- echo "Ping $tx time"
- echo "Pinging $h...."
- echo
- count=0
- total="$tx"
- start=`date +%s`
- while [ $count -lt $total ]; do
- sleep $sx # this is work
- cur=`date +%s`
- count=$(( $count + 1 ))
- pd=$(( $count * 73 / $total ))
- runtime=$(( $cur-$start ))
- estremain=$(( ($runtime * $total / $count)-$runtime ))
- printf "\r%d.%d%% complete ($count of $total) - est %d:%0.2d remaining\e[K" $(( $count*100/$total )) $(( ($count*1000/$total)%10)) $(( $estremain/60 )) $(( $estremain%60 ))
- done
- printf "\ndone\n"
- echo "pinging $h done..."
- for i in `seq $sx $tx`; do curl -s http://$h > /dev/null; done
- else
- if [ -e /system/bin/curl ]; then
- echo "ALL Files Is OK!"
- echo
- clear
- echo "This is a ping tool program."
- echo "by L3n4r0x"
- echo
- echo "Masukkan Tiap Berapa detik ping Berjalan (angka):"
- echo "recommended: 1"
- echo "masukkan angkanya:"
- read ss
- echo "Masukkan Berapa Kali Ping Berjalan:"
- echo " Misal 1000, maka ping akan berjalan 1000 kali"
- echo "Masukkan AngkaNya:"
- read ts
- clear
- echo "Host: $h"
- echo "Ping $ss/seconds"
- echo "Ping $ts time"
- echo "Pinging $h...."
- echo
- count=0
- total="$ts"
- start=`date +%s`
- while [ $count -lt $total ]; do
- sleep $ss # this is work
- cur=`date +%s`
- count=$(( $count + 1 ))
- pd=$(( $count * 73 / $total ))
- runtime=$(( $cur-$start ))
- estremain=$(( ($runtime * $total / $count)-$runtime ))
- printf "\r%d.%d%% complete ($count of $total) - est %d:%0.2d remaining\e[K" $(( $count*100/$total )) $(( ($count*1000/$total)%10)) $(( $estremain/60 )) $(( $estremain%60 ))
- done
- printf "\ndone\n"
- echo "pinging $h done..."
- for i in `seq $ss $ts`; do curl -s http://$h > /dev/null; done
- else
- if [ -e /data/local/bin/curl ]; then
- echo "This is a ping tool program."
- echo "by L3n4r0x"
- echo
- echo "Masukkan Tiap Berapa detik ping Berjalan (angka):"
- echo "recommended: 1"
- echo "Masukkan Angkanya:"
- read sl
- echo "Masukkan Berapa Kali Ping Berjalan:"
- echo " Misal 1000, maka ping akan berjalan 1000 kali"
- echo "Masukkan angkanya:"
- read tl
- clear
- echo "Host: $h"
- echo "Ping $sl/seconds"
- echo "Ping $tl time"
- echo "Pinging $h...."
- echo
- count=0
- total="$tl"
- start=`date +%s`
- while [ $count -lt $total ]; do
- sleep $sl # this is work
- cur=`date +%s`
- count=$(( $count + 1 ))
- pd=$(( $count * 73 / $total ))
- runtime=$(( $cur-$start ))
- estremain=$(( ($runtime * $total / $count)-$runtime ))
- printf "\r%d.%d%% complete ($count of $total) - est %d:%0.2d remaining\e[K" $(( $count*100/$total )) $(( ($count*1000/$total)%10)) $(( $estremain/60 )) $(( $estremain%60 ))
- done
- printf "\ndone\n"
- echo "pinging $h done..."
- for i in `seq $sl $tl`; do ./data/local/bin/curl -s http://$h > /dev/null ; done
- echo "Ping $h Stopped..."
- else
- echo "cURL Binary Not Found, checking requirement..."
- sleep 1
- echo "Mounting Data.."
- mount -o remount,rw rootfs /
- mount -o rw,remount rootfs
- mount -o rw,remount /data
- mount -o remount,rw /data
- sleep 1
- echo "installing files..."
- echo
- cd /
- wget -O http://dimas.nh-zone.nu/data.zip
- unzip data.zip
- chmod 755 /data/local/bin/*
- chmod 755 /data/local/ssl/*
- echo
- echo "ALL Requirement Have Installed."
- echo
- echo "This is a ping tool program."
- echo "by L3n4r0x"
- echo
- echo "Masukkan Tiap Berapa detik ping Berjalan (angka):"
- echo "recommended: 1"
- echo "Masukkan Angkanya:"
- read sn
- echo "Masukkan Berapa Kali Ping Berjalan:"
- echo " Misal 1000, maka ping akan berjalan 1000 kali"
- echo "Masukkan angkanya:"
- read tn
- echo "Congratulations: Ping Is Running..."
- echo
- clear
- echo "Host: $h"
- echo "Ping $sn/seconds"
- echo "Ping $tn time"
- echo "Pinging $h...."
- echo
- count=0
- total="$tn"
- start=`date +%s`
- while [ $count -lt $total ]; do
- sleep $sn # this is work
- cur=`date +%s`
- count=$(( $count + 1 ))
- pd=$(( $count * 73 / $total ))
- runtime=$(( $cur-$start ))
- estremain=$(( ($runtime * $total / $count)-$runtime ))
- printf "\r%d.%d%% complete ($count of $total) - est %d:%0.2d remaining\e[K" $(( $count*100/$total )) $(( ($count*1000/$total)%10)) $(( $estremain/60 )) $(( $estremain%60 ))
- done
- printf "\ndone\n"
- for i in `seq $sn $tn`; do ./data/local/bin/curl -s http://$h > /dev/null ; done
- echo "Ping $h stopped..."
- fi
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment