# spys.ru/en/socks-proxy-list/
#this tool will gather about 175 fresh socks5 proxy servers and write them to your proxychains config file
#this script will delete your current config, just a warning
# look at the bottem of this script for the proxychains config
#looks ugly but it works, takes a few minutes to complete, i dont feel like fixing this
#sudo ruby socks5_gather.rb (must use sudo to write to the config)
require 'socket'
response_buf=""
file = File.open("/etc/proxychains.conf", "w")
for i in 0..5
if i==0
s=TCPSocket.new("spys.ru",80)
s.print("
GET /en/socks-proxy-list/ HTTP/1.1
Host: spys.ru
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Referer: http://spys.ru/en/socks-proxy-list/3/
Cookie: __utma=74835280.648937846.1329030876.1330398972.1330401161.20; __utmz=74835280.1329890931.9.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __utmc=74835280; __utmb=74835280.6.10.1330401161
")
while line=s.gets
response_buf<<line
end
puts response_buf.length
else
s=TCPSocket.new("spys.ru",80)
s.print("
GET /en/socks-proxy-list/#{i}/ HTTP/1.1
Host: spys.ruhttp://gethub.com/
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Referer: http://spys.ru/en/socks-proxy-list/3/
Cookie: __utma=74835280.648937846.1329030876.1330398972.1330401161.20; __utmz=74835280.1329890931.9.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __utmc=74835280; __utmb=74835280.6.10.1330401161
")
while line=s.gets
response_buf<<line
end
puts response_buf.length
end
end
#establish vars for ports sypher=response_buf.scan(/<\/script><\/td><\/tr><\/table><script type=\"text\/javascript\">.*.<\/script>/)
for i in response_buf.scan(/<\/script><\/td><\/tr><\/table><script type=\"text\/javascript\">.*.<\/script>/).to_s.gsub('</script></td></tr></table><script type="text/javascript">',"\n").gsub("</script>","\n").gsub(";"," ").split
if i.include?("^")
eval(i[0..7])
end
end
list=response_buf.gsub("</script></font></td>"," xxx\n\n").gsub('<script type="text/javascript">document.write("<font class=spy2>:<\/font>"'," ").gsub('</font> <font class=spy14>',"xyxy").gsub("+(","").gsub(/\^....\)/," ").scan(/xyxy.*.xxx/).to_s.gsub(" ) xxx","\n").gsub("xyxy","")
response_buf=""
socks5=""
for i in list.map
for x in i.split
if x.include?(".")
socks5<<"\nsocks5 #{x} "
else
socks5<<eval(x).to_s
end
end
end
#socks5 now holds the list ready to write /etc/proxychains.conf
#this is your options for the config file... depending on the job, you may need to modify time out options etc... !!!
file.print("random_chain
chain_len = 1
#quiet_mode
proxy_dns
tcp_read_time_out 5000
tcp_connect_time_out 1500
[ProxyList]
#{socks5}")
file.close