Created
May 2, 2014 03:58
-
-
Save mubix/47cd30e14c350c6ab7e2 to your computer and use it in GitHub Desktop.
Screenshotting w/ Selenium and Burp
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
#!/usr/bin/env ruby | |
require 'watir-webdriver' | |
def screenshot(url) | |
b = Watir::Browser.new | |
b.goto url | |
filename = url | |
if filename =~ /:\/\// | |
filename = filename.split('://')[1] | |
end | |
if filename =~ /\// | |
filename = filename.split('/')[0] | |
end | |
filename = filename + ".png" | |
b.screenshot.save filename | |
b.close | |
end | |
a = ['http://www.google.com/', 'letmeoutofyour.net', '178.79.164.226', 'https://www.gmail.com'] | |
a.each do |x| | |
screenshot(x) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment