Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created September 9, 2015 18:42
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 anonymous/e7d60c83c7336497a301 to your computer and use it in GitHub Desktop.
Save anonymous/e7d60c83c7336497a301 to your computer and use it in GitHub Desktop.
helpers do
def testssl(site)
date = `date +%Y%m%d%H%m%S`
file = "/tmp/data.#{date}"
dump = `cd /home/username/Ruby/ircbot; ./testssl.sh #{site} > #{file}`
text = `sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" #{file}`
rescue
"An error occurred."
else
"#{text}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment