Created
November 10, 2016 18:36
-
-
Save philippreston/b12d80601155bf6d690b823dc4ee447e to your computer and use it in GitHub Desktop.
Function for long to IP
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
@staticmethod | |
def decode_ip(raw): | |
ip = ["%d" % ((raw >> (24 - (i * 8))) & 0xFF) for i in range(0, 4)] | |
return '.'.join(ip) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment