Created
August 21, 2012 10:59
-
-
Save rickychilcott/3414537 to your computer and use it in GitHub Desktop.
MunkiServer Debug
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_hostname(ip) | |
hostname = Socket.gethostbyaddr(ip.split(".").map(&:to_i).pack("CCCC")).first # Get hostname | |
logger.warn "Request IP: #{ip}" # Print IP input | |
logger.warn "Request Hostname: #{hostname}" # Print hostname output | |
"localhost" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment