From af2baca9a9addfd7e990c70a3680c8fd3b01d062 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Fri, 6 Dec 2024 22:57:38 -0600 Subject: [PATCH] chg: Open portal page automatically and renamed --- captive-portal-login.sh => bypass-captive-portal.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename captive-portal-login.sh => bypass-captive-portal.sh (85%) 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..."