Created
May 18, 2013 08:00
-
-
Save maceip/5603657 to your computer and use it in GitHub Desktop.
test if company is using certain cloud services. uses first argument as company name to query
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 'open-uri' | |
open("https://#{ARGV[0]}.box.com/", 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36').read =~ /<title>(.*?)<\/title>/ | |
box = $1 | |
open("https://#{ARGV[0]}.okta.com/", 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36').read =~ /<title>(.*?)<\/title>/ | |
okta = $1 | |
printf("BOX: %s, OKTA %s\n", box.chars.first.eql?("C") ? "true" : "false", !okta.chars.first.eql?(" ") ? "true" : "false") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment