Created
December 7, 2011 20:31
-
-
Save mdellabitta/1444504 to your computer and use it in GitHub Desktop.
Fedora DOS Attack?
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 '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