Skip to content

Instantly share code, notes, and snippets.

@MrThreat
Last active October 13, 2017 23:15
Show Gist options
  • Save MrThreat/fb5cbef22ae590b3525697c75b03b104 to your computer and use it in GitHub Desktop.
Save MrThreat/fb5cbef22ae590b3525697c75b03b104 to your computer and use it in GitHub Desktop.
get ip geolocation powershell v2 |v3 |v3.0+ | and curl nix*
<#
For peerlyst @grotezinfosec
Requires powershelgl 3.0
If your running nix* use:
curl http://freegeoip.net/xml/
OR
Powershell V2 (flare VM [malware analysis]
(new-object System.Net.WebClient).DownloadString("http://freegeoip.net/xml/")
#>
#requires -Version 3
$source = [string]$args[0]
$infoService = "http://freegeoip.net/xml/$source"
$geoip = Invoke-RestMethod -Method Get -URI $infoService
$geoip.Response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment