Created
June 1, 2022 09:03
-
-
Save GitHub30/98f2c17c134839e33767887ec936881d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tee /etc/NetworkManager/dispatcher.d/99-portal <<'EOT' | |
#!/bin/bash | |
[ "$CONNECTIVITY_STATE" = "PORTAL" ] || exit 0 | |
wget --save-cookies cookies.txt -O- https://service.wi2.ne.jp/wi2auth/redirect >> portal.log | |
grep service.wi2.ne.jp cookies.txt && wget --load-cookies cookies.txt -O- https://service.wi2.ne.jp/wi2auth/xhr/login --post-data '{"login_method":"onetap","login_params":{"agree":"1"}}' >> portal.log | |
EOT | |
sudo chmod +x /etc/NetworkManager/dispatcher.d/99-portal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment