Re: location info

ToddAndMargo via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
On 5/6/24 06:44, ToddAndMargo via curl-users wrote:
> On 5/6/24 03:23, ToddAndMargo via curl-users wrote:
>> Hi All,
>>
>> I love this command:
>>      curl --connect-timeout 2 --silent ipinfo.io -o -
>> Give me everything I need to know about my own IP address.
>>
>> What if I want to know this information for a different
>> IP address (which I have extracted from an attack on
>> my firewall log)?
>>
>> I am looking for city and county of the attacker.
>>
>> Many thanks,
>> -T
>>
> 
> Figured it out:
> 
> $ curl https://ipinfo.io/8.8.8.8 -o -
> {
>    "ip": "8.8.8.8",
>    "hostname": "dns.google",
>    "anycast": true,
>    "city": "Mountain View",
>    "region": "California",
>    "country": "US",
>    "loc": "37.4056,-122.0775",
>    "org": "AS15169 Google LLC",
>    "postal": "94043",
>    "timezone": "America/Los_Angeles",
>    "readme": "https://ipinfo.io/missingauth"
> 

just

      curl ipinfo.io/8.8.8.8 -o -

will do.




-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.