noahcoolboy / funcaptcha Goto Github PK
View Code? Open in Web Editor NEWA library used to interact with funcaptchas.
License: Other
A library used to interact with funcaptchas.
License: Other
Error:
Proxy response !== 200 when HTTP Tunneling
Stack:
AbortError: Proxy response !== 200 when HTTP Tunneling at Client.connect (C:\Users\Owner\Documents\node-projects\test\node_modules\undici\lib\proxy-agent.js:103:22) at processTicksAndRejections (node:internal/process/task_queues:95:5)
Works without proxies, proxy provider: https://proxyempire.io/
I am trying to make a POST request to https://chat.openai.com/backend-api/conversation
, which requires an arkose_token
for GPT-4 requests.
I am looking to retrieve an arkose token in the form of:
1281785cfd1440558.9632456905|r=eu-west-1|meta=3|metabgclr=transparent|metaiconclr=%23757575|guitextcolor=%23000000|pk=35536E1E-65B4-4D96-9D97-6ADB7EFF8147|at=40|sup=1|rid=8|ag=101|cdn_url=https%3A%2F%2Ftcr9i.chat.openai.com%2Fcdn%2Ffc|lurl=https%3A%2F%2Faudio-eu-west-1.arkoselabs.com|surl=https%3A%2F%2Ftcr9i.chat.openai.com|smurl=https%3A%2F%2Ftcr9i.chat.openai.com%2Fcdn%2Ffc%2Fassets%2Fstyle-manager
How can I achieve this?
Thank you
When fetching the first image, I am commonly getting an encrypted image response. Looking into this, it appears as though the request to get the encryption key is failing.
The response body will randomly return as {"error":"DENIED ACCESS"} with a status code of 200, even when I have not recently made a request to get the encryption key. Any further attempts to get the encryption key are also unsuccessful with the same response until a new captcha is generated.
Hello there!
I've encountered an issue with the Roblox signup API, specifically related to captcha challenges. It used to work perfectly for me, but recently, I've been consistently receiving the following error message: "Challenge failed to authorize request."
Is there any fix available for this issue? I'd greatly appreciate your assistance in resolving this matter.
Thank you in advance!
I see the X-Requested-ID generated by your codes is shorter than that in live.com
yours be like: {"ct":"732L8F5Ni188RpM/epIwZQ==","iv":"3023dea77d1147da32a670e3322ea609","s":"6467716e6f697375"}
real X-Requested-ID in live.com: {"ct":"Y+Fs0iFY7jjMBnE8BQWuzdK6CUAW+x22WdphEkzDOZg=","iv":"097aedc979ad4b6968c55b74ea706212","s":"3f9f76996190e4e3"}
I tried this:
<iframe src={
https://roblox-api.arkoselabs.com/fc/gc/?token=${token}`}
width="306px"
height="260px"
/>
`
im successfully sending the roblox funcaptcha and displaying it on a website and solving it, but how would i get the actual captcha token to provide to the login API? Sorry if this is a dumb question and is easier hen i thought!
Hello Sir, am Polar.
Let me tell you my THANKS for creating this proyect and i hope you can conitnue helping us with such a great proyects as this. really, my REAL THANKS to you. I can donate or anything just for you to cotinue taking care of this proyect, this not a problem.
OK, my question is this.
I am triying to solve the public_key, and as you can see in the image each awnser i send i receive a "decryption_key" , is this something i am able to bypass? or how do i figure it out this? its possible for you to give me some kind of HINT?? Just a little hint. I will catch it np.
arkose sever need to decrypt the encrypted bda that client side send to it, right? then how does it do this? I don't see client side send key & iv & s to arkose server.
I ask this because I want to decrypt bda of a real browser.
I'm running my own java funcaptcha program, in which used some of your codes or thoughts.
while visit /fc/gt2, most time I Igot "DENIED ACCESS", ocationally got correct json. when change ip, the rate of got correct json can be higher.
I remember I always got correct json about a month ago, now this. funcaptcha did significant change?
I compared the request through my java program and the request through chrome, the only difference is there is a data[blob] in headers of the request through chrome, which I can't figure out how to form. I checked your api.js and also didn't find the data[blob] in your codes of /fc/gt2 request.
any ideas?
thank you buddy.
hi again
i have problem with solving the big image let me show u
check the image after sending first right answer dont wont more and get same image for others wave
as u said before if answer send the challenge will be change but i send answer but challenge not changing
see this image:
please tell me what could i to solve this
thanks a lot
The captchas do not work anymore. They return super hard captchas and when you complete them correctly they say "You did not solve the captcha correctly"
I'm making a java program in which some codes are converted from your codes.
I got image challenge link like this:
https://client-api.arkoselabs.com/rtig/image?challenge=0&sessionToken=181178b72054e7a76.6422117304&gameToken=487651fae5129f606.3536452704
but downloaded image content is like this:
{"ct":"5kwKT4XeECXNIF+A7...........","iv":"2496f3b6bcb223734ee448fc13fff319","s":"1f78c5e0937472ba"}
do you have any idea where I might be wrong?
Am I doing something wrong here? Or is this just not working?
I also cannot get embed urls to work either, which was my original plan
Heya! I'm trying to implement a feature for a project that requires users to solve captchas in the browser. However, when I try to test it, I keep on getting stuck on the captcha loading screen. Am I doing something wrong? Here is my code
const fun = require("funcaptcha");
const UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
fun.getToken({
pkey: "476068BF-9607-4799-B53D-966BE98E2B81",
surl: "https://roblox-api.arkoselabs.com",
headers: {
"User-Agent": UA
}
}).then(async(token) => {
let s = new fun.Session(token, {userAgent: UA});
console.log(s.getEmbedUrl());
});
Hey there, when I get the token from funcaptcha, I make new post request where I pass all neccessary data, like token, challengeid captcha id etc, but it still says challenge is required
{"response":"not answered","decryption_key":"73465047f4e6e4a35.7183978505","time_end":1694793619,"time_end_seconds":59}
When I've answered all the waves I get a response:
{"response":"answered","solved":false,"incorrect_guess":"","score":3,"decryption_key":null,"time_end":1694793901,"time_end_seconds":59}
What could it possibly mean?
I don't know if its a me problem but there seems to be an error in the module..
if (!this.token.startsWith("token="))
^
TypeError: Cannot read properties of undefined (reading 'startsWith')
(i never opened an issue on github lmfao)
So sorry for abusing the issues tab but are you selling a FunCaptcha AI Model mainly for roblox. If so how much?
I can't seem to figure out how to get the solution string from your program. I need the actual solution string. Usually looks something like this:
757631cbc10141381.8457708605|r=eu-west-1|metabgclr=transparent|guitextcolor=%23000000|metaiconclr=%23555555|meta=3|meta_height=523|meta_width=558|pk=2CB16598-CB82-4CF7-B332-5990DB66F3AB|at=40|cdn_url=https%3A%2F%2Fclient-api.arkoselabs.com%2Fcdn%2Ffc|lurl=https%3A%2F%2Faudio-eu-west-1.arkoselabs.com|surl=https%3A%2F%2Fclient-api.arkoselabs.com|smurl=https%3A%2F%2Fclient-api.arkoselabs.com%2Fcdn%2Ffc%2Fassets%2Fstyle-manager
hi and thanks for your good work
i have 2 problem
first one i want send the image request with await time to solver and get the response and send with answer();
please tell me how could i do it
next problem about token
i want to know response token work or not
check origin url that solve the captcha if origin url like that website they using it, response token work otherwise they give invalid captcha response.
i think you using external link or iframe to get image and solve captcha, tell me how could i test this for my target
thanks a lot
So I'm getting the captcha just fine, and since it's suppressed, I just immediately send the token back to Roblox, but it's getting rejected
Can ideas on what this is caused by?
My login function
async function login(client: BotClient, username: string, password: string, csrfToken?: string, challengeId?: string, unifiedCaptchaId?: string, captchaToken?: string, challengeType?: string) {
let headers = {
"Content-Type": "application/json",
"User-Agent": UA,
"Origin": "https://www.roblox.com",
"Referer": "https://www.roblox.com/"
}
if(csrfToken) {
headers["X-CSRF-TOKEN"] = csrfToken;
}
if(challengeId) {
headers["rblx-challenge-id"] = challengeId;
let metaData = JSON.stringify({
"unifiedCaptchaId": unifiedCaptchaId,
"captchaToken": captchaToken,
"actionType": "Login"
});
headers["rblx-challenge-metadata"] = Buffer.from(metaData, "utf-8").toString("base64");
headers["rblx-challenge-type"] = challengeType;
}
return await request({
url: "https://auth.roblox.com/v2/login",
method: "POST",
headers: headers,
body: {
"ctype": "Username",
"cvalue": username,
"password": password
},
robloxRequest: false
});
}
My request function
async function request(requestOptions: RequestOptions) : Promise<Response> {
if(requestOptions.robloxRequest) {
requestOptions.headers = {
"X-CSRF-TOKEN": await roblox.getGeneralToken(),
"Cookie": `.ROBLOSECURITY=${this.config.ROBLOX_COOKIE}`,
...requestOptions.headers
}
}
console.log(requestOptions);
return await fetch(requestOptions.url, {
method: requestOptions.method,
headers: requestOptions.headers,
body: JSON.stringify(requestOptions.body)
});
}
challenge.instruction is "undefined"
Unsure if this is currently added, but the description example: "Pick the dice pair whose top sides add up to 5", "Pick the image that is the correct way up", etc. Possible to get this with the current version or is it not a feature?
π―π―
I have a few questions for this package
Is this the updated version of roblox-funcaptcha?
Will this package continue to be updated?
Will you ever add an ability for getting the data[blob] value?
I can't get the code to generate a captcha. Please provide any working examples if there are.
Code:
const token = await fun.getToken({
pkey: pkeys.funCaptchaPublicKeys.ACTION_TYPE_GROUP_JOIN, // 63E4117F-E727-42B4-6DAA-C8448E9B137F From: https://apis.rbxcdn.com/captcha/v1/metadata
surl: "https://roblox-api.arkoselabs.com"
})
console.log(token)
const session = new fun.Session(token)
Error:
{ error: 'DENIED ACCESS' }
/home/lightner/Node-Projects/RobloxAPI/node_modules/funcaptcha/lib/session.js:28
if (!this.token.startsWith("token="))
^
TypeError: Cannot read properties of undefined (reading 'startsWith')
at new Session (/home/lightner/Node-Projects/RobloxAPI/node_modules/funcaptcha/lib/session.js:28:25)
at /home/lightner/Node-Projects/RobloxAPI/index.js:21:25
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
I am trying to use proxies which needs authentication with username and password ( username:password@ip:port ) but whenever I try I get the error
Proxy response !== 200 when HTTP Tunneling
Hi there, hope it's fine to ask here, how do you invoke funcaptcha callback function without button to return the answer ?
Trying to capture the flow I have observed that it's bootstrap function but seems impossible to understand what this function is expecting to successfully call it...
Works with sign in pkey, but if you try the login pkey (funcaptcha api key) you get this error
I used console.log to debug the issue when it gave Cannot read properties of undefined (reading 'startsWith') error, when I used it on "token" variable it returned the access denied error
DM Kyurem102#8082 if you have any fixes
I am trying to create a funcaptcha session, but I get this error.
the token code:
the data.blob comes from thihs code:
https://hatebin.com/psckrjuqqe
if you need anything else, let me know.
Hello, I'm requesting that you add the string_table property in challenges, as it appears like there's a property like that in the challenge pastebin that you provide. Either that, or a method that converts a game_variant to an objective
Can a function be added which can be given a useragent and a bda be returned
hi noahcoolboy
I have problem with sending answer bigger than 5 like some challenge have bigger answer could you tell me how could I solve this problem?
when answering bigger than 5 I get error like this:
This captcha answer is 8:
Index must be between 0 and 5
challenge.js:160
Assertion failed: Index must be between 0 and 5
Thanks
First of all, thank you so much for your work!
I'm fairly new to JS, so this question may be too easy to answer :)
This code works great:
const fun = require("funcaptcha")
const token = await fun.getToken({
pkey: "<public_key>", // The public key
site: "<site>" // The site which contains the funcaptcha
}).then(async token => {
let session = new fun.Session(token);
let challenge = await session.getChallenge();
image = await challenge.getImage()
});
But I have a need to solve the "challenge" from the outside. For example, from a text document. For this, I need to get images from my saved challenge using getImage() without creating a new challenge or session.
I tried the following code:
const fun = require('funcaptcha')
challenge = <my saved challange>
image = await challenge.getImage()
But I get TypeError: challenge.getImage is not a function
How can I solve this problem and which link can I use to buy you a cup of coffee? :)
after a lot of struggle, I finally figured out how to use funcaptcha for roblox login api, but now, instead of node environment, I want to use it in browser. I made a few changes and only thing I am importing is funcaptcha library itself and thats the only problem I face, I think browser does not support it or something ... can anyone suggest me what to do? I also tried using funcaptcha cdn, but it says: Uncaught ReferenceError: exports is not defined
Hi, @noahcoolboy.
I really appreciate this open source project and the time you spent to hot-fix detection problems. Thanks!
I've used this project successfully until recent changes in funcaptchas API. I'm talking about the changes that resulted in this commit 0138a40 to address these changes and handle them properly.
Furthermore, I use this project to solve game type 4 and 3 on Twitter. Within the aforementioned change of funcaptchas API, Twitter has added the property &data[blob]=undefined
to the body of the MY_SURL/fc/gt2/public_key/MY_PUBLIC_KEY
endpoint.
The specified call of fun.getToken()
in my test script is:
const token = await fun.getToken({
pkey: "2CB16598-CB82-4CF7-B332-5990DB66F3AB",
surl: "https://client-api.arkoselabs.com",
data: {
blob: "undefined",
},
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0",
Accept: "*/*",
"Accept-Language": "de,en-US;q=0.7,en;q=0.3",
"Accept-Encoding": "gzip, deflate, br",
Referer:
"https://client-api.arkoselabs.com/v2/1.5.5/enforcement.fbfc14b0d793c6ef8359e0e4b4a91f67.html",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
Origin: "https://client-api.arkoselabs.com",
DNT: "1",
Connection: "keep-alive",
Cookie:
"_cfuvid=XXX; timestamp=169554800907859",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
TE: "trailers",
},
site: "https://twitter.com/i/flow/signup",
})
Note that I wiped the _cfuvid
cookie for security reasons. Within the registration pipeline of Twitter these headers are the exact headers that funcaptcha uses when calling the endpoint MY_SURL/fc/gt2/public_key/MY_PUBLIC_KEY
(this can be inspected using Chrome Dev Tools or Fiddler). I changed the res
variable of api.js
(line 26) to include these headers accordingly in my use case.
The resulting bda of util.getBda
is around 8350
characters long. Unfortunately, when using it, this silently returns a captcha that is either never solvable or requires 10 or more iterations to succeed and usually has the game version that requires to identify two elements connected by a dotted line. When extracting a bda directly via browser (again using Chrome Dev Tools or Fiddler) everything works just fine, and I receive an easier game type, where it's required to find X elements of a kind.
I noticed that these bdas that weren't generated by util.getBda
but directly from funcaptcha have a length of around 9486
characters, which seems to be significantly longer than the ones generated by util.getBda
.
Due to multiple hours of investigating this, I could already find out that the problem seems to have something to do with how util.getBda
creates the bdas, as again everything works like a charm when using an βoriginalβ bda from funcaptcha within the exact same pipeline.
What are proxies for in this library, what happens if I use or donot use it
I get this output when trying to get the token with the getToken function.
Error: { error: 'DENIED ACCESS' }
Code:
fun
.getToken({
Site: "https://signup.live.com",
pkey: "B7D8911C-5CC8-A9A3-35B0-554ACEE604DA",
})
.then(async (token) => {
console.log(token);
First of all I just want to say great job with this library! I'm very impressed that you reverse engineered the arkose labs cryptography from that terribly obfuscated code. I semi-gave up myself, but then found this library.
I'm trying to login to Roblox. I've managed to create a session and get a token successfully. Realizing that the blob is one use only, my current solution is to block requests towards the /public_key API so that the blob doesn't get used, and then grab the blob from the page. Is this a good solution?
I'm able to fetch a session embed link like this using the getEmbedURL function:
https://roblox-api.arkoselabs.com/fc/gc/?token=5861779e11e73c646.4949504801&r=us-east-1&meta=3&metabgclr=transparent&metaiconclr=%23757575&maintxtclr=%23b8b8b8&guitextcolor=%23474747&lang=en&pk=476068BF-9607-4799-B53D-966BE98E2B81&at=40&sup=1&rid=12&ag=101&cdn_url=https%3A%2F%2Froblox-api.arkoselabs.com%2Fcdn%2Ffc&lurl=https%3A%2F%2Faudio-us-east-1.arkoselabs.com&surl=https%3A%2F%2Froblox-api.arkoselabs.com&smurl=https%3A%2F%2Froblox-api.arkoselabs.com%2Fcdn%2Ffc%2Fassets%2Fstyle-manager&mbio=true
However, when I try putting that inside of an iframe, the captcha doesn't appear. I'm trying to do this on an about:blank page, though I've also tried it by inserting into the Roblox website. No dice either way.
Additionally, when I try and run getChallenge on the session, I get an error:
C:\Users\KDJ\funcaptcha\node_modules\funcaptcha\lib\session.js:50
if (data.game_data.gameType == 1) {
^
TypeError: Cannot read properties of undefined (reading 'gameType')
Why is this function not working, since I've successfully created a session?
Here's my full code:
const fun = require("funcaptcha")
fun.getToken({
pkey: "476068BF-9607-4799-B53D-966BE98E2B81",
surl: "https://roblox-api.arkoselabs.com",
data: {
blob: "<valid blob>"
},
headers: {
"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',
},
site: "https://www.roblox.com",
}).then(async token => {
let session = new fun.Session(token, { userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' })
console.log(session)
console.log(session.getEmbedUrl())
let challenge = await session.getChallenge() //errors here
console.log(challenge.gameType)
})
Thanks for your time!
Sincerely,
KDJ
The data[blob] string is created from the server, can you find a way to create this string yourself? Currently, funcaptcha is improving the limitation of token creation without the data[blob] string.
For example, previously I could create a funcaptcha hotmail solver token without getting {"error":"DENIED ACCESS"}, but now creating a token requires data[blob] and it can only be used once. inconvenient if running in large quantities.
Thanks
Using the signup key for Roblox will result in 20 waves of pick the striped sphere and brick cube (or other variations of that captcha) when using the website on the same IP will result in picking objects.
hey π
ive been running a project using this library for a few months, but recently ive been getting reports of roblox sending impossible captchas to my users, is there a way around this, or is it just a side effect of using the libray?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.