WhoIs Shenanigans


I am sure that everyone has used a WhoIs utility (such as http://www.internic.org/whois.html) for querying the owner of a domain name such as microsoft.com. There is however an alternative to these Web forms which provides more information allowing you to search not just for strings matching a domain name, but also for strings matching registered hostnames of domain names. This provides hysterical insight into the minds of some Webmasters. For a laugh take a look at some of these hostnames registered with microsoft.com or google.com in them.


MICROSOFT.COM.WILL.LIVE.FOREVER.BECOUSE.UNIXSUCKS.COM
MICROSOFT.COM.WILL.BE.BEATEN.WITH.MY.SPANNER.NET
MICROSOFT.COM.SOFTWARE.IS.NOT.USED.AT.REG.RU
MICROSOFT.COM.SHOULD.GIVE.UP.BECAUSE.LINUXISGOD.COM
MICROSOFT.COM.IS.NOT.HOSTED.BY.ACTIVEDOMAINDNS.NET
MICROSOFT.COM.IS.GOD.BECOUSE.UNIXSUCKS.COM
MICROSOFT.COM.HAS.ITS.OWN.CRACKLAB.COM
MICROSOFT.COM


GOOGLE.COM.ZOMBIED.AND.HACKED.BY.WWW.WEB-HACK.COM
GOOGLE.COM.YAHOO.COM.MYSPACE.COM.YOUTUBE.COM.FACEBOOK.COM.THEYSUCK.DNSABOUT.COM
GOOGLE.COM.IS.NOT.HOSTED.BY.ACTIVEDOMAINDNS.NET
GOOGLE.COM.IS.HOSTED.ON.PROFITHOSTING.NET
GOOGLE.COM.ACQUIRED.BY.CALITEC.NET
GOOGLE.COM


To see the complete list (r rated) try running the code yourself. Post a response with your funniest hostname or domain names other than these two that are particularly funny.


using System;


using System.Collections.Generic;


using System.Linq;


using System.Text;


using System.Net.Sockets;


using System.IO;


namespace WhoIsQuery


{


   class Program


   {


      static void Main(string[] args)


      {


         // A query that results in more than one result lists all possible results


         // so that a more precise query can be entered.


         // A query with only one result returns just that result.


        // Send request to WhoIs Server


        Console.WriteLine(“Contacting Internic”);


        TcpClient client = new TcpClient(“whois.internic.net”, 43);


        StreamWriter writer = new StreamWriter(client.GetStream());


        writer.WriteLine(“microsoft.com”);


        writer.Flush();


        // Retrieve response


        StringBuilder output = new StringBuilder();


        StreamReader reader = new StreamReader(client.GetStream());


        do


        {


           output.Append(reader.ReadLine() + Environment.NewLine);


        }


        while (!reader.EndOfStream);


        Console.WriteLine(output);


        Console.ReadLine();


     }


   }


}


 


 

Comments (2)

  1. Desk Coder says:

    THANK YOU!  I have been trying all day to find whois code in .Net that actually worked.  This is the first out of probably 40 bad examples.

    I think they are all missing the Flush call.