Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'net/http'
- require 'open-uri'
- require 'nokogiri'
- class Proxycheck
- @@str_ip = []
- @@str_port = []
- @@int_count = 0
- @@int_lines = 0
- @@PageUrl = "https://www.google.com/"
- def read_proxies
- begin
- #Reads and checks the proxy list
- file = File.open("Proxy.txt", 'r')
- file.each_line do |line|
- line_split = line.split(':')
- @@str_ip << line_split[0]
- @@str_port << line_split[1]
- req = ::Net::HTTP.start(@@PageUrl,80,@@str_ip[@@int_count],@@str_port[@@int_count],nil,nil)
- @@int_count+=1
- end
- rescue Exception => e
- puts e.message
- puts e.backtrace.inspect
- end
- end
- end
- bot = Proxycheck.new
- bot.read_proxies
- sleep(100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement