Monday, March 26, 2012

Script to bind to slow routers by persistent requests to release DHCP information

This script is to persistently nag the router to release DHCP information. The script must be run as root. This is for slow routers or one which is overloaded with clients. Do not use for normal routers. Otherwise it could be misconstrued as a security threat.

persistent bind connection DHCP script

-------------------------

# script to persistently nag the router to release DHCP information : must be run as root
# persistent bind connection DHCP script
b=`expr 1`
while [ $b -lt 2 ]
do
echo "Starting new DHCPREQUEST .... after 5 secs ... "
sleep 5
/etc/init.d/networking restart
echo -e "\n xxxxxxxxxxxxxxxxxxxx \n `tail -n 20 /var/log/syslog` \n xxxxxxxxxxxxxxxxxxxx \n"
if [ "` tail -n 20 /var/log/syslog | grep "DHCPOFFER" | grep "of 192"`" ] ;
then
echo -e "\nExiting inf. loop .............\n"
b=`expr 3`
fi
done

No comments:

OK GOOGLE on Samsung Galaxy S7 doesn’t work

To make Ok Google detection work on Galaxy S7 (Galaxy series phones) we need to perform a couple of steps. 1. As long as Samsung S vo...