Whois: RPSL - Ripe
Hmmm har lige bikset en hurtig Whois Ting sammen, virker fint med dk-hjemmemester m.m. Men Ripe vil ik' noget med mig, den svarer bare:% This is the RIPE Whois server.
% The objects are in RPSL format.
%
% Rights restricted by copyright.
% See http://www.ripe.net/ripencc/pub-services/db/copyright.html
Med andre ord, så mener den det skal være i RPSL,, jeg har været inde og læse, men synes ikke rigtigt jeg kan se hvor fejlen ligger..
Nogen der ved hvad jeg gør galt. ???
(her følger koden)
Imports System.IO
Imports System.Net.Sockets
Imports System.Text
Public Class WhoIS
Public Function WhoISLookup(ByVal sAddress As String, ByVal sServer As String) As String
Dim sResponse As String = "nothing"
'sAddress += "\r\n"
'sAddress = "crab.dk" & ControlChars.CrLf
sAddress += ControlChars.CrLf
Dim oTCP As TcpClient = New TcpClient
Try
oTCP.Connect(sServer, 43)
Catch ex As SocketException
Return ex.Message
End Try
Dim aAddress As [Byte]() = Encoding.ASCII.GetBytes(sAddress)
Try
Dim s As Stream = oTCP.GetStream()
s.Write(aAddress, 0, sAddress.Length)
Dim sReader As StreamReader = New StreamReader(oTCP.GetStream, Encoding.ASCII)
Dim SB As New StringBuilder
While -1 <> sReader.Peek
SB.Append(sReader.ReadLine & vbCrLf)
End While
sResponse = SB.ToString
oTCP.Close()
Catch ex As Exception
Return ex.Message
End Try
Return sResponse
End Function
End Class