This file contains hidden or 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
def get_ip(hostname) | |
dns = Resolv.new | |
redis = Redis.new # storing in redis | |
ip = redis.get("ip:#{hostname}") | |
return ip unless ip.nil? | |
begin | |
resource = dns.getresource(hostname, Resolv::DNS::Resource::IN::A) | |
rescue Resolv::ResolvError | |
return false | |
end |
This file contains hidden or 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
Received: from mail-qt1-f169.google.com (unknown [209.85.160.169])\tby relay-3.us-west-2.relay-prod (Postfix) with ESMTPS id AD07B20983\tfor <[email protected]>; Sat, 03 Apr 2021 18:30:25 +0000\r\nReceived: by mail-qt1-f169.google.com with SMTP id i19so5801578qtv.7 for <[email protected]>; Sat, 03 Apr 2021 11:30:25 -0700\r\nReceived: from bills-macbookpro.localdomain (cpe-66-108-12-213.nyc.res.rr.com. [66.108.12.213]) by smtp.gmail.com with ESMTPSA id x14sm9745469qkx.112.2021.04.03.11.30.23 for <[email protected]> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Apr 2021 11:30:24 -0700\r\nDate: Sat, 03 Apr 2021 14:30:27 -0400\r\nFrom: Bill Cromie <[email protected]>\r\nTo: [email protected]\r\nMessage-ID: <[email protected]>\r\nMime-Version: 1.0\r\nContent-Type: multipart/alternative;\r\n boundary=\"Apple-Mail=_2E848F61-C9CF-4F12-86DF-43037582E1F8\"\r\nContent-Transfer-Encoding: 7bit\r\nDKIM-Sign |
OlderNewer