Last active
August 29, 2015 14:23
-
-
Save antitree/768e1beb1f2d7d9ee9eb to your computer and use it in GitHub Desktop.
Simple example of a Tor script that leaks DNS
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
import requesocks | |
import BeautifulSoup as bs | |
base_url = 'http://treebind.antitree.com:8000' | |
test_url = base_url + '/test' | |
session = requesocks.session() | |
session.proxies = {'http': 'socks5://127.0.0.1:9050'} | |
print("Getting: %s" % test_url) | |
r = session.get(test_url) | |
s = bs.BeautifulSoup(r.text) | |
#result=s.find("meta",attrs={"http-equiv":"refresh"}) | |
results_url = (s('p')[1].a.get('href')) | |
print("Getting: %s" % results_url) | |
r = session.get(results_url) | |
s = bs.BeautifulSoup(r.text) | |
print("#" * 30) | |
print("Results:") | |
print("#" * 30) | |
for p in (s('p')): | |
print(p.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment