Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including cloudflare_ban with all npm packages installed. Try it out:

var cloudflareBan = require("cloudflare_ban")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

cloudflare_ban v1.0.1

cloudflare_ban

async function main(){
    const x = require("cloudflare_ban")
    x.set_zone_identifier('zone_identifier')
    x.set_email("email")
    x.set_auth_key("auth_key") //  /profile/api-tokens (Global API Key)
    await x.start()
    let a =await x.block("4.4.4.4")
    console.log(a)
    let b =await x.captcha("4.4.4.4")
    console.log(b)
    let c =await x.js_challenge("4.4.4.4")
    console.log(c)
    
    //let d =await x.remove_block("4.4.4.4")
    //console.log(d)
    //let e =await x.remove_captcha("4.4.4.4")
    //console.log(e)
    //let f =await x.remove_js_challenge("4.4.4.4")
    //console.log(f)
}
main()

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free