[tor-bugs] #8728 [Stem]: Expand tutorial to include exit scanning

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri May 24 22:38:11 UTC 2013


#8728: Expand tutorial to include exit scanning
-------------------------+--------------------------------------------------
 Reporter:  atagar       |          Owner:  atagar        
     Type:  enhancement  |         Status:  needs_revision
 Priority:  normal       |      Milestone:                
Component:  Stem         |        Version:                
 Keywords:  website      |         Parent:                
   Points:               |   Actualpoints:                
-------------------------+--------------------------------------------------

Comment(by ragwater):

 Hey, thanks for the feedback!

 >Dropping this from later examples simplifies the scripts and makes them
 more focused on just what we're trying to show.

 Should the info text showcasing the stream events go as well?
 I mean...

 {{{
 Checking exit node ididnteditheconfig6 (128.8.24.14)
 Assigned to circuit 7:
 0 ('C2F9D30118BEBF3EFEE6D96252374082CA73C054', 'st0nerhenge') 83.170.92.9
 1 ('4F8D80A0F768A2A29856A8F26B05D35DEAA39850', 'wannabe') 96.47.226.19
 2 ('594D6B7B1DEE6B23476C7378D0D26F2DB61251A5', 'HackThisSite')
 198.148.81.167
 3 ('001F9D6558A2CA6204A53B5BC7EF5C5F9637DA2D', 'ididnteditheconfig6')
 128.8.24.14
 | Stream 10 is being assigned to circuit 7
 | Stream 10 assigned to circuit 7
  \Status: SENTCONNECT, destination: 173.194.113.66
 | Stream 10 assigned to circuit 7
  \Status: REMAP, destination: 173.194.113.66
 | Stream 10 assigned to circuit 7
  \Status: SUCCEEDED, destination: 173.194.113.66
 }}}


 >One gotcha though - there doesn't appear to be any Russian exits.

 That actually got me worried a bit, because I was definitely exiting
 through Russian nodes in my testing.

 Turns out exit_policy.can_exit_to() responds in an interesting manner when
 only the port parameter is provided, and when I run your script against
 the US locale, it returned ~10 exit nodes, none of them being really
 usable as far as I can tell (e.g.
 https://atlas.torproject.org/#details/810962DC3C058C757070420E9A9497532BB8185A
 or
 https://atlas.torproject.org/#details/315D5684D5343580D409F16119F78D776A58AEFB).

 Anyhow passing
 {{{strict = True}}}
 along (or specifying the address) with desired port solves the issue and
 gives us a healthy number of exit nodes.

 {{{
   from stem import StreamStatus
 }}}
 I have no idea how I've managed to miss it, thanks for the catch.


 I'm yet unsure how to get the cert checking in urllib with socks but I
 should figure it out in a few days' time and deliver the code,
 pep8-approved this time around ;).

 Thanks,
 Tom

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8728#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list