1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2025-04-20 09:40:00 -05:00

Compare commits

..

No commits in common. "9437266fb2b0af7e17e81be87f943fe0294cbd46" and "d486b3a614549f6717e78e4565a8ebc0509c8bb4" have entirely different histories.

2 changed files with 0 additions and 21 deletions

View file

@ -1,21 +0,0 @@
#!/bin/env bash
# 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
# Get the DNS resolver provided by the network
DNS=$(nmcli -f IP4.DNS dev show wlan0 | awk '{print $2}')
# Temporarily put the DNS resolver in place
echo "Need sudo permission to work with /etc/resolv.conf"
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."
read -p "Press enter to continue..."
# Put back own resolvers
sudo mv /etc/resolv.conf.bk /etc/resolv.conf

0
update-aur-lure.sh Normal file → Executable file
View file