GithubHelp home page GithubHelp logo

ipgeolocation's Introduction

IPGeoLocation

====

  • A tool to retrieve IP Geolocation information
  • Powered by ip-api

Requirements

  • Python 3.x
  • termcolor
  • colorama

Download/Installation

if pip3 is missing:

  • apt-get install python3-setuptools
  • easy_install3 pip
  • pip3 install -r requirements.txt

Features

  • Retrieve IP or Domain Geolocation.
  • Retrieve your own IP Geolocation.
  • Retrieve Geolocation for IPs or Domains loaded from file. Each target in new line.
  • Define your own custom User Agent string.
  • Select random User-Agent strings from file. Each User Agent string in new line.
  • Proxy support.
  • Select random proxy from file. Each proxy URL in new line.
  • Open IP geolocation in Google Maps using the default browser.
  • Export results to csv, xml and txt format.

Geolocation Information

  • ASN
  • City
  • Country
  • Country Code
  • ISP
  • Latitude
  • Longtitude
  • Organization
  • Region Code
  • Region Name
  • Timezone
  • Zip Code

Usage

$ ./ip2geolocation.py
usage: ipgeolocation.py [-h] [-m] [-t TARGET] [-T file] [-u User-Agent]
                        [-U file] [-g] [--noprint] [-v] [--nolog] [-x PROXY]
                        [-X file] [-e file] [-ec file] [-ex file]

IPGeolocation 2.0.4

--[ Retrieve IP Geolocation information from ip-api.com
--[ Copyright (c) 2015-2016 maldevel (@maldevel)
--[ ip-api.com service will automatically ban any IP addresses doing over 150 requests per minute.

optional arguments:
  -h, --help            show this help message and exit
  -m, --my-ip           Get Geolocation info for my IP address.
  -t TARGET, --target TARGET
                        IP Address or Domain to be analyzed.
  -T file, --tlist file
                        A list of IPs/Domains targets, each target in new line.
  -u User-Agent, --user-agent User-Agent
                        Set the User-Agent request header (default: IP2GeoLocation 2.0.3).
  -U file, --ulist file
                        A list of User-Agent strings, each string in new line.
  -g                    Open IP location in Google maps with default browser.
  --noprint             IPGeolocation will print IP Geolocation info to terminal. It is possible to tell IPGeolocation n
ot to print results to terminal with this option.
  -v, --verbose         Enable verbose output.
  --nolog               IPGeolocation will save a .log file. It is possible to tell IPGeolocation not to save those log
files with this option.
  -x PROXY, --proxy PROXY
                        Setup proxy server (example: http://127.0.0.1:8080)
  -X file, --xlist file
                        A list of proxies, each proxy url in new line.
  -e file, --txt file   Export results.
  -ec file, --csv file  Export results in CSV format.
  -ex file, --xml file  Export results in XML format.

Examples

Retrieve your IP Geolocation

  • ./ip2geolocation.py -m

Retrieve IP Geolocation

  • ./ip2geolocation.py -t x.x.x.x

Retrieve Domain Geolocation

  • ./ip2geolocation.py -t example.com

Do not save .log files

  • ./ip2geolocation.py -t example.com --nolog

Custom User Agent string

  • ./ip2geolocation.py -t x.x.x.x -u "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"

Using Proxy

Using random Proxy

  • ./ip2geolocation.py -t x.x.x.x -X /path/to/proxies/filename.txt

Pick User-Agent string randomly

  • ./ip2geolocation.py -t x.x.x.x -U /path/to/user/agent/strings/filename.txt

Retrieve IP geolocation and open location in Google maps with default browser

  • ./ip2geolocation.py -t x.x.x.x -g

Export results to CSV file

  • ./ip2geolocation.py -t x.x.x.x --csv /path/to/results.csv

Export results to XML file

  • ./ip2geolocation.py -t x.x.x.x --xml /path/to/results.xml

Export results to TXT file

  • ./ip2geolocation.py -t x.x.x.x -e /path/to/results.txt

Retrieve IP Geolocation for many targets

  • ./ip2geolocation.py -T /path/to/targets/targets.txt

Retrieve IP Geolocation for many targets and export results to xml

  • ./ip2geolocation.py -T /path/to/targets/targets.txt --xml /path/to/results.xml

Do not print results to terminal

  • ./ip2geolocation.py -m -e /path/to/results.txt --noprint

ipgeolocation's People

Contributors

billsetag avatar maldevel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipgeolocation's Issues

No logs

Add option to tell IPGeolocation not to save log files. (--nolog)

-T file size

-T option doesn't specify file size (entry limit)
I have a file with 576 entries and I get this error before all entries are processed:

Google Maps: http://www.google.com/maps/place/53.3478,-6.2597/@53.3478,-6.2597,16z

[ERROR] An unexpected error occurred HTTP Error 429: Too Many Requests!
[ERROR] Retrieving IP Geolocation information failed.
ssc-kvescovi@5g-u50:~/IPGeoLocation$

How do I remedy this?

thanks

Help

107.178.194.155

I need to find this location.

Incorrect Geolocation

Hello
I use the Script and the Script works but.
I only get the Provider Location and not my own location.

What I do wrong
Best regards
Chris

Screenshot_20191028_102237
That is not correct.

No module Named Termcolor

Hello

I already install requirements and found that Termcolor and colorama already satisfied on my termux but why when i run

python3 ipgeolocation.py -m or anything that i was want run always having error

[email protected]:#python3 ipgeolocation.py -m
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
Traceback (most recent call last):
File "ipgeolocation.py", line 32, in
from core.IpGeoLocationLib import IpGeoLocationLib
File "/data/data/com.termux/files/home/IPGeoLocation/core/IpGeoLocationLib.py", line 30, in
from core.Utils import Utils
File "/data/data/com.termux/files/home/IPGeoLocation/core/Utils.py", line 35, in
from core.Logger import Logger
File "/data/data/com.termux/files/home/IPGeoLocation/core/Logger.py", line 32, in
from termcolor import colored
ModuleNotFoundError: No module named 'termcolor'
[email protected]:
#

Is there anything wrong with this step?
Help please.

Proxy

Add option for proxy setup/use.

Provide information on required extra librairies needed

When trying to run the tool on windows and standard python installation, I found that you need:

  • colorama
  • termcolor

in order for it to work correctly.
Solved the issue with a simple pip install but it would be a good idea to mention it in the README file.

Nice work!

verbose

add option for verbose (-v)

Proposal: Support IP2Location.IO API

It looks like this project is not being updated.

We would like to offer PR to use with IP2Location.IO API.

Kindly let us know if it is possible. It will offer another data source API to users.

Terminal

Add option to print or not results to terminal..

Error termcolor

Kali 2016.1 Rolling Release, full update && upgrade && dist-upgrade
sin titulo

Proxy

check if we can connect

problem when i try to run it

problem when i try to run it

Traceback (most recent call last):
File "./ipgeolocation.py", line 32, in
from core.IpGeoLocationLib import IpGeoLocationLib
File "/root/Desktop/IPGeoLocation/core/IpGeoLocationLib.py", line 30, in
from core.Utils import Utils
File "/root/Desktop/IPGeoLocation/core/Utils.py", line 35, in
from core.Logger import Logger
File "/root/Desktop/IPGeoLocation/core/Logger.py", line 32, in
from termcolor import colored
ImportError: No module named 'termcolor'

help please !

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.