Linux IP checker test


SUBMITTED BY: Guest

DATE: Nov. 26, 2013, 7:21 p.m.

FORMAT: Text only

SIZE: 532 Bytes

HITS: 1207

  1. ip_old='/tmp/text.1/text'
  2. ip_new='/tmp/text.2/text'
  3. i=0
  4. while [$ != 1];
  5. do
  6. if [ -f $ip_old ];
  7. then
  8. read ip_test_old < ip_old
  9. wget -P/tmp/text.2/ http://wtfismyip.com/text
  10. read ip_test_oldd < ip_new
  11. if ["$ip_test_old" == "$ip_test_oldd"]
  12. then
  13. echo "Match!"
  14. else
  15. echo "IP CHANGE! IP Was changed to" $ip_test_oldd
  16. fi
  17. else
  18. echo "Welcome to the IP checker! N00b"
  19. wget -P/tmp/text.1/ http://wtfismyip.com/text
  20. fi
  21. sleep 3
  22. done

comments powered by Disqus