HEX
Server: Apache
System: Linux fan.fanlow.com 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64
User: ssiacademy (1163)
PHP: 8.2.32
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/postupcp/run_arping
#!/bin/bash
# Performs arping to gateway from all IP's

source /etc/profile

gateway="$(route -n|awk '$4 == "UG" {print$2}')"
log="/opt/postupcp/run_arping.log"
echo "----$(date)----" >> $log

do_arping() {
sleeptime=$(( ( $RANDOM % 300 ) + 1 ))
echo "Sleeping for $sleeptime seconds" >> $log
sleep $sleeptime
for ip in $(ip -f inet a | awk -F'[ /]' '/inet.*global/ {print $6}');do
    arping -c 1 -w 1 -s $ip $gateway >> $log
done
}

do_arping