www.fatihkabakci.com

Personal Website and Computer Science TUR EN

WHOIS PROTOKOLU

Last update: 9/20/2014 7:35:00 PM

Yazan:Fatih KABAKCI

Internet sunucularından olan web sunucuları istemcilere hizmet verirken, gerçek sayısal değerler olan IP adreslerini kullanır. Ancak internet kullanıcıların 32 bitlik IPv4 veya 128 bitlik IPv6 IP'li verileri akıllarında tutmaya çalışmak yerine, alan adlarını kullanarak çeşitli web hizmetlerine kolaylıkla erişebilir. DNS(Domain Naming Service) - Alan Adlandırma Hizmeti internet üzerindeki alan adlarını, gerçek IP ile ilişkilendiren sisteme denir.

whois TCP/IP networkleri içinde, genellikle 43 numaralı port üzerinden servis edilen bir alan adı sorgulama yöntemidir. Örneğin Türkiyede www.whois.com.tr, whois.natro.com.tr gibi web sunucuları bu hizmeti sağlayan örneklerdir. Yurt dışında ise internic.net, whois.com gibi sunucular örnek olarak verilebilir.

Aşağıda ise, internet kullanıcılarının sıklıkta yaptığı 'whois' sorgularını Java Programlama Dili kullanılarak nasıl yapılabileceğini gösteren bir örnek verilmektedir.

package Net;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author www.fatihkabakci.com
 * @summary This class connects to internic which any whois server first on number 43 port. Then, try to find who owns given domain name
 */
public class WhoisApplication {
   public static void main(String[] args) throws IOException {

      Socket socket = new Socket("whois.internic.com",43);
      InputStream is = socket.getInputStream();
      OutputStream os = socket.getOutputStream();
      
      String queryDomain = "fatihkabakci.com" + "\n"; // have to add \n character.
      byte[] command = queryDomain.getBytes();
      os.write(command);
      os.flush();
      
      int data;
      while((data = is.read()) != -1) {
         System.out.print((char)data);
      }
      // os and is have to be closed at the same time.
      os.close();
      is.close();
      socket.close();
   }
}

Yukarıdaki örnekte ilk olarak internic sunucusuna 43 numaralı port üzerinden bağlanılmaktadır. Çünkü bu port daha önceden bahsedildiği gibi whois sorguları için hizmet vermektedir. Ardından açılan soketin girdi ve çıktı akışları oluşturulmaktadır. Oluşturulan çıktı akışına fatihkabakci.com stringi yazılmaktadır. Bu aslında sunucunun 43 numaralı port üzerinden kullanıcıdan aldığı domain adı bilgisidir. Son olarak ise istemcinin girdi akışı sunucunun verdiği bilgiyi alır ve konsol ekranına yazdırır.

Yukarıdaki örneğin 20.09.2014 tarihinde yapılan sorgusunun çıktısı ise aşağıda verilmiştir.

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Domain Name: FATIHKABAKCI.COM
   Registrar: NICS TELEKOMUNIKASYON TICARET LTD.STI.
   Whois Server: whois.nicproxy.com
   Referral URL: http://www.nicproxy.com
   Name Server: NS1.NATROHOST.COM
   Name Server: NS2.NATROHOST.COM
   Status: ok
   Updated Date: 14-feb-2014
   Creation Date: 04-feb-2012
   Expiration Date: 04-feb-2015

>>> Last update of whois database: Sat, 20 Sep 2014 16:33:19 UTC <<<

NOTICE: The expiration date displayed in this record is the date the 
registrar's sponsorship of the domain name registration in the registry is 
currently set to expire. This date does not necessarily reflect the expiration 
date of the domain name registrant's agreement with the sponsoring 
registrar.  Users may consult the sponsoring registrar's Whois database to 
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois 
database through the use of electronic processes that are high-volume and 
automated except as reasonably necessary to register domain names or 
modify existing registrations; the Data in VeriSign Global Registry 
Services' ("VeriSign") Whois database is provided by VeriSign for 
information purposes only, and to assist persons in obtaining information 
about or related to a domain name registration record. VeriSign does not 
guarantee its accuracy. By submitting a Whois query, you agree to abide 
by the following terms of use: You agree that you may use this Data only 
for lawful purposes and that under no circumstances will you use this Data 
to: (1) allow, enable, or otherwise support the transmission of mass 
unsolicited, commercial advertising or solicitations via e-mail, telephone, 
or facsimile; or (2) enable high volume, automated, electronic processes 
that apply to VeriSign (or its computer systems). The compilation, 
repackaging, dissemination or other use of this Data is expressly 
prohibited without the prior written consent of VeriSign. You agree not to 
use electronic processes that are automated and high-volume to access or 
query the Whois database except as reasonably necessary to register 
domain names or modify existing registrations. VeriSign reserves the right 
to restrict your access to the Whois database in its sole discretion to ensure 
operational stability.  VeriSign may restrict or terminate your access to the 
Whois database for failure to abide by these terms of use. VeriSign 
reserves the right to modify these terms at any time. 

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
There has been no comment yet

Name:


Question/Comment
   Please verify the image




The Topics in Computer Science

Search this site for





 

Software & Algorithms

icon

In mathematics and computer science, an algorithm is a step-by-step procedure for calculations. Algorithms are used for calculation, data processing, and automated reasoning.

Programming Languages

icon

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. It can be used to create programs to control the behavior of a machine. Java,C, C++,C#

Database

icon

A database is an organized collection of data. The data are typically organized to model aspects of reality in a way that supports processes requiring information.

Hardware

icon

Computer hardware is the collection of physical elements that constitutes a computer system. Computer hardware refers to the physical parts or components of a computer such as the monitor, memory, cpu.

Web Technologies

icon

Web development is a broad term for the work involved in developing a web site for the Internet or an intranet. Html,Css,JavaScript,ASP.Net,PHP are one of the most popular technologies. J2EE,Servlet, JSP,JSF, ASP

Mobile Technologies

icon

Mobile application development is the process by which application software is developed for low-power handheld devices, such as personal digital assistants, enterprise digital assistants or mobile phones. J2ME

Network

icon

A computer network or data network is a telecommunications network that allows computers to exchange data. In computer networks, networked computing devices pass data to each other along data connections.

Operating Systems

icon

An operating system is software that manages computer hardware and software resources and provides common services for computer programs. The OS is an essential component of the system software in a computer system. Linux,Windows

Computer Science

icon

Computer science is the scientific and practical approach to computation and its applications.A computer scientist specializes in the theory of computation and the design of computational systems.