Sent to you by l5g via Google Reader:
via 幺贰和叁 by oCameLo on 7/11/10
不多说,直接看代码吧,虽然我觉得用得上这个脚本的地方都很无聊。require 'net/telnet'
require 'net/http'
require 'uri'
require 'time'
def torNewIP()
tor_addr = '127.0.0.1'
tor_ctrl = 9051
host = Net::Telnet.new(
'Host' => tor_addr,
'Port' => tor_ctrl,
'Prompt' => /\n/n)
r = host.cmd('AUTHENTICATE')
return false if r != "250 OK\n"
r = host.cmd('signal NEWNYM')
return false if r != "250 OK\n"
Things you can do from here:
- Subscribe to 幺贰和叁 using Google Reader
- Get started using Google Reader to easily keep up with all your favorite sites
No comments:
Post a Comment