29 March 2008, 18:18 | Mesaj No:1 |
Durumu:
Papatyam No :
1196
Üyelik T.:
09 December 2007
Arkadaşları:0
Cinsiyet:
Yaş:34
|
Whois - tcpclient Com, net, org, us, biz, info
Whois - tcpclient Com, net, org, us, biz, info Public Shared Function tcp(ByVal q, ByVal server, ByVal port, ByVal timeout) Dim tcpc As System.Net.Sockets.TcpClient = New System.Net.Sockets.TcpClient tcpc.NoDelay = False Try tcpc.Connect(server, port) Dim arrDomain As Byte() = System.Text.Encoding.ASCII.GetBytes(CStr(q).ToChar Array()) Dim s As System.IO.Stream = tcpc.GetStream() s.Write(arrDomain, 0, CStr(q).Length()) s.Flush() Dim sr As System.IO.StreamReader = New System.IO.StreamReader(tcpc.GetStream(), System.Text.Encoding.ASCII) Dim strLine As String = "" tcpc.ReceiveTimeout = timeout * 1000 Dim qx As String qx = sr.ReadToEnd() tcpc.Close() tcpc = Nothing s.Close() s = Nothing sr.Close() sr = Nothing Return qx Catch e As Exception 'Console.WriteLine(e.ToString()) Return -1 End Try End Function Public Shared Function Who(ByVal domain As String) Dim q = "" & domain & "" & vbCrLf Dim whoisserver As String If (domain.indexOf(".com" > -1) Then whoisserver = "whois.crsnic.net" ElseIf (domain.indexOf(".net" > -1) Then whoisserver = "whois.crsnic.net" ElseIf (domain.indexOf(".org" > -1) Then whoisserver = "whois.opensrs.net" ElseIf (domain.indexOf(".biz" > -1) Then whoisserver = "whois.nic.biz" ElseIf (domain.indexOf(".info" > -1) Then whoisserver = "whois.nic.info" ElseIf (domain.indexOf(".us" > -1) Then whoisserver = "whois.nic.us" End If return tcp(q, whoisserver, 43, 10) End Function |
Bookmarks |
Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
Tefekküre Davet Köşesi |
|
Papatyam Sosyal Medya Guruplarımıza Katılın |