Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Whois.btm - Look up an IP address

nchernoff

Administrator
May
42
2
Staff member
Migrated From JP Software Wiki

whois.btm looks up an IP address and displays the URL.

Usage: whois 11.22.33.44
Displays: 11.22.33.44 = xyz12.sample.com

Code:
:  whois.btm
:  Run whois and display URL
:  by Joseph "Rick" Reinckens
:  Usage: whois IP_address

@echo off
setlocal

if not "%1"=="" goto get_it
echo *** IP address parameter needed ***
goto done

:get_it
set ipname=%@ipname[%1]
if not "%ipname"=="11004" goto show_it
echo *** No IP address found ***
goto done

:show_it
echo %1 = %ipname

:done
endlocal
 
For reasons unknown, I the message below could not be delivered as a
response to [email protected]:

Steve Fabian wrote:
| nchernoff wrote:
|| *whois.btm looks up an IP address and displays the URL.*
|
| Alternate, looks up as many as are in the command line:
|
| Code
| ---------------
| setlocal
| do while %# GT 0
| set url=%@ipname[%1]
| echo %[1]%@if[%url EQ 11004, *** no IP address ***,=%url]
| shift
| enddo
| ---------------
| Steve
 
For reasons unknown, I the message below could not be delivered as a
response to [email protected]:

Same here:

Code:
Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.1.1
Remote-MTA: dns; spam.apollohosting.com
Diagnostic-Code: smtp; 550 5.1.1 <[email protected]>... User unknown
In my case, the reply was:

On 2008-06-04 21:26, nchernoff wrote:
> *whois.btm looks up an IP address and displays the URL.*
>
> Usage: whois 11.22.33.44
> Displays: 11.22.33.44 = xyz12.sample.com

You shouldn't call this "whois", because that is a completely different
service. You're simply doing reverse DNS lookups.
 
On 2008-06-04 21:26, nchernoff wrote:
> *whois.btm looks up an IP address and displays the URL.*
>
> Usage: whois 11.22.33.44
> Displays: 11.22.33.44 = xyz12.sample.com

You shouldn't call this "whois", because that is a completely different
service. You're simply doing reverse DNS lookups.

Correct. Also for what the is doing you could use my old resolve plugin too:
HTML:
http://itservicepro.com/download/Resolve-4NTPlugin.zip
 
Doesn't the utility NSLOOKUP also do this same thing? NSLOOKUP comes with
all Win2K and later Win-OSen.

-Scott

"JP Software Forums" <[email protected]> wrote on 10/17/2008 10:06:22 AM:


> ---Quote (Originally by dim)---
>
> On 2008-06-04 21:26, nchernoff wrote:
> > *whois.btm looks up an IP address and displays the URL.*
> >
> > Usage: whois 11.22.33.44
> > Displays: 11.22.33.44 = xyz12.sample.com
>
> You shouldn't call this "whois", because that is a completely different
> service. You're simply doing reverse DNS lookups.
> ---End Quote---
>
> Correct. Also for what the is doing you could use my old resolve
> plugin too:
itservicepro.com/download/Resolve-4NTPlugin.zip
 
JP Software Forums" <[email protected]>; "gwgaston wrote:
| ---Quote (Originally by dim)---
|
| On 2008-06-04 21:26, nchernoff wrote:
|| *whois.btm looks up an IP address and displays the URL.*
||
|| Usage: whois 11.22.33.44
|| Displays: 11.22.33.44 = xyz12.sample.com
|
| You shouldn't call this "whois", because that is a completely
| different
| service. You're simply doing reverse DNS lookups.
| ---End Quote---
|
| Correct. Also for what the is doing you could use my old resolve
| plugin too:

Or the built-in function @ipname[]
--
Steve
 
Doesn't the utility NSLOOKUP also do this same thing? NSLOOKUP comes with
all Win2K and later Win-OSen.

-Scott

NSLOOKUP is strickly DNS, which likely is fine for most things but resolve (as well as ipname) will work with whatever other name resolution your setup supports. For instance a static entry in your hosts file.

Also my reply was more about wrapper part which resolve expands on:

resolve http://jpsoft.com/forums/showthread.php?t=127
66.242.19.217

resolve 66.242.19.217
jpsoft.com

%@if["%@resolve[66.242.19.217]" EQ "jpsoft.com",Yes,No]
Yes

But then I have to support thousands of PCs and resolve is useful enough to load as a plugin for me. Likely not so for most people.

EDIT: I gotta say this is some sucky forum software.
 
Back
Top