Skip to content

Instantly share code, notes, and snippets.

@mak3r
Created November 17, 2024 18:48
Show Gist options
  • Select an option

  • Save mak3r/f751632d06d2eb1ba2a34fb7df6a2192 to your computer and use it in GitHub Desktop.

Select an option

Save mak3r/f751632d06d2eb1ba2a34fb7df6a2192 to your computer and use it in GitHub Desktop.
Open a captive portal on linux. Captive portals tend to be used for Hotels and on Airplanes. Find the SSID and select it. In other OS, it automatically opens the browser or a window to login. In linux you must run this script to open the captive portal in the browser.
#!/bin/sh
# Open the captive portal of the current wifi
xdg-open http://$(ip --oneline route get 1.1.1.1 | awk '{print $3}') &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment