How can I determine which company an IP address belongs to?

↘锁芯ラ 提交于 2019-12-04 05:00:55

You can install the whois command line tool for windows from microsoft

edit: then what information are you looking for ?

>whois bbc.co.uk
Domain name:
    bbc.co.uk

Registrant:
    British Broadcasting Corporation

Registrant type:
    UK Limited Company, (Company number: 000057)

Registrant's address:
    Research & Development
    Kingswood Warren
    Tadworth
    Surrey
    KT20 6NP
    United Kingdom

Registrar:
    British Broadcasting Corporation [Tag = BBC]

You can do a whois lookup on the https://ws.arin.net/whois website and parse out the information you are looking for.

Mostly I'm seconding the "whois" answers. Back in the day companies owned whole blocks of addresses, so it used to be fairly easy for people to write their own "whois", but as IP(v4) addresses got more scarce, it quit being easy. I wouldn't even think of trying it now. Use a real whois.

Check this http://ws.arin.net/whois/ it should provide the info you require

You could try requesting

http://ws.arin.net/whois/?queryinput={ipaddress} using a WebClient or WebRequest and then try parsing the returned string.

A simple string.IndexOf("OrgName:") lookup should get you close.

example url http://ws.arin.net/whois/?queryinput=207.46.193.254

HTH

OneSHOT

As with many programatic concerns, what you are asking is not as simple as you might expect.

Question(s) first... what is the source of the IP address you wish to resolve - a website "visitor", a web server or an unknown source? For the purpose of this response, I'll make the presumption that you are wish to "convert" a website visitor as this is the most common/valuable reason to resolve IP->Company.

Issue One... Using WHOIS you can resolve the "owner" of the netblock (IP Address range) associated with an IP address in question. The "owner" of the netblock is (usually) the ISP serving the company you're wishing to identify - not the company utilizing the IP address.

Issue Two... DNS is not a reliable source for anything beyond IP->domain.tld or domain.tld->ip type resolution. Beyond that it's not enforced (not really) and not completely reliable.

Issue Three... This may not be an issue for you. Depending on the NIC (ARIN, RIPE, et.al.) who resolved your WHOIS query, you'll find that the resultant format is not always easy to parse - readable... yes, parsable... no.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!