Code Monkey home page Code Monkey logo

cfscanner's Introduction

CloudFlare Scanner

This script scans Millions of cloudflare IP addresses and generate a result file contains the IPs which are work with CDN

This script uses v2ray+vmess+websocket+tls by default and if you want to use it behind your Cloudflare proxy then you have to set up a vmess account, otherwise it will use the default config

Requirements

You have to install following packages

git
bc
curl
nmap
parallel (version > 20220515)

How to run

1. clone

[~]>$ git clone https://github.com/MortezaBashsiz/CFScanner.git

2. Change direcotry and make them executable

[~]>$ cd CFScanner/scripts
[~/CFScanner/scripts]> chmod +x v2ctl v2ctl-mac v2ray v2ray-mac

3. Get config.real

[~/CFScanner/scripts]>$ curl -s http://bot.sudoer.net/config.real -o ./config.real

In config file the variables are

id: UUID for user
Host: Host address which ic behind Cloudflare
Port: Port which you are using behind Cloudflare on your origin server
path: websocket endpoint like api20
serverName: SNI

4. Execute it

At following command pay attention to the numbers threads and speed Custom Subnet File

threads: This is an integer number which defines the parallel threads count

speed: This is the filter which you can define to list the IPs based on download speed. the values must be one of [25 50 100 150 200 250 500] and all values are in KBPS (Kilo Bytes Per Second). For example if you set it to 50 it means that you will only list the IPs which have download speed more than 50 KB/S.

Custom Subnet File: This is optional argument which is a file address if you want to execute only some specific subnets. Then put your subnets in a file and pass the file as argument to the command.

[~/CFScanner/scripts]>$ bash cfFindIP.sh threads ./config.real speed [Custome Subnet File]

EXAMPLE: without costume subnet

[~/CFScanner/scripts]>$ bash cfFindIP.sh 8 ./config.real 100

EXAMPLE: with costume subnet

[~/CFScanner/scripts]>$ bash cfFindIP.sh 8 ./config.real 100 ./custome.subnets

Which the custome.subnets is like as following. you can edit this file and add your subnets in each line.

[~/CFScanner/scripts]>$ cat custome.subnets 
5.226.179.0/24
203.89.5.0/24
[~/CFScanner/scripts]>$

5. Result

It will generate a file by datetime in result direcotry

[~/CFScanner]>$ ls result/
20230120-203358-result.cf
[~/CFScanner]>$

Video guide

A video guide usage can be found in youtube.

cfscanner's People

Contributors

mortezabashsiz avatar beh-rouz avatar ali-frh avatar armgham avatar thehxdev avatar majnikool avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.