Advertisement
Guest User

Untitled

a guest
May 12th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. echo "script started"
  4. #sleep 5
  5. #echo "1: " $1
  6. #echo "2: " $2
  7. IFACE="wlp5s0"
  8. NETNAME="Braude-Guest"
  9.  
  10. #SSID2=$(/sbin/iwconfig $IFACE | grep ESSID | cut -d: -f3 | sed 's/"//g')
  11. #echo "3: " $SSID2
  12. #echo "4: "$SSID
  13.  
  14. #echo $1
  15. #echo $IFACE
  16. if [ "x$1" = "x$IFACE" ] && [ "$2" = "up" ]; then
  17. echo "here"
  18. SSID=$(/sbin/iwconfig $IFACE | grep ESSID | cut -d: -f2 | sed 's/"//g' | tr -d ' ')
  19. #echo $SSID
  20. #SSID=$(/sbin/iwconfig $IFACE | grep ESSID | cut -d: -f3 | sed 's/"//g')
  21.  
  22. echo $SSID
  23. #echo "SSID:"$SSID
  24.  
  25. case "$SSID" in
  26. "Braude-Guest")
  27. URL='http://wireless.hp.internal:8080/transport.asp'
  28. DATA='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  29. COOKIE='Cookie: JSESSIONID=uc54121j305s; cookies=true'
  30. REFERER='http://wireless.hp.internal:8080/index.asp'
  31.  
  32. echo "script is running"
  33.  
  34. curl -d "error_url=%2Findex.asp&success_url=http%3A%2F%2Fwireless.hp.internal%3A8080%2Ftransport.asp&original_url=http%3A%2F%2Fwww.pcgamer.com%2F&subscription_url=https%3A%2F%2Fwireless.hp.internal%3A8090%2Fsubscribe.asp&valid_fields=access_type+username+password&access_type=login&username=guest&password=1&original_url=http%3A%2F%2Fwww.pcgamer.com%2F&login=Connect+%3E%3E" -H "http://wireless.hp.internal:8080/index.asp" "http://wireless.hp.internal:8080/goform/HtmlLoginRequest"
  35. ;;
  36. esac
  37. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement