Get information of a list of IP then analyze them with categorizing...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sabzi Greenly beafa732dc Add 3 days ago
screenshots Add screenshots 3 days ago
.gitignore Ignore more files and dirs 4 days ago
LICENSE Add GNU AFFERO GENERAL PUBLIC LICENSE 4 days ago Add 3 days ago Fix typo 4 days ago Give address to save information 4 days ago Remove json module because it was not necessarry 4 days ago
requirements.txt Create requrments file list 4 days ago

IP Analyzer

You can get information of IP list file then analyze them with categorizing

There is several important files:



  3. [MAIN]

  • First file ( make a request to ip-api website then get information of a IP.
  • secend file ( read content of a information list file then categorize data with user input fields.
  • Third file ( use two pvious files to get information of a list of IP then categorize them.


mkdir -p $HOME/.gits/

cd $HOME/.gits/

git clone ""

cd ip-analyzer/

# Better use a python virtualenv 

pip3 install -r requirements.txt --user

How to use:

You can use all of that three files (,, individually. But '' is our main file. So we'll teach how to work with '' file. You can execute this file with 'python3' command like this:

Enter address of IP list file (default: './banned-ips.list'): ./banned-ips.list
Enter fields. Cut them only with ','. Leave this empty if you want default:
Enter what key of this list you want categorize (default: 'country'): country
Where you want to save this IPs information (default: './information-ips.json'): ./information-ips.json :: SUCCESS *
  • In the first section you must write the exact address of a file that contain list of IP.

  • In the next section you must write what kind of fields you want to receive.

  • In the next section you must write what field you want to categorize of calculate.

  • In the next section you must write the exact address of a file that you want to save list of information of IP.

After insert all of the requirements section, the program will start immediately. At last the output must be like this:

987.65.43.21 :: SUCCESS *
** Information saved in ./information-ips.json **
result={'United States': 194, 'Vietnam': 27, 'United Arab Emirates': 4, 'Moldova': 11, 'China': 7, 'Japan': 1, 'Netherlands': 1, 'Thailand': 2, 'Switzerland': 6, 'Brazil': 4, 'Seychelles': 1, 'Singapore': 9, 'Sweden': 1, 'Pakistan': 6, 'Philippines': 5, 'Hong Kong': 1}

You can get information of a single IP with '' file like this:


Also you can play with information file of IP (like: 'information-ips.json') with with '' file:



  • Categorize_info command: categorize info command

  • Categorize_info result: categorize info command

  • Categorize: categorize info command

  • Get_info: categorize info command


Special thanks to ip-api website for their good and free API service.

And special thanks for you my friend :) <3