Skip to content

Instantly share code, notes, and snippets.

@nemanjan00 nemanjan00/intercept.sh
Last active Nov 11, 2018

Embed
What would you like to do?
# Route recieved IPv4 packages
sudo sysctl -w net.ipv4.ip_forward=1
# Forward packages from AP to mitmproxy
sudo iptables -t nat -A PREROUTING -i ap0 -p tcp --dport 443 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -i ap0 -p tcp --dport 80 -j REDIRECT --to-port 8080
# Forward packages from WiFi to mitmproxy
sudo iptables -t nat -A PREROUTING -i wlp2s0 -p tcp --dport 443 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -i wlp2s0 -p tcp --dport 80 -j REDIRECT --to-port 8080
# Start mitmproxy in transparent mode
mitmproxy --mode transparent --set showhost=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.