mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
forgot to commit the exit geography demo a while ago
This commit is contained in:
parent
4f7e9ee3b9
commit
592663c77f
1 changed files with 15 additions and 0 deletions
15
server-ca/sni_challenge/exit.py
Normal file
15
server-ca/sni_challenge/exit.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import exit_geography, random, socks
|
||||
|
||||
# This file is currently unused. It demonstrates how to make a
|
||||
# connection using exit_geography and a Tor exit node in a chosen
|
||||
# country. This can be used to implement multipath probing to
|
||||
# perform SNI challenges from the vantage point of specified
|
||||
# countries.
|
||||
|
||||
node = random.choice(exit_geography.by_country["DE"])
|
||||
socksocket = socks.socksocket()
|
||||
socksocket.setproxy(socks.PROXY_TYPE_SOCKS4, "localhost", 9050)
|
||||
print node
|
||||
socksocket.connect(("theobroma.info.%s.exit" % node, 80))
|
||||
Loading…
Reference in a new issue