MCPcopy Index your code
hub / github.com/ImAyrix/cut-cdn

github.com/ImAyrix/cut-cdn @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
13 symbols 36 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Removing CDN IPs from the list of IP addresses

CDN ProvidersInstallUsage ParametersPreviewUsageContact me


The tool's basic functionality would involve taking the list of IP addresses as input and then checking to determine whether the IP is behind a CDN. This tool will gather all CIDR of the most-known CDN providers and check your provided list with them. This is a handy tool for bug hunters.

CDN Providers

  • Akamai
  • Amazon
  • Arvancloud
  • Azure CDN
  • Bing
  • CacheFly
  • CafeBazaar (sotoon)
  • CDNetworks
  • Cloudflare
  • Cloudfront
  • DDoS Guard
  • Digitalocean
  • Fastly
  • Google cloud
  • Imperva
  • Incapsula
  • Leaseweb
  • Maxcdn
  • Oracle
  • Qrator
  • StackPath
  • StormWall
  • Sucuri
  • X4B

Installation

go install github.com/ImAyrix/cut-cdn@latest

Usage Parameters

cut-cdn -h

This will display help for the tool. Here are all the switches it supports.

Removing CDN IPs from the list of IP addresses

Usage:
  cut-cdn [flags]

Flags:
INPUT:
   -i string    Input [Filename | IP]
   -pu string   Provider CIDRs page [URL]
   -pl string   Providers CIDRs pages [File]
   -apu string  Append provider to the default providers [URL]
   -apl string  Append list of providers to the default providers [File]
   -c string    Use cache file (offline) [File]

RATE-LIMIT:
   -t int  Number Of Thread [Number] (default 1)

OUTPUT:
   -o string  File to write output to (optional) (default "CLI")
   -s string  Save all CIDRs [File]

DEBUG:
   -silent   Show only IPs in output
   -version  Show version of cut-cdn

Preview

cut-cdn

Usage

Set Provider

If you do not utilize the -pu and -pl switches, the default providers will be employed (list of providers). if you use these two switches, only the list of your input providers will be utilized. In case you wish to add a new link provider in addition to the default providers, make use of -apu and -apl.

  • Just one provider bash cut-cdn -i 127.0.0.1 -pu https://www.cloudflare.com/ips-v4
  • List of provider bash cut-cdn -i 127.0.0.1 -pl providers.txt
  • Append one provider to the default providers bash cut-cdn -i 127.0.0.1 -apu https://www.cloudflare.com/ips-v4
  • Append list of providers to the default providers bash cut-cdn -i 127.0.0.1 -apl providers.txt

Online mode

Check your IP list with the latest IP ranges of CDN providers:

  • Single IP bash cut-cdn -i 127.0.0.1 echo "127.0.0.1" | cut-cdn
  • List of IPs bash cut-cdn -i allIP.txt cat allIP.txt | cut-cdn
  • To store results use -o option bash cut-cdn -i allIP.txt -o output.txt
  • To set concurrency use -t option (Default is 1) bash cut-cdn -i allIP.txt -o output.txt -t 20

Offline mode

  1. To check IPs in offline mode you should save CDNs IP ranges in a file bash cut-cdn -s allCIDR.txt
  2. After that you can run it in offline mode by -c pointing to the CIDR file bash cut-cdn -i allIP.txt -o output.txt -t 20 -c allCIDR.txt

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

checkError
called by 25
main.go
printText
called by 23
main.go
regexIp
called by 4
main.go
createGroup
called by 4
main.go
readInput
called by 2
main.go
loadAllCDN
called by 1
main.go
checkAndWrite
called by 1
main.go
checkUpdate
called by 1
main.go

Shape

Function 11
FuncType 1
Struct 1

Languages

Go100%

Modules by API surface

main.go13 symbols

For agents

$ claude mcp add cut-cdn \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page