Advertisement
opexxx

wifi.sh

Jul 9th, 2014
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function acceptConditions {
  4. curl -X POST --data "buttonClicked=4&redirect_url=&err_flag=0" -k https://1.1.1.1/login.html
  5. }
  6.  
  7. function doIteration {
  8. networksetup -setairportpower en0 off
  9. networksetup -setairportpower en0 on
  10. acceptConditions
  11.  
  12. if [ $? -ne 0 ]; then
  13. sleep 30
  14. acceptConditions
  15. fi
  16. }
  17.  
  18. for i in {1..50}
  19. do
  20.    echo "Do it: $i"
  21.    doIteration
  22.    echo "Wait: $i"
  23.    sleep 1500
  24. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement