Filter CDN IP addresses using automated and custom CIDR ranges.
This tool can help you filter IP addresses based on whether they are CDN addresses or not.
- Python3.6+
- Clone the repository
- pip3 install -r requirements.txt
Switch | Explanation |
---|---|
-i/--input | Enter your IP list file path. (Default: - [pass from stdin]) |
-v/--verbose | Return IP ranges with CDN information. |
-d/--debug | Show more debug messages. |
-du/--disable-update | Do not update ranges.txt file. |
-o/--output | Location of output file. (Don't use this switch if you wish to print the result to STDOUT) |
-r/--reverse | Return result for IP addresses that are in CDN ranges. |
-a/--append | Append a list of CDN ranges (One range per each line.) |
-
Filter IP addresses from stdin and exclude CDN ranges
cat ips.txt | python cdnsift.py -
Filter IP addresses from file and include CDN ranges
python cdnsift.py -r -i ips.txt -
Filter IP addresses from file and do not update ranges.txt
python cdnsift.py -i ips.txt -du -
Filter IP addresses from file and save output to cdnFree_ips.txt
python cdnsift.py -i ips.txt -o cdnFree_ips.txt