Resolver for Windows
Copyright (C) Fabrizio Gennari, 2000

This file is distributed under the GNU General Public License.
See file LICENSE.TXT for details.

This is a version of the utility Nslookup. It features a GUI and supports many
features (not all) of the of the most advanced utilities. Resolver is able to:
- determine an IP address from the hostname
- determine a hostname from the IP address
- tell whether the specified hostname is an alias
- determine mail exchangers of mail addresses
- determine authoritative name servers for domain names
- list all entries for a domain (zone transfer)
by querying a domain name server (DNS) according to the protocol described in
RFC1035.

FIRST OF ALL

After starting the program, you have to enter the address of a DNS server in the
box "Name server to be queried", either as IP or as hostname. If you enter a
hostname, it will be resolved using the default system DNS server (there should
be one if you have a working Internet connection: if there is none, you must use
the IP address). Most ISPs have a DNS, and tell users which is its IP address.

GETTING IP FROM HOSTNAME

Check the box "Address", enter a hostname in the box "Query", and press OK. The
IP address(es) will appear. If the entered hostname is an alias, the IP
addresses for the actual name will be displayed.

GETTING HOSTNAME FROM IP

Check the box "Address", enter an IP address in the box "Query", and press OK. 
The hostname will appear. The resolution is done using the in-addr.arpa domain, 
as described in RFC1035.
NOTE: even if you enter an IP address which has a hostname associated to it, the 
query could fail. This is because the in-addr.arpa domain is not always
up-to-date.

GETTING MAIL EXCHANGERS

Check the box "Mail exchanger", enter a mail address (whatever is after the @ 
sign) in the box "Query", and press OK. The mail exchangers (i.e., the physical 
servers which host the mailbox) will appear. Beside each mail exchanger, the 
preference (when mail is delivered, servers with lower preference number are 
tried first) and the IP address (when available) are displayed.

GETTING AUTHORITATIVE NAME SERVERS

Check the box "Authoritative name server", enter a domain name in the box 
"Query", and press OK. The authoritative name servers for that domain will 
appear. The authoritative name server is the server which stores the official 
information for a domain. For example, the authoritative name server for the 
domain yahoo.com holds the IP addresses for all the sites in the domain 
yahoo.com (www.yahoo,com, mail.yahoo.com etc.) and the authoritative name 
servers for the subdomains of yahoo.com (e.g. us.yahoo.com).

ZONE TRANSFERS

A zone transfer yields all the information about a certain domain (all the IP 
addresses of the sites belonging to that domain, all the mail exchangers for the 
mail addresses in that domain etc.). Only authoritative name servers for a 
certain domain can do zone transfers for that domain (and they often refuse to 
do it). To do a zone transfer for a domain, first of all get the authoritative 
name servers for that domain. Then, double-click on a name to ask the relevant 
authoritative name server for a zone transfer. After that, you can save the 
results on a file with the "Save" button. Only the entries A, CNAME, MX, NS, 
HINFO, PTR and SOA are supported.

TO-DO LIST
- Draw a better icon :)
- When saving zone transfer results on a file, the extension .txt is appended
even when the file type box is "All files"
- When connecting and transferring, the windows do not respond to user commands.
- The code is messy :)
- More safety checks in string allocation would not hurt. 
Anybody wants to do those?

SOURCE

Along with the executable, full source is included. Also, a makefile will allow 
you to compile the program on gcc-Mingw32 (the fantastic free open-source 
compiler for Windows, check http://www.mingw.org). It should be very easy to 
compile the program with commercial compilers (MSVC++, Corland C++ etc.)

AUTHOR
Fabrizio Gennari (fabrizio.ge@tiscalinet.it)
