Coder Social home page Coder Social logo

#!/usr/bin/perl

use strict; use warnings;

use lib 'Geo-IPinfo/lib';

use Geo::IPinfo;

my $token = '1234567';

if you have a valid token, use it

my $ipinfo = Geo::IPinfo->new($token);

or, if you don't have a token, use this:

my $ipinfo = Geo::IPinfo->new();

return a hash reference containing all IP related information

my $data = $ipinfo->info('8.8.8.8');

if (defined $data) # valid data returned { print "Information about IP 8.8.8.8:\n"; for my $key (sort keys %{$data} ) { printf "%10s : %s\n", $key, $data->{$key}; } print "\n" } else # invalid data obtained, show error message { print $ipinfo->error_msg . "\n"; }

retrieve only city information of the IP address

my $city = $ipinfo->field('8.8.8.8', 'city');

print "The city of 8.8.8.8 is $city\n";

frzte's Projects

ip2location-splunk icon ip2location-splunk

A Splunk add-on that advanced IP information enrichment using the IP2Location and IP2Proxy databases.

lang-xml icon lang-xml

XML language support for the CodeMirror code editor

metasploitable3 icon metasploitable3

Metasploitable3 is a VM that is built from the ground up with a large amount of security vulnerabilities.

paper-kit-2 icon paper-kit-2

Paper Kit is a Fully Coded Web UI Kit based on Bootstrap.

perl icon perl

Official Perl client library for IPinfo

php icon php

Official PHP client library for IPinfo

remot3d icon remot3d

Remot3d: is a simple tool created for large pentesters as well as just for the pleasure of defacers to control server by backdoors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.