Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement your own WHOIS server?

How would you get the WHOIS information to provide in the first place?

Note that I'm not actually intending to do this; I'm just interested in how it would work!

like image 513
HoboBen Avatar asked Jul 22 '10 15:07

HoboBen


1 Answers

Simply implement the whois protocol https://www.rfc-editor.org/rfc/rfc3912

You get a query, you look it up in your database and you send your answer. That's it. Have a look at the example:

   open TCP   ---- (SYN) ------------------------------>
              <---- (SYN+ACK) -------------------------
   send query ---- "Smith<CR><LF>" -------------------->
   get answer <---- "Info about Smith<CR><LF>" ---------
              <---- "More info about Smith<CR><LF>" ----
   close      <---- (FIN) ------------------------------
              ----- (FIN) ----------------------------->

How to build your own database, it depends on what information you want to provide.

like image 119
javierwilson Avatar answered Oct 05 '22 04:10

javierwilson