npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cursecode/funcaptcha

v1.0.5

Published

A library used to interact with funcaptchas. Adapted to work with modern web standards.

Downloads

11

Readme

@cursecode/funcaptcha

A library used to interact with funcaptchas.

Installation

This package is available on npm.
Simply run: npm install @cursecode/funcaptcha

Usage And Documentation

Require the library like any other

import fun from "funcaptcha"

You must first fetch a token using getToken

const token = await fun.getToken({
    pkey: "476068BF-9607-4799-B53D-966BE98E2B81", // The public key
    surl: "https://roblox-api.arkoselabs.com", // OPTIONAL: Some websites can have a custom service URL
    data: { // OPTIONAL
        blob: "blob" // Some websites can have custom data passed: here it is data[blob]
    },
    headers: { // OPTIONAL
        // You can pass custom headers if you have to, but keep
        // in mind to pass a user agent when doing that
        "User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
    },
    site: "https://www.roblox.com/login", // The site which contains the funcaptcha
})

You can then create a new session

// Token, in this case, may either be a string (if you already know it) or an object you received from getToken (it will strip the token out of the object)
const session = new fun.Session(token, {
    userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36" // OPTIONAL: Custom user agent for all future requests
})

// If you would like to let a user solve the captcha in their browser
// NOTE: Embed URLs will not work unless put in an iframe.
console.log(session.getEmbedUrl())

// Suppressed captchas are instantly valid an do not require for you to load a challenge (it will error)
// These can occur when using a trusted IP and good fingerprint
// You can check if a captcha is suppressed by doing the following:
console.log(session.tokenInfo.sup == "1")

One session can get you 10 funcaptcha challenges, you will have to get another session after that.

let challenge = await session.getChallenge()
// Please view https://pastebin.com/raw/Gi6yKwyD to see all the data you can find 
console.log(challenge.gameType) // Gets the game type (ball, tiles, matchkey, etc...)
console.log(challenge.variant) // The game variant, eg: apple, rotated, maze, dice_pair, dart, card, 3d_rollball_animals, etc...
console.log(challenge.instruction) // Self explanatory
console.log(challenge.waves) // Wave count
console.log(challenge.wave) // Current wave number

// You can then use these functions
await challenge.getImage()

// For game type 1, where you have to rotate a circle to put the image in the correct orientation
// In this game type, the angle increment can vary. It can be found with challenge.increment
await challenge.answer(3) // Usually 0-6, but can be 0-5 or 0-6 depending on challenge.increment (clockwise)
await challenge.answer(51.4) // You can input the raw angle as well (clockwise, negative for counter clockwise)

// For game type 3, where you have to pick one of 6 tiles
await challenge.answer(2) // 0-5, please see https://github.com/noahcoolboy/roblox-funcaptcha/raw/master/img.gif

// For game type 4, where you pick an image from a selection of images which matches the prompt compared to the image on the left
// The answer should be between 0 and challenge.difficulty
await challenge.answer(2) // Pick the third image

Support the original author (noahcoolboy)

Care to support my work?
* BTC: 38pbL2kX2f6oXGVvc6WFF2BY9VpUCLH7FG
* LTC: M81EXhLSRXNKigqNuz5r7nanAvXmJmjFht
* XRP: rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg:865667163
* Ko-Fi (PayPal): (https://ko-fi.com/noahcoolboy)