7fa29c4345
The address is returned in the packed format so it's always a string of either length 0 (resolution failed), length 4 (IPv4) or length 16 (IPv6). Anything else is invalid and will actually cause Rex::Socket.addr_ntoa to throw an error. All meterpreters today return the IP address in one of those three correct lengths.