Skip to content

Instantly share code, notes, and snippets.

@mdellabitta
Created December 7, 2011 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdellabitta/1444504 to your computer and use it in GitHub Desktop.
Save mdellabitta/1444504 to your computer and use it in GitHub Desktop.
Fedora DOS Attack?
require 'csv'
CSV.open("list_of_pids.csv", "rb").each do |csv|
pid = csv[1]
["JP2", "THUMBNAIL", "WIDE_THUMBNAIL", "REFERENCE_THUMBNAIL"].each do |ds_id|
response = `curl --silent -I "http://example.org:8080/fedora/objects/#{pid}/datastreams/#{ds_id}/content" --user "fedoraAdmin:somepassword"`
puts "#{csv[0]},#{csv[1]},#{ds_id},#{response.lines.first}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment