Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- # Ruby version of @adriendb's Python home directory enumeration script
- require "net/http"
- require "uri"
- File.open(ARGV[0], "r").each do |lastname|
- lastname.chop!
- "a".upto("z") do |initial|
- url = "http://www.sec542.org/~" + initial + lastname +"/"
- uri = URI.parse(url)
- # Full
- http = Net::HTTP.new(uri.host, uri.port)
- response = http.request(Net::HTTP::Get.new(uri.request_uri))
- if response.code == "200"
- puts "Hit on: " + url
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement