Created
June 1, 2012 23:11
-
-
Save kurrik/2855691 to your computer and use it in GitHub Desktop.
Proxy HTTPS requests through http://localhost:8080
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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