Created
June 17, 2016 05:52
-
-
Save masaki925/f5e2fcc16ad4db4236daa9430f101d13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "net/http" | |
require "uri" | |
proxy_addr = "localhost" | |
proxy_port = 3128 | |
uri = URI.parse "http://www.ugtop.com/spill.shtml" | |
Net::HTTP.new(uri.host, uri.port, proxy_addr, proxy_port).start do |http| | |
request = Net::HTTP::Get.new(uri.request_uri) | |
response = http.request(request) | |
puts response.body.scan(/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment