Skip to content

Instantly share code, notes, and snippets.

@kurrik
Created June 1, 2012 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurrik/2855691 to your computer and use it in GitHub Desktop.
Save kurrik/2855691 to your computer and use it in GitHub Desktop.
Proxy HTTPS requests through http://localhost:8080
#!/bin/bash
# From http://en.wikipedia.org/wiki/Netcat
# Proxy HTTPS requests through http://localhost:8080
# That way, Wireshark can sniff the traffic.
# Example usage:
# ./proxy.sh www.twitter.com
mkfifo tmp
mkfifo tmp2
nc -k -l 8080 > tmp < tmp2 &
echo "Serving: $1"
while [ 1 ]
do
openssl s_client -connect $1:443 < tmp > tmp2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment