Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
McDonalds WiFi KeepAlive script (not working)
USER_MAC=$(ifconfig en1 | grep ether | sed 's/.*ether //g' | awk -F: '{printf("%02s:%02s:%02s:%02s:%02s:%02s",$1,$2,$3,$4,$5,$6)}')
OUTLET_MAC=$(arp $(route get default | grep gateway | sed 's/ gateway: //g') | sed 's/.* at //g' | sed 's/ on.*//g' | awk -F: '{printf("%02s-%02s-%02s-%02s-%02s-%02s",$1,$2,$3,$4,$5,$6)}')
POST_DATA="'checky=1&user_mac=$USER_MAC&outlet_mac=$OUTLET_MAC'"
PHPSESSID=$(curl -I -G --max-redirs 0 http://login.d-synergy.com/mcdonalds-new/index.php --data $POST_DATA | grep PHPSESSID | sed 's/.*PHPSESSID=//g' | sed 's/.*PHPSESSID=//g' | sed 's/\;.*//g')
COOKIE="'Cookie: PHPSESSID=$PHPSESSID'"
POST_DATA="'checky=1&user_mac=$USER_MAC&outlet_mac=$OUTLET_MAC'"
echo $COOKIE
echo $POST_DATA
curl 'http://login.d-synergy.com/mcdonalds-new/check.php' -H $COOKIE -H 'Origin: http://login.d-synergy.com' -H 'Content-Type: application/x-www-form-urlencoded' --data $POST_DATA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.