Advertisement
carexemen

Untitled

Sep 17th, 2021
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Ip Tacker
  3. #By 6ix9ine & TrojanH0rs3
  4. #
  5. # API documentation - http://ip-api.com/docs/
  6. # you can see you external ip using this Bash script :
  7. # read COUNTRY IP <<< $(wget -qO- http://ip-api.com/line/?fields=countryCode,query); echo $IP $COUNTRY
  8. # Now let's start :
  9.  
  10. use Socket;
  11. use Term::ANSIColor;
  12. use WWW::Mechanize;
  13. use JSON;
  14.  
  15.  
  16. print color 'bold bright_purple';
  17.  
  18. print q{
  19.  
  20.  
  21. [+] Welcome 6ix9ine & TrojaH0r3 [+]
  22.  
  23. Ip Geolocation Tool
  24. By : 6ix9ine & TrojanH0rs3
  25.  
  26. ------------------------------------
  27. };
  28.  
  29. @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";
  30. my @ip = inet_ntoa(scalar gethostbyname("@iphost")or die "IP or Host invalid!\n");
  31. my @hn = scalar gethostbyaddr(inet_aton(@ip),AF_INET);
  32.  
  33. my $GET=WWW::Mechanize->new();
  34. $GET->get("http://ip-api.com/json/@ip"); # JSON API OF IP-API.COM
  35. my $json = $GET->content();
  36.  
  37.  
  38. my $info = decode_json($json);
  39. # Json API Response :
  40. # A successful request will return, by default, the following:
  41. #{
  42. # "status": "success",
  43. # "country": "COUNTRY",
  44. # "countryCode": "COUNTRY CODE",
  45. # "region": "REGION CODE",
  46. # "regionName": "REGION NAME",
  47. # "city": "CITY",
  48. # "zip": "ZIP CODE",
  49. # "lat": LATITUDE,
  50. # "lon": LONGITUDE,
  51. # "timezone": "TIME ZONE",
  52. # "isp": "ISP NAME",
  53. # "org": "ORGANIZATION NAME",
  54. # "as": "AS NUMBER / NAME",
  55. # "query": "IP ADDRESS USED FOR QUERY"
  56. # }
  57. # INFOS OF JSON API ...
  58.  
  59. print " [!] IP: ", $info->{'query'}, "\n";
  60. print "------------------------------------\n";
  61. print " [+] ORG: ", $info->{'as'}, "\n";
  62. print " [+] ISP: ", $info->{'isp'}, "\n";
  63. print " [+] Country: ", $info->{'country'}," - ", $info->{'countryCode'}, "\n";
  64. print " [+] City: ", $info->{'city'}, "\n";
  65. print " [+] Region: ", $info->{'regionName'}, " - " , $info->{'region'}, "\n";
  66. print " [+] Geo: ", "Lat: " , $info->{'lat'}, " - Long: ", $info->{'lon'}, "\n";
  67. print " [+] Geo: ", "Latitude: " , $info->{'lat'}, " - Long: ", $info->{'lat'}, "\n";
  68. print " [+] Time: ", "timezone: " , $info->{'timezone'}, " - Long: ", $info->{'timezone'}, "\n";
  69. print " [+] As number/name: ", "as: " , $info->{'as'}, " - Long: ", $info->{'as'}, "\n";
  70. print " [+] ORG: ", $info->{'as'}, "\n";
  71. print " [+] Country code: ", $info->{'countryCode'}, "\n";
  72. print " [+] Status: ", $info->{'status'}, "\n";
  73. print "\n";
  74. # EOF
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement