diff --git a/captive-portal-login.sh b/bypass-captive-portal.sh similarity index 85% rename from captive-portal-login.sh rename to bypass-captive-portal.sh index 2174f64..2883cc1 100644 --- a/captive-portal-login.sh +++ b/bypass-captive-portal.sh @@ -3,6 +3,8 @@ # This script allows one to log into captive portals by temporarily using the provided DNS records. Otherwise, captive portals # don't work with custom resolvconf setups +set -e + # Get the DNS resolver provided by the network DNS=$(nmcli -f IP4.DNS dev show wlan0 | awk '{print $2}' | head -1) @@ -12,7 +14,8 @@ sudo cp /etc/resolv.conf /etc/resolv.conf.bk echo "# Temporary resolv.conf generated by captive-portal-login.sh" | sudo tee /etc/resolv.conf echo "nameserver $DNS" | sudo tee -a /etc/resolv.conf -echo "Put temporary DNS resolver in place. Now try opening an website, and fix the captive portal before continuing." +echo "Put temporary DNS resolver in place. Fix the captive portal before continuing." +xdg-open 1.1.1.1 read -p "Press enter to continue..."