Skip to content

check for Captive Portal #9

Description

@mummifiedclown

Fantastic script that is saving me days of work! Just a quick suggestion/share; we have a lot of remote users - teachers and students that often have to use business or library WiFi networks - so I'm adding a quick test for the current SSID. Inserting in the setPrivateAddressModebySSID() function right after the skip if SSID never joined bit:

	#check if current SSID is a captive portal and if so dump out; we want people to be able to have extra protection on public networks
	if [[ "${/usr/libexec/PlistBuddy -c "print :wifi.network.ssid.'${ssid}':CaptiveProfile:CaptiveNetwork" "${plistPath}" 2>/dev/null}" == "true" ]]; then
		jamflog "[INFO] SSID: ${ssid} is captive portal, skipping"
		return 1
	fi

Still need to test but I think it will work - if you have a better suggestion of where to stick this or a better implementation I'm all ears.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions