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

Method getString

util/IPAddress.py:121–131  ·  view source on GitHub ↗
(self, offset=0)

Source from the content-addressed store, hash-verified

119 return range
120
121 def getString(self, offset=0):
122 if offset:
123 self.ipdb.seek(offset)
124 str = b''
125 ch = self.ipdb.read(1)
126 (byte,) = struct.unpack('B', ch)
127 while byte != 0:
128 str += ch
129 ch = self.ipdb.read(1)
130 (byte,) = struct.unpack('B', ch)
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)

Callers 2

getAreaAddrMethod · 0.95
getAddrMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected