追踪电脑或手机(已知目标IP或mac)进行物理定位

仅供学习娱乐测试。

iplocator.pl代码:

#!/usr/bin/perl
# Ip Geolocation 
#By Alexcerus
# Demo : https://www.youtube.com/watch?v=0Eq3d10LQ8c
#
# API documentation - http://ip-api.com/docs/
# you can see you external ip using this Bash script :
# read COUNTRY IP <<< $(wget -qO- http://ip-api.com/line/?fields=countryCode,query); echo $IP $COUNTRY
# Now let's start :

use Socket;
use Term::ANSIColor;
use WWW::Mechanize;
use JSON;
  
 
print color 'bold bright_yellow';
 
print q{

        ~o88ooooooooooooo88o~
   ouooooo,~oo         oo~,ooooouo
   8     ~88888.     ,88888~     8
   8      go~~~os   go~~~os      8
   8    ,8`     '8_8`     '8.    8
   8    8`   _   '8`   _   '8    8
   8    8   !@!   8   !@!   8    8
   8    8i       /8\       i8    8
   8     8s     g8 8s     s8     8
   8      dooooo`8_8'ooooob      8
   8     d!      'V`      !b     8
   8     8        ~        8     8
   8     8                 8     8  
   8   ] 8                 8 [   8 
   8 [ ] 8                 8 [ ] 8
   8 [ ] !8               8| [ ] 8
   8 [ ]s88b-oo- xxx -oo-d88s[ ] 8
   8 [,88  8i'`   ~   '`i8  88.] 8
   8 88`   88s'88` '88`gf8   '88 8
   888   ,g8s/8. ooo ,8\g8s.   888
   88`  i888888fo_X_of888888i  '88
   V    YY'`~'`  ~~~  '` ~ YY    V
        ""                 ""

Ip Geolocation Tool  
By : Alexcerus-HR 

------------------------------------
};
 
print color 'reset';
@iphost=$ARGV[0] || die "Usage : ./Iplocation.pl [host] [ip] [domain] \n\nEx:  ./Iplocation.pl  www.google.com \n     ./Iplocation.pl  216.58.210.206\n \n";
my @ip = inet_ntoa(scalar gethostbyname("@iphost")or die "IP or Host invalid!\n");
my @hn = scalar gethostbyaddr(inet_aton(@ip),AF_INET);
 
my $GET=WWW::Mechanize->new();
    $GET->get("http://ip-api.com/json/@ip"); # JSON API OF IP-API.COM
    my $json = $GET->content();
 
 
my $info = decode_json($json);
# Json API Response :
# A successful request will return, by default, the following:
#{
#    "status": "success",
#    "country": "COUNTRY",
#    "countryCode": "COUNTRY CODE",
#    "region": "REGION CODE",
#    "regionName": "REGION NAME",
#    "city": "CITY",
#    "zip": "ZIP CODE",
#    "lat": LATITUDE,
#    "lon": LONGITUDE,
#    "timezone": "TIME ZONE",
#    "isp": "ISP NAME",
#    "org": "ORGANIZATION NAME",
#    "as": "AS NUMBER / NAME",
#   "query": "IP ADDRESS USED FOR QUERY"
# }
# INFOS OF JSON API ...
 
print "  [!] IP: ", $info->{'query'}, "\n";
print "------------------------------------\n"; 
print "  [+] ORG: ", $info->{'as'}, "\n";
print "  [+] ISP: ", $info->{'isp'}, "\n";
print "  [+] Country: ", $info->{'country'}," - ", $info->{'countryCode'}, "\n";
print "  [+] City: ", $info->{'city'}, "\n";
print "  [+] Region: ", $info->{'regionName'}, " - " , $info->{'region'}, "\n";
print "  [+] Geo: ", "Lat: " , $info->{'lat'}, " - Long: ", $info->{'lon'}, "\n";
print "  [+] Geo: ", "Latitude: " , $info->{'lat'}, " - Long: ", $info->{'lat'}, "\n";
print "  [+] Time: ", "timezone: " , $info->{'timezone'}, " - Long: ", $info->{'timezone'}, "\n";
print "  [+] As number/name: ", "as: " , $info->{'as'}, " - Long: ", $info->{'as'}, "\n";
print "  [+] ORG: ", $info->{'as'}, "\n";
print "  [+] Country code: ", $info->{'countryCode'}, "\n"; 
print "  [+] Status: ", $info->{'status'}, "\n"; 
print "\n";
# EOF

KaliLinux下:

perl iplocator.pl --查看帮助
perl iplocator.pl 目标IP  --追踪目标ip

如果报错了:

apt-get install liblocal-lib-perl  libjson-perl
apt-get upgrade  libjson-perl

kali下方案2:
左上角applications—informationGathering—recon-ng

workspaces add target
workspaces list
show module
load ipinfodb --如果没有infodb的api Key,就用freegeoip,即:load freegeoip
set source 目标IP
run
add locations
如图例子,根据实情填写
show locations
search pushpins
load 随意了,自己随便选。 --可以抓到很多的数据。
search reporting
load reporting/pushpins  --其他也可以,随意
show options
set radius 1
和前一个图一样
run

对了,需要能访问谷歌,因为后面那个地图之类的,需要用到谷歌的服务。还有谷歌实景之类的。更悲催的是,目标附近的人也被你一起抓到数据了。还是老外会玩。

kali下方案3:

sudo curl -i -s -k -X 'POST' -H 'User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 5 Build/LRX22C)' -H 'Content-Type: application/x-www-form-urlencoded' \
'http://mobile.maps.yandex.net/cellid_location/?clid=1866854&lac=-1&cellid=-1&operatorid=null&countrycode=null&signalstrength=-1&wifinetworks=目标的mac地址12位:-65&app=ymetro'

吐槽一下,我不知道他怎么获取目标mac地址的,如果你用手机的话,我推荐finger这个软件

如图,定位出来了

直接谷歌map搜一下就行了。
直接把这两个字段的数字粘贴就好了。
————————————————————————————————
更新一个办法:https://github.com/toxic-ig/Trity

trity

ip 目标ip

然后经纬度出来了,谷歌地图搜经纬度就可以了

直接把IP放到http://dir.twseo.org/ip-check.php ,也可以经纬度定位。
——————————————————————————————————————

获取目标IP的一种方式:
https://blasze.com/
把一个网页连接粘进去,然后它生成了一个短连接,对这个连接进行短网址转换,然后发给别人,点开的人的IP就自动被记录了,只需要刷新页面就可以看到访问者的IP,对中国没用,直接被屏蔽。
IP信息查看:http://iplocationtools.com/
快速的网络IP扫描:http://angryip.org/

不好玩呀,这种的类似的太多了

——————————————————————————————————————
一些定位的思路:https://mp.weixin.qq.com/s/3kgGM46mcNqWUrrhOUsiOQ

你可能感兴趣的:(追踪电脑或手机(已知目标IP或mac)进行物理定位)