Skip to content

Instantly share code, notes, and snippets.

@gordonbisnor
Last active April 14, 2018 01:15
Show Gist options
  • Save gordonbisnor/f4845306b14dbd1d10f7abbb7872dc11 to your computer and use it in GitHub Desktop.
Save gordonbisnor/f4845306b14dbd1d10f7abbb7872dc11 to your computer and use it in GitHub Desktop.
Example script that couldhave "hacked" the FOIPOP site
require 'httparty'
(1010..1012).to_a.each do |id|
response = HTTParty.get("https://www.residentadvisor.net/news.aspx?id=#{id}")
File.open("#{id}.html", 'w') {|f| f.write(response.body) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment