cdnstrip

command module
v0.0.0-...-3143f00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 16 Imported by: 0

README

CDN Strip

Go Report Card License

Go module for striping CDN IP ranges.

DEMO

Currently Stripping

  • Cloudflare
  • Cloudfront
  • Akamai
  • Azure CDN
  • DDOS Guard
  • Fastly
  • Incapsula
  • Max CDN

Install

go get -u github.com/theblackturtle/cdnstrip

Usage Parameters

Usage of cdnstrip:
  -i string
        Input [FileName|Stdin] (default "-")
  -o string
        Output file name (default "filtered.txt")
  -s    Skip loading cache file for CDN IP ranges
  -t int
        Number of threads (default 1)

Example Code

package main

import (
	"log"

	"github.com/mazlum/cdnstrip/cdn"
)

func main() {

	ip := "1.1.1.1"

	cdnRanges, err := cdn.LoadAll()
	if err != nil {
		log.Fatal(err)
	}

	if cdn.Check(ip, cdnRanges) {
		print("It's CDN IP !")
	} else {
		print("It's not CDN IP !")
	}

}

Authors

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL