Skip to content

Instantly share code, notes, and snippets.

@realytcracker
Created May 24, 2019 05:55
Show Gist options
  • Save realytcracker/dc10b3343c0a56fae54aed51bfab12dc to your computer and use it in GitHub Desktop.
Save realytcracker/dc10b3343c0a56fae54aed51bfab12dc to your computer and use it in GitHub Desktop.
quickly turn burp passthrough on or off on osx wi-fi from ye olde shell
#!/bin/bash
# quickly turn burp passthrough on or off on osx wi-fi from ye olde shell
# usage: sudo ./burp_wifi.sh [on | off]
# feel free to edit to taste / make $2 carry the adapter, etc.
# ytcracker loves you
if [ $EUID -ne 0 ]; then
echo "this script must be run as root."
exit 1
fi
if [ "$1" == "on" ]; then
networksetup -setsecurewebproxy "Wi-Fi" 127.0.0.1 8080
networksetup -setwebproxy "Wi-Fi" 127.0.0.1 8080
echo "burp proxy is enabled on wifi."
elif [ "$1" == "off" ]; then
networksetup -setsecurewebproxystate "Wi-Fi" off
networksetup -setwebproxystate "Wi-Fi" off
echo "burp proxy is disabled on wifi."
else
echo "usage: sudo $0 [on | off]"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment