MCPcopy Create free account
hub / github.com/qiyeboy/IPProxyPool / ip2str

Method ip2str

util/IPAddress.py:133–134  ·  view source on GitHub ↗
(self, ip)

Source from the content-addressed store, hash-verified

131 return str.decode('gbk')
132
133 def ip2str(self, ip):
134 return str(ip >> 24) + '.' + str((ip >> 16) & 0xff) + '.' + str((ip >> 8) & 0xff) + '.' + str(ip & 0xff)
135
136 def str2ip(self, s):
137 (ip,) = struct.unpack('I', socket.inet_aton(s))

Callers 2

dumpMethod · 0.95
getIpRangeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected