Live data from Hacker News

Google now tells you your IP when you ask it in search

google.com

21–30 of 97 posts

Re: Google now tells you your IP when you ask it in search

#21

Ok, so I have a curl/awk one-liner that can get me my ip in shell scripts that uses checkip.dyndns.org. It's super simple because the results are super simple from checkip. Anyone want to take a stab at this for google's result page?

This works, but only accidentally:

    curl --silent 'http://www.google.com/search?q=what+is+my+ip' | sed 's/.*Client IP address: //;s/).*//;q'
Google responds with HTTP error 403 (Forbidden), but it just so happens the client IP address is in the error page.

Re: Google now tells you your IP when you ask it in search

#23
post #6

For months: http://www.wolframalpha.com/input/?i=what+is+my+ip

For months... what? This is what it shows me, here in my studio apartment in London: http://i.imgur.com/uXBJk.jpg Edit: I knew that IP looked familiar - this is likely because of the Modify Headers Firefox add-on. Oh well, still broken.

how would a modify headers add-on be able to let the server think that you are coming from a different address? It's not as if the browser sends the origin address as a HTTP header.

It doesn't have to. It's part of the IP packet which contains the TCP packet which contains the request headers.

Are you sure that you are not using a proxy server at the address Wolfram gives you?

Edit: On second thought, you could try to fool server-side detection by setting a non-standard X-Forwarded-For header, but a what is my ip service shouldn't trust that and just report the real remote address.

Re: Google now tells you your IP when you ask it in search

#28

Ok, so I have a curl/awk one-liner that can get me my ip in shell scripts that uses checkip.dyndns.org. It's super simple because the results are super simple from checkip. Anyone want to take a stab at this for google's result page?

Or use https://ip.appspot.com/

Re: Google now tells you your IP when you ask it in search

#30
post #21

Ok, so I have a curl/awk one-liner that can get me my ip in shell scripts that uses checkip.dyndns.org. It's super simple because the results are super simple from checkip. Anyone want to take a stab at this for google's result page?

This works, but only accidentally: curl --silent 'http://www.google.com/search?q=what+is+my+ip' | sed 's/.*Client IP address: //;s/).*//;q' Google responds with HTTP error 403 (Forbidden), but it just so happens the client IP address is in the error page.

haha, nice one
Post reply on HN