473,513 Members | 2,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

whois like functionality on Windows?

I am migrating a website from a UNIX based machine to an Windows
machine. In the logfiles I got from the old machine I mostly got domain
names and sometimes only IP addresses. The Windows machine seems to
produce only IP addresses.

Somehow I cannot find a windows solution to translate an IP address back
into a domain-name. Searching with Google shows that more people have
been wrestling with this problem.

I did find working whois scripts, but unfortunately:
- the verbose whois registrar information often forbids automated access
- the information is rather distributed, so you have to somehow access
sufficient servers
- you still have to find the domain name in the sea of details returned

I also found socket based solutions, but these solutions crash with the
message "host not found" :-(

Anyone suggestions?

kind regards, Gerrit

--
Gaudi systems architecting:
<http://www.extra.research.philips.com/natlab/sysarch/>
Jul 19 '05 #1
5 2832
Gerrit Muller <ge***********@embeddedsystems.nl> writes:
I am migrating a website from a UNIX based machine to an Windows
machine. In the logfiles I got from the old machine I mostly got
domain names and sometimes only IP addresses. The Windows machine
seems to produce only IP addresses.

Somehow I cannot find a windows solution to translate an IP address
back into a domain-name. Searching with Google shows that more people
have been wrestling with this problem.

I did find working whois scripts, but unfortunately:
- the verbose whois registrar information often forbids automated access
- the information is rather distributed, so you have to somehow access
sufficient servers
- you still have to find the domain name in the sea of details returned

I also found socket based solutions, but these solutions crash with
the message "host not found" :-(

Anyone suggestions?


This?

C:\>py23
Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import socket
socket.gethostbyaddr("194.109.137.226") ('fang.python.org', [], ['194.109.137.226'])


Thomas
Jul 19 '05 #2
Gerrit Muller wrote:
I am migrating a website from a UNIX based machine to an Windows
machine. In the logfiles I got from the old machine I mostly got domain
names and sometimes only IP addresses. The Windows machine seems to
produce only IP addresses.

Somehow I cannot find a windows solution to translate an IP address back
into a domain-name. Searching with Google shows that more people have
been wrestling with this problem.

I did find working whois scripts, but unfortunately:

[snip]

Part of your problem is looking for the wrong thing. You are looking
for the capability provided by "domain name servers" (DNSes), not
"whois" servers. But Thomas has just given you the solution...

-Peter
Jul 19 '05 #3
Peter, Thomas,

thanks for your suggestion. I did indeed look broader than whois, and
reverse DNS maybe a better description. Unfortunately I did try the
socket.gethostbyaddr("194.109.137.226"), but the result was a
disappointing "host not found", both at home on an XP machine as well as
at work on a NT machine. Your comments stimulated me too experiment with
this apporach, and I discovered that unresolved IP addresses in my old
logfiles return "host not found". However many IP addresses in my new
logfile can be translated successfully! Apparantly there are IP
addresses that cannot be reversely resolved by the DNS servers. I did
translate these addresses manually so far via the whois service. So you
definitely helped me a lot, but I keep interested in a complementary
whois solution.

kind regards, Gerrit

Gerrit Muller wrote:
I am migrating a website from a UNIX based machine to an Windows
machine. In the logfiles I got from the old machine I mostly got
domain names and sometimes only IP addresses. The Windows machine
seems to produce only IP addresses.

Somehow I cannot find a windows solution to translate an IP address
back into a domain-name. Searching with Google shows that more people
have been wrestling with this problem.

I did find working whois scripts, but unfortunately:


[snip]

Part of your problem is looking for the wrong thing. You are looking
for the capability provided by "domain name servers" (DNSes), not
"whois" servers. But Thomas has just given you the solution...

-Peter

--
Gaudi systems architecting:
<http://www.extra.research.philips.com/natlab/sysarch/>
Jul 19 '05 #4
Gerrit Muller wrote:
thanks for your suggestion. I did indeed look broader than whois, and
reverse DNS maybe a better description. Unfortunately I did try the
socket.gethostbyaddr("194.109.137.226"), but the result was a
disappointing "host not found", both at home on an XP machine as well as
at work on a NT machine. Your comments stimulated me too experiment with
this apporach, and I discovered that unresolved IP addresses in my old
logfiles return "host not found". However many IP addresses in my new
logfile can be translated successfully! Apparantly there are IP
addresses that cannot be reversely resolved by the DNS servers. I did
translate these addresses manually so far via the whois service. So you
definitely helped me a lot, but I keep interested in a complementary
whois solution.


If the address doesn't get mapped to a name by a DNS server, I strongly
suspect you will get nowhere with whois, or much else. Not all IP
addresses have corresponding domain names: many are dynamic addresses
assigned on the fly to arbitrary customers of (for example) cable modem
service providers, and they're often not interested in providing any
reverse mapping for them. Some do (for example, mine is
pc-136-15.scpe.powergate.ca right now), but many don't...

I'm sure there's a way to identify the domain of the owner of a block of
addresses in which a given IP resides. I don't know what it is.

-Peter
Jul 19 '05 #5
Peter Hansen wrote:
If the address doesn't get mapped to a name by a DNS server, I strongly
suspect you will get nowhere with whois, or much else. Not all IP
addresses have corresponding domain names: many are dynamic addresses
assigned on the fly to arbitrary customers of (for example) cable modem
service providers, and they're often not interested in providing any
reverse mapping for them. Some do (for example, mine is
pc-136-15.scpe.powergate.ca right now), but many don't...

I'm sure there's a way to identify the domain of the owner of a block of
addresses in which a given IP resides. I don't know what it is.

-Peter

In 5 years of logging I did get about 23000 different domains that
accessed my site. For about 1000 IP address ranges I obtained the domain
name manually via whois, mostly via Geektools. Sometimes via more
specific whois servers, such as krnic. These 1000 domain names are a mix
of "real" domain names, for instance from companies, universities or
government, and service providers. It would be nice to automate this
action, although the manual approach is workable.

regards, Gerrit

--
Gaudi systems architecting:
<http://www.extra.research.philips.com/natlab/sysarch/>
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3596
by: elyob | last post by:
I've got a number of domains, and want to check the expiry date automatically. There's plenty of whois scripts, but the output from the different whois servers are not always the same. Does...
6
2847
by: Fred | last post by:
Hi ! Can some one give me a little step by step to put me onthe right way.. I'd like to use PHP with Postresql. I need to make many whois query on the domain names that we own, to store the...
2
2032
by: James | last post by:
As a security feature of my site, I want the IP details to be recorded in certain situations. I suppose I have to use the Rwhois server to do this, though I don't know how to do that. Of course...
0
1307
by: Yair Nissan | last post by:
Hi, I want to make a .Net class that would make queries to a WhoIs server. I had no problem doing so on my comp back home, however my comp at work is using a proxy server, and I can't make any...
2
2143
by: Dion Heskett | last post by:
Hi I get a InvalidOperationException message when I click button2 at this line of code textBox1.Text = whoIs1.EndLookup( asyncResult ); Should I now be implementing the BackgroundWorker Class...
3
1528
by: Vjay77 | last post by:
As a result from who is I am getting this: > > NOTICE AND TERMS OF USE: You are not authorized to access or query our WHOIS database through the use of high-volume, automated, electronic...
10
1978
by: Roel | last post by:
Hi all, I want to query WHOIS info from my ASP.NET app. I'd like to query a specific domain (e.g. google.com) and for availability (e.g. google.eu (available/taken), google.nl...
0
2710
by: eliss | last post by:
Hi everyone, I'm trying to write a python script to whois a few domains twice a day so I get notified when they become available. I did it 2 ways, but neither way is very reliable, so I'm asking...
3
4223
by: Phillip B Oldham | last post by:
Hi. I'm stretching my boundaries in programming with a little python shell-script which is going to loop through a list of domain names, grab the whois record, parse it, and put the results into a...
0
7160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7537
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7099
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.