Skip to content

Instantly share code, notes, and snippets.

/adfa.rb Secret

Created December 4, 2015 21:33
Show Gist options
  • Save anonymous/4beab96259b7fcd9455f to your computer and use it in GitHub Desktop.
Save anonymous/4beab96259b7fcd9455f to your computer and use it in GitHub Desktop.
sleep(30)
require 'socket'
require 'net/http'
addr_infos = Socket.ip_address_list
api_key = '***'
ip_addresses = ''
addr_infos.each { |addr_info|
ip = addr_info.ip_address
if(ip != '127.0.0.1') then
ip_addresses += ip + ' '
end
}
uri = URI('http://url.com')
res = Net::HTTP.post_form(uri, 'api_key' => api_key, 'subject' => 'IP: ' + ip_addresses, 'to' => 'user@email.tld', 'html' => ip_addresses);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment