Cedeq Community Forum
Keyboard Shortcut - Get Geolocation Data of a Selected IP address - Printable Version

+- Cedeq Community Forum (https://forum.cedeq.com)
+-- Forum: General (https://forum.cedeq.com/forumdisplay.php?fid=1)
+--- Forum: Keyboard shortcuts with AutoHotkey code (https://forum.cedeq.com/forumdisplay.php?fid=4)
+--- Thread: Keyboard Shortcut - Get Geolocation Data of a Selected IP address (/showthread.php?tid=21)



Keyboard Shortcut - Get Geolocation Data of a Selected IP address - denilama - 03-16-2018

This following script will help you quickly bring up geolocation data for a selected IP address. The script works by copying selected content to the clipboard, which, if it looks like an IPv4 address (e.g. 255.255.255.255), will start “iplocation.net” with your default browser. The IP address is automatically entered as a query. This will give you the geolocation data for the IP address.

Need help creating a keyboard shortcut with ShortKeeper using the following AutoHotkey code? This 5-minute tutorial will help!
ClipSaved := ClipboardAll
Clipboard =
SendInput, ^c
ClipWait, 2
if ErrorLevel
{
  MsgBox % "Failed attempt to copy text to clipboard."
}
else
{
  IpAddress := Trim(Clipboard)
  FoundPos := RegExMatch(IPAddress, "^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$")
  if (FoundPos)
    Run % "https://www.iplocation.net/?query=" . IpAddress
  else
    MsgBox % "Invalid IPv4 address selected!"
}
Clipboard := ClipSaved

The script will restore the previous clipboard content.

Spaces and tabs at the beginning and end of the selection will be omitted from the selection.

An error message will be displayed (line #7) if nothing is selected. The IP address verification occurs at line #12.

If you would like to launch the geolocation website (iplocation.net) with a non-default web browser, replace line #14 with one of the following:

For Chrome
Run % "chrome.exe " . "https://www.iplocation.net/?query=" . IpAddress

For Edge
Run % "microsoft-edge:https://www.iplocation.net/?query=" . IpAddress

For Firefox
Run % "firefox.exe " . "https://www.iplocation.net/?query=" . IpAddress

For Internet Explorer
Run % "iexplore.exe " . "https://www.iplocation.net/?query=" . IpAddress



RE: Keyboard Shortcut - Get Geolocation Data of a Selected IP address - Onowill - 02-03-2021

That's a really cool feature specially when it comes to checking in chat applications where is your user is coming from. We are working on various ideas in my company on how to enable better and easier understanding of visitor IPS on our sites. The main reason we started that was to mainly discern the real visitors from the fake out of the traffic that's being generated on our site. We know for a fact that a lot of users use http://192.168.2.1 to tweak their configurations and avoid getting spotted.It's all about stopping it now!


RE: Keyboard Shortcut - Get Geolocation Data of a Selected IP address - Brandcalfe - 02-15-2021

(02-03-2021, 07:16 PM)Onowill Wrote: That's a really cool feature specially when it comes to checking in chat applications where is your user is coming from. We are working on various ideas in my company on how to enable better and easier understanding of visitor IPS on our sites. The main reason we started that was to mainly discern the real visitors from the fake out of the traffic that's being generated on our site. We know for a fact that a lot of users use http://192.168.2.1 to tweak their configurations and avoid getting spotted.It's all about stopping it now!

That's cool really. I will try logging in to my router when I find the password from their database as I need to adjust the settings a bit.


RE: Keyboard Shortcut - Get Geolocation Data of a Selected IP address - bratpits - 06-26-2021

Amazing cool feature to to get IP address geolocation and innovative idea to keep track visitor from a different IP address so easy to track location of visitors.
Thanks keep it up