#!/bin/env python #coding: utf-8 import socket import struct def ip2int( ip ): return struct.unpack('!L',socket.inet_aton(ip))[0]
本文转自 拖鞋崽 51CTO博客,原文链接:http://blog.51cto.com/1992mrwang/1184905
2023-11-02 12:45:28
#!/bin/env python #coding: utf-8 import socket import struct def ip2int( ip ): return struct.unpack('!L',socket.inet_aton(ip))[0]