-
-
Save karuna/9295e8cf7aa46d9f6409c68f37fe584d 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