Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import socket
- import struct
- import sys
- #value = 191041708
- def to_ipaddr(value):
- packed = socket.ntohl(value)
- x = struct.pack('!I', packed)
- return socket.inet_ntoa(x)
- if __name__ == '__main__':
- value = int(sys.argv[1])
- print(to_ipaddr(value))
Add Comment
Please, Sign In to add comment