[vox-tech] Getting next-closest hostname for an IP address
ME
dugan at passwall.com
Sun Sep 26 18:55:09 PDT 2004
With shell scripting, it should be possible:
$ export BEFORE=`traceroute passwall.com 2>&1 | tail --lines=2 | head
--lines=1 | cut -d' ' -f2-3 | tr -d ' '`
$ echo $BEFORE
You could combine the cut/tr into a single sed for great justice.
Bill Kendrick said:
> I have a problem which I'm hoping one of the networking gurus out here can
> help me with.
>
> I'm trying to determine the hostname of a system that's one step closer to
> me than the IP address I have in my hand. The IP address I have is
> temporary
> and unnamed (FYI, it's a cellphone), so "host", "nslookup" and "resolveip"
> all fail.
>
> To explain graphically:
>
> [My server] -> ... -> ... -> [Wireless provider] -> [Cellphone]
>
> I have the IP address of the cellphone, but it has no hostname.
> So I'm hoping to be able to get the hostname of some machine in the
> wireless provider's network, so I can determine who the carrier is.
>
> If I do a "traceroute" or "mtr" on the IP address, for example, I can see
> that the last few hops are "###.sub-##-###-##.myvzw.com". From that
> I can determine, "oh, 'myvzw.com'... must be Verizon."
>
> But is there a tool I can use that can get this information?
> (I need it fairly quickly, and in a format easy for pulling in via a
> script -- I need to get this information _while_ responding to the phone
> when it connects to my server. It would be simiar to "gethostbyaddr($IP)"
> or calling `host $IP` in PHP, except it'd get the name of the next hop
> up.)
>
>
> Thanks!
>
> -bill!
> bill at newbreedsoftware.com New Breed Software
> http://www.newbreedsoftware.com/ Tux Paint 0.9.14 -- Coming soon!
> _______________________________________________
> vox-tech mailing list
> vox-tech at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
>
More information about the vox-tech
mailing list