Created
March 15, 2011 20:38
-
-
Save pahagon/871427 to your computer and use it in GitHub Desktop.
SOCAT
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
socat TCP4-LISTEN:9999,reuseaddr,fork,tcpwrap=script EXEC:"sh ./dummy_reply.sh" | |
socat TCP-LISTEN:80,bind=192.168.25.5,fork,reuseaddr,crlf SYSTEM: | |
socat openssl-listen:443,bind=192.168.25.5,fork,reuseaddr,verify=1,cert=/home/certs/sinkhole32.pem PIPE=echo "Media Center PC 6.0" | |
dummy_reply.sh: | |
#!/usr/bin/env bash | |
cat <<ENDL | |
HTTP/1.1 200 OK | |
Content-Length: 0 | |
Connection: closed | |
Content-Type: text/html | |
ENDL | |
cat >/tmp/request.$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment