"01100000","01103fff","KR","Korea, Republic of"Ĭommand: python ip2location-csv-converter.py -range -append IP2LOCATION-DB1.CSV "1.16.0.0","1.16.63.255","KR","Korea, Republic of"Ĭommand: python ip2location-csv-converter.py -cidr -replace IP2LOCATION-DB1.CSV Ĭonvert into hexadecimal with replace option:Ĭommand: python ip2location-csv-converter.py -hex -replace IP2LOCATION-DB1.CSV The converted format will be appended after the IP numbers field.Įxample: Sample Input "17170432","17301503","IN","India" The IP numbers in will be replaced to the selected format. IP numbers will be converted into CIDR format. IP numbers will be converted into the first IP address and last IP address in the range. Pip install win-inet-pton Usage python ip2location-csv-converter.py INPUT_FILE OUTPUT_FILE If you do not have the library installed, you can install the library by running the following command:įor Windows user, please install this library win_inet_pton before using this script, you can install the library by running the following command: It only support the CSV format, not the binary format. Please do not use this script to convert IP2Location BIN data file. You can download the IP2Location CSV file at the below links: In addition to this, this converter can also be used to convert any CSV file that contains the IP number (the numeric notation). It supports both the IP2Location commercial edition, DB1 to DB24 database and also the free edition, IP2Location LITE database. This Python script converts IP2Location CSV data file, that contains the IP address in numeric notation, into dot-decimal notation (such as x.x.x.x) or CIDR notation (x.x.x.x/24).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |