Using the following code for whois lookups :
public static string LookUp(string ip, string whoisServer){
string buff = string.Empty;
string strDomain = ip + "\r\n";
byte[] arrDomain = Encoding.ASCII.GetBytes(strDomain);
using (TcpClient tcp = new TcpClient(whoisServer, 43)) {
using (Stream tcpStream = tcp.GetStream) {
using (StreamReader objSR = new StreamReader(tcpStream, Encoding.ASCII)) {
tcpStream.Write(arrDomain, 0, strDomain.Length);
buff = objSR.ReadToEnd;
}
}
}
return buff;
}
works fine (ripe, arin, lacnic, afrinic) except for whois.apnic.net. Using Wireshark I noticed apnic keeps sending identical responses at increasing intervals.
Does anyone know why this is ?
Additionally, why would an IP address assigned to apnic (103.31.186.82) point to Romania with an 'ISP' located in Latvia ?