Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- echo "script started"
- #sleep 5
- #echo "1: " $1
- #echo "2: " $2
- IFACE="wlp5s0"
- NETNAME="Braude-Guest"
- #SSID2=$(/sbin/iwconfig $IFACE | grep ESSID | cut -d: -f3 | sed 's/"//g')
- #echo "3: " $SSID2
- #echo "4: "$SSID
- #echo $1
- #echo $IFACE
- if [ "x$1" = "x$IFACE" ] && [ "$2" = "up" ]; then
- echo "here"
- SSID=$(/sbin/iwconfig $IFACE | grep ESSID | cut -d: -f2 | sed 's/"//g' | tr -d ' ')
- #echo $SSID
- #SSID=$(/sbin/iwconfig $IFACE | grep ESSID | cut -d: -f3 | sed 's/"//g')
- echo $SSID
- #echo "SSID:"$SSID
- case "$SSID" in
- "Braude-Guest")
- URL='http://wireless.hp.internal:8080/transport.asp'
- DATA='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
- COOKIE='Cookie: JSESSIONID=uc54121j305s; cookies=true'
- REFERER='http://wireless.hp.internal:8080/index.asp'
- echo "script is running"
- 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"
- ;;
- esac
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement