简体   繁体   English

通过Tor的Python urllib2匿名

[英]Python urllib2 anonymity through tor

I have been trying to use SocksiPy ( http://socksipy.sourceforge.net/ ) and set my sockets with SOCKS5 and set it to go through a local tor service that I am running on my box. 我一直在尝试使用SocksiPy( http://socksipy.sourceforge.net/ )并使用SOCKS5设置套接字,并将其设置为通过我在盒子上运行的本地Tor服务。

I have the following: 我有以下几点:

socks.setdefausocks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "localhost", 9050, True)
socket.socket = socks.socksocket

import urllib2

And I am doing something similar to: 我正在做类似的事情:

workItem = "http://192.168.1.1/some/stuff" #obviously not the real url
req = urllib2.Request(workItem)
req.add_header('User-agent', 'Mozilla 5.10')
res = urllib2.urlopen(req, timeout=60)

And even using this I have been identified by the website, my understanding was that I would be coming out of a random end point every time and it wouldn't be able to identify me. 即使使用此方法,我也已经在网站上找到了我,但我的理解是,每次我都会走出一个随机的终点,并且无法识别我。 And I can confirm if I hit whatsmyip.org with this that my end point is different every time. 而且我可以确认是否每次都打入whatsmyip.org时我的终点都不同。 Is there some other steps I have to take to keep anonymous? 我还必须采取其他步骤来保持匿名吗? I am using an IP address in the url so it shouldn't be doing any DNS resolution that might give it away. 我在网址中使用的是IP地址,因此它不应执行任何可能会泄露它的DNS解析。

There is no such User-Agent 'Mozilla 5.10' in reality. 实际上,没有这样的User-Agent'Mozilla 5.10'。 If the server employs even the simplest fingerprinting based on the User-Agent it will identity you based on this uncommon setting. 如果服务器甚至使用了基于User-Agent的最简单的指纹识别,它也会基于此不常见的设置来识别您的身份。

And I don't think you understand TOR: it does not provide full anonymity. 而且我认为您不了解TOR:它不提供完全的匿名性。 It only helps by providing anonymity by hiding you real IP address. 仅通过隐藏您的真实IP地址来提供匿名性,这才有帮助。 But it does not help if you give your real name on a web site or use such easily detectable features like an uncommon user agent. 但是,如果您在网站上提供真实姓名或使用诸如不常见的用户代理之类的易于检测的功能,则无济于事。

You might have a look at the Design and Implementation Notes for the TOR browser bundle to see what kind of additional steps they take to be less detectable and where they still see open problems. 您可以查看TOR浏览器捆绑软件的《 设计和实施说明》 ,以了解它们采取了哪些其他步骤以使其难以被发现,以及在哪里仍然看到未解决的问题。 You might also read about Device Fingerprinting which is used to identity the seemingly anonymous peer. 您可能还会读到有关设备指纹识别的信息 ,该设备指纹用于识别看似匿名的对等方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM