Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keyboard Shortcut - Get Geolocation Data of a Selected IP address
#1
Lightbulb 
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
Enterpad: For those who need more than a few shortcuts.

Reply
#2
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!
Reply
#3
(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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)