(self, s)
| 133 | return str(ip >> 24) + '.' + str((ip >> 16) & 0xff) + '.' + str((ip >> 8) & 0xff) + '.' + str(ip & 0xff) |
| 134 | |
| 135 | def str2ip(self, s): |
| 136 | (ip,) = struct.unpack('I', socket.inet_aton(s)) |
| 137 | return ((ip >> 24) & 0xff) | ((ip & 0xff) << 24) | ((ip >> 8) & 0xff00) | ((ip & 0xff00) << 8) |
| 138 | |
| 139 | def getLong3(self, offset=0): |
| 140 | if offset: |