Created
August 28, 2012 22:05
-
-
Save jcromartie/3504745 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # code: | |
| # set up the webhook and wait for a connection | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
| print "binding on host", webhook_host, "port", webhook_port | |
| s.bind((webhook_host, webhook_port)) | |
| print "listening" | |
| s.listen(1) | |
| print "accepting connections" | |
| conn, (addr, port) = s.accept() | |
| # output like: | |
| # binding on host level02-3.stripe-ctf.com port 9894 | |
| # listening | |
| # accepting connections |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment