Marook-Online
* 06.Feb.2012, 15:09 UTC+1
Welcome, Guest. Please login or register.
Username:
Password:

News: Back again Wink
Main Menu
  Navigation
   Downloads
     Tools
     Music Discs
     SMF Mods
     Trainer & Patches
     EgoShare Uploader
   Guestbook
   NoPaste
   User Map
   Gallery
  
   Malware Scan
   Hacker Blacklist
   Find Abusemail
Top Downloads
Support Me !
Help me by donating a small amount!



Advanced search

Google


Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read
14-Dec-2007 08:41
Marook
Administrator
*****
Offline Offline

Joined: 01-Jan-2005
Posts: 224


To query a whois server, just use this few lines of code

Code
GeSHi (vbnet):
  1. Imports System.Net.Sockets
  2. Imports System.Text
  3. Imports System.IO
  4.  
  5. Private Function WhoIs(ByVal whoisServer As String, ByVal url As String) As String
  6.    Dim sbResult As New StringBuilder()
  7.    Dim WhoisClinet As New TcpClient(whoisServer, 43)
  8.    Dim nsWhois As NetworkStream = WhoisClinet.GetStream()
  9.    Dim bsWhois As New BufferedStream(nsWhois)
  10.    Dim streamWriter As New StreamWriter(bsWhois)
  11.  
  12.    streamWriter.WriteLine(url)
  13.    streamWriter.Flush()
  14.  
  15.    Dim streamReaderReceive As New StreamReader(bsWhois)
  16.  
  17.    While Not streamReaderReceive.EndOfStream
  18.        sbResult.AppendLine(streamReaderReceive.ReadLine())
  19.    End While
  20.  
  21.    Return sbResult.ToString()
  22. End Function
  23.  
Created by GeSHI 1.0.7.20
Logged
 

Pages: [1]   Go Up
Jump to:  

Theme by webtechnica.net

MHD v2.1 © 2oo8 by Marook
32116 hacking attempts defended!