acheong08/ChatGPT

[Bug]:OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403) Once Again Not Solved

SwimmingLiu opened this issue Β· 272 comments

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Dingtalk_20230620084507

Steps to reproduce the problem

Try to run ask() with V1 API.

What should have happened?

Is should work:)

Version where the problem happens

Tried 6.3.4(latest)

What Python version are you running this with?

3.9

What is your operating system ?

Linux

Command Line Arguments

No

Console logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 726, in __check_response
    response.raise_for_status()
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://bypass.churchless.tech/conversation

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/gpt4_test.py", line 222, in <module>
    get_slice_thread_io(token)
  File "/root/gpt4_test.py", line 200, in get_slice_thread_io
    get_content(token[0], server)
  File "/root/gpt4_test.py", line 148, in get_content
    for data in chatbot.ask(prompt):
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 608, in ask
    yield from self.post_messages(
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 561, in post_messages
    yield from self.__send_request(
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 392, in __send_request
    self.__check_response(response)
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 91, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/revChatGPT/V1.py", line 733, in __check_response
    raise error from ex
revChatGPT.typings.Error: OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403)

Additional information

No response

Same issue here.

moejay commented

Am having the same issue, works for gpt 3.5 model

it doesn't work bro

"works on my computer"

  • Can you send a sample request payload from your browser?

Try gpt-4-mobile as your model and see if anything changes

@acheong08 your fix works on my computer with latest change.

Try gpt-4-mobile as your model and see if anything changes

this model makes it work, thx sir!!

@acheong08 your fix works on my computer with latest change.

gpt-4-mobile may be the final fix, whereas __arkose_token method only works for several hours.

wong2 commented

I believe they will add the arkose_token based verification to mobile models soon.

Nadeus commented

Is there a difference between gpt-4 and gpt-4-mobile?

Is there a difference between gpt-4 and gpt-4-mobile?

No

madela commented

Is there a difference between gpt-4 and gpt-4-mobile?

I have tested between gpt-4 and gpt-4-mobile and found differences in reasoning and writing style. gpt-4 looks much more advanced for long text.

I've also found that for summarization of long text, gpt-4-mobile is far worse than both gpt-4 and text-davinci-002-render-sha

Nadeus commented

Ok i'm now having the error with gpt-4-mobile, am I the only one?

So now both gpt-4 models don't work :/

I am facing the same problem.

3mora2 commented

reason may be here

It appears that an arkose_token field has been added to each ChatGPT conversation request, and currently only GPT-4 models are validating this field.

When a conversation is initiated from the GPT-3.5 page, the arkose_token is null. However, when a conversation is initiated from the GPT-4 page, an automatic request is made to fetch this arkose_token, which is then included in the conversation request.

It seems this is part of the Arkose FunCAPTCHA challenge process. However, the GPT-4 Mobile model isn't checking for this field at this time. As a workaround, you might want to use the GPT-4 Mobile model, which does not have usage restrictions at present.

3mora2 commented

comment

# if data.get("model", "").startswith("gpt-4"):
#     data["arkose_token"] = self.__arkose_token()

in def __send_request, it work for me

reason may be here

It appears that an arkose_token field has been added to each ChatGPT conversation request, and currently only GPT-4 models are validating this field.
When a conversation is initiated from the GPT-3.5 page, the arkose_token is null. However, when a conversation is initiated from the GPT-4 page, an automatic request is made to fetch this arkose_token, which is then included in the conversation request.
It seems this is part of the Arkose FunCAPTCHA challenge process. However, the GPT-4 Mobile model isn't checking for this field at this time. As a workaround, you might want to use the GPT-4 Mobile model, which does not have usage restrictions at present.

Thanks for referencing my previous reply. However, it's important to note that some information has become outdated. Currently, all GPT-4 models, including the GPT-4 Mobile model, are validating the arkose_token field.

I've addressed this issue at hydrotho/ChatGPT_Model_Switcher#2. The fix appears to be working well at the moment. However, please be aware that it might become ineffective at some point in the future due to potential changes in ChatGPT.

by applying "gpt-4-mobile" patch, it worked for 4 days. This issue happens again. So gpt-4-mobile is not a final fix. will try @hydrotho 's method.

@acheong08 your fix works on my computer with latest change.

gpt-4-mobile may be the final fix, whereas __arkose_token method only works for several hours.

gpt-4-mobile
also reported 403 error

RIP my borrowed plus account expired

Which means the PUID is invalid for GPT-4 access

Can anyone share a PUID?

Can anyone share a PUID?

user-EW05FrqHnXwezENAhzlji1Fu:1687574587-vaKR9vKqhkcDEgh7ra3ytPYngcuoqKDQ7yfAZrrCr%2Bc%3D

Can anyone share a PUID?

give me a way to contact you,I can lend you a plus account

Matrix: https://matrix.to/#/@acheong08:matrix.duti.me
Discord: acheong08
Twitter: acheong08

Since I don't have access to GPT-4 I can't test my patches. Based on observations of the web requests, arkose token is required, and either

  1. PUID must match access token
  2. arkose token must be fetched by matching IP

Matrix: https://matrix.to/#/@acheong08:matrix.duti.me Discord: acheong08 Twitter: acheong08
i send message to your Matrix

Updated PUID on server thanks to @WhiteCranes

Try and see if it works now

gchust commented

@acheong08
"bda": str(base64.b64encode(b'{"ct":"","iv":"","s":""}'), "utf-8")
This bda is not working for me. (Any other people tried 6.4.2 revChatGPT?)

However, I found that the solution in this repo is working saeedezzati/superpower-chatgpt@cbb182e#diff-4dcce6c0d0a57cdca60dbc5551021cce5ab858d68da3a15d6fe2a9afa934c722

superpower-chatgpt is retrieving the arkso token from the following endpoint`

curl -i -X GET \
   -H "Origin:https://chat.openai.com" \
 'https://api.wfh.team/gptx/arkose/'

Not sure if the token getting from the above API will expire or not, but it is working for the moment.

https://api.wfh.team/gptx/arkose/ is not open source, so I don't know why it is working πŸ˜΅β€πŸ’«

GP1390 commented

@acheong08 "bda": str(base64.b64encode(b'{"ct":"","iv":"","s":""}'), "utf-8") This bda is not working for me. (Any other people tried 6.4.2 revChatGPT?)

However, I found that the solution in this repo is working saeedezzati/superpower-chatgpt@cbb182e#diff-4dcce6c0d0a57cdca60dbc5551021cce5ab858d68da3a15d6fe2a9afa934c722

superpower-chatgpt is retrieving the arkso token from the following endpoint`

curl -i -X GET \
   -H "Origin:https://chat.openai.com" \
 'https://api.wfh.team/gptx/arkose/'

Not sure if the token getting from the above API will expire or not, but it is working for the moment.

https://api.wfh.team/gptx/arkose/ is not open source, so I don't know why it is working πŸ˜΅β€πŸ’«

Yep,I tried 6.4.2 revChatGPT. But neither 6.4.2 revChatGPT nor the token get from https://api.wfh.team/gptx/arkose/ works for me πŸ˜΅β€πŸ’«

6.4.2 not working for me either.

Arkose token might be regional then. I'll implement server side fetching of arkose.

Try https://github.com/acheong08/ChatGPT/releases/tag/6.4.3 to see if the system tries to link PUID with access token + arkose token

(This update fetches the PUID cookie automatically)

(wait a bit. server updating)

Server updated. Will now use its own arkose token

use a dedicated "bda" with the corresponding "userbrowser" can work. It seems my bda generation is not following this algorithm: "str(base64.b64encode(b'{"ct":"","iv":"","s":""}'), "utf-8"),".

I haven't been able to figure out how bda is generated. Not sure if hardcoding one works

At least for my own computer, it works right now with server side arkose

Not sure how long it'll last

This thread is useful. linweiyuan/go-chatgpt-api#175

My Chinese is sadly not proficient enough to understand

This thread is useful. linweiyuan/go-chatgpt-api#175

My Chinese is sadly not proficient enough to understand

linwenyuan said use this url as can generate correct arkose-token https://arkose-token.linweiyuan.com
Seems not useful for this repo.

This thread is useful. linweiyuan/go-chatgpt-api#175
My Chinese is sadly not proficient enough to understand

linwenyuan said use this url as can generate correct arkose-token https://arkose-token.linweiyuan.com Seems not useful for this repo.

Seems we should generate arkoseToken is proxy server, accoring to his patchset

if arkoseTokenUrl != "" {
			req, _ := http.NewRequest(http.MethodGet, arkoseTokenUrl, nil)
			resp, err := api.Client.Do(req)
			if err != nil || resp.StatusCode != http.StatusOK {
				c.AbortWithStatusJSON(http.StatusInternalServerError, api.ReturnMessage("Failed to get arkose token."))
				return
			}
responseMap := make(map[string]string)
			json.NewDecoder(resp.Body).Decode(&responseMap)
			request.ArkoseToken = responseMap["token"]
		}

Seems we should generate arkoseToken is proxy server, accoring to his patchset

https://github.com/acheong08/ChatGPT-Proxy-V4/blob/df2fb77b0158d99071a8ebc00fdea88fcf68459c/arkose.go#L1-L44

Already doing that (since a couple minutes ago)

Can you check if it works for you? (Also upgrade to latest version of revChatGPT so arkose doesn't get overriden by client)

Works for me but since I'm in the same region as the proxy server, it might or might not be replicable by others

Works for me but since I'm in the same region as the proxy server, it might or might not be replicable by others

Yes. It works for me either. This may be the final fix. Thanks.

GP1390 commented

Works for me but since I'm in the same region as the proxy server, it might or might not be replicable by others

Upgrade both and it did work for the moment, proxy server of ap-southeast region. Thanks!

Confirmed working for non-southeast accounts as well now (off thread)

gchust commented

In case anyone is interested in figuring out how the bda was generated (I was not clear about it yet!)...

It is generated by this file funcaptcha_api.js?onload=loadChallenge and can be debug by searching this line b3[dK(f_a_ir.m)] = aF[dK(f_a_ir.n)](by)

image

Hopefully someone good at JS can explain a bit on how it works? The code looks alien to me

Nadeus commented

Works fine in Europe, thanks!!!

Maybe not working again now? it worked in former few hours.
The same exception:
"OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403)"

Now it's 403 again. Could you please take a look.
@acheong08

Fixed using @pengzhile's endpoint for now. Will look into how to generate the parameters.

Looks like I might have to do some browser automation

I hope someone can help me figure out what this might mean:

{"ct":"/vfjnTlE3ZVKglS/2rXeoeDwcgCsKl/RgwpfExRQ90DTC+FYeFy4ZSzAsGJ9AiHCZ4NILmiMlF9I9tjTMB3K320yPa8/BRyPAU9fR8eaexyLH9XmXWF9ccO0aOD6fZf12nuUAp60x8ZZaX0mL6pF/F8ZQP0iyzg6dmQ77Xg0HCMCbEJYR9kavnknUSydOKNWtdGHNxNnNuvsxm2Qlpwq0+joshVwwHHJqlOUJHS9cC3dGEmFleWWQXwFz9Vx0EF8GtZJ9122n+CAkG0H6wi1cbbBUsyQWk9kl+KDy3O1t5+FsGf+F9pThpECMgcxPiJuf1aCtUbKIOmvpIHwYAcsWTOV3sNDf9yfJ5GnR7ZEBUGur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Cxu1uQnPSrpAc2iMoi4piKJ0eS3lH1AY74NsJoHgRNznv0krWKxe93fxL9wGV90/jxMMEJl+Y8U2XF75fdxt2dDzATCjxJVGsVZg2FC0nxLTcNLJNyhjfZBQGxB/CaqxjAAso9So5AzlhVEyMNnO6d6frRYq7WURR+5pL0c6YcUQU28mQL2wxjdgw83OYpO+z9Ik8G7GWBgvek8j2JprAQ6xsYoxs71J7Mnn5PbX/8i68dlOQI7ucmoUh4t9z22GMZDXXXHhfpa4YWsNR7Ooz4EzfZRAp3jhSPsV4FsLoj8O9vAG5KOmMV0E+K0/5hQkvD9lozzs9ZkiPXwcsF6BOf2r5/DjCZRFQxoc0fLGKZ3kDtUa1euxUsTpqZ2MoZevPkXY09ff0bAXGEG8EWapTHLTkWTy+zx4SU41WFNjSvXuX6x2D8f/oGg/ER1WV80nbZ0PjyncyG7VqC8QNgTHdq4DzW38/19PRor8BU/PEZT8V6pvqK2mHQIFci75/c6yj5c/KDyJ6orftgccn//KtCDYDngZYdTSoiQI0rec6r9UltfX4","iv":"105fe368222748c1264b91bc33b007db","s":"7b9a4247f3ba1451"}

Here is the simplified NodeJS code to generate a BDA:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const crypto_1 = require("crypto");
const alphabet = "abcdefghijklmnopqrstuvwxyz";
let md5 = (0, crypto_1.createHash)("md5");
function encrypt(data, key) {
  let salt = "";
  let salted = "";
  let dx = Buffer.alloc(0);
  salt = Array(8)
      .fill(0)
      .map((v) => alphabet[Math.floor(Math.random() * alphabet.length)])
      .join(""); // 8 random letters
  data =
      data +
          Array(17 - (data.length % 16)).join(String.fromCharCode(16 - (data.length % 16))); // Padding (pkcs7?)
  for (let x = 0; x < 3; x++) {
      dx = md5
          .update(Buffer.concat([
          Buffer.from(dx),
          Buffer.from(key),
          Buffer.from(salt),
      ]))
          .digest();
      salted += dx.toString("hex");
      md5 = (0, crypto_1.createHash)("md5");
  }
  let aes = (0, crypto_1.createCipheriv)("aes-256-cbc", Buffer.from(salted, "hex").slice(0, 32), Buffer.from(salted, "hex").slice(32, 32 + 16));
  aes.setAutoPadding(false);
  return JSON.stringify({
      ct: aes.update(data, null, "base64") + aes.final("base64"),
      iv: salted.substring(64, 64 + 32),
      s: Buffer.from(salt).toString("hex"),
  });
}

console.log(encrypt(`[{"key":"api_type","value":"js"},{"key":"p","value":1},{"key":"f","value":"16676487049c5ca1f9ed95f157118e34"},{"key":"n","value":"MTY4NzcwNDY4OQ=="},{"key":"wh","value":"69789b20711be96e029340977e1223f4|72627afbfd19a741c7da1732218301ac"},{"key":"enhanced_fp","value":[{"key":"webgl_extensions","value":"ANGLE_instanced_arrays;EXT_blend_minmax;EXT_color_buffer_half_float;EXT_disjoint_timer_query;EXT_float_blend;EXT_frag_depth;EXT_texture_compression_bptc;EXT_texture_compression_rgtc;EXT_texture_filter_anisotropic;EXT_sRGB;KHR_parallel_shader_compile;OES_element_index_uint;OES_fbo_render_mipmap;OES_standard_derivatives;OES_texture_float;OES_texture_float_linear;OES_texture_half_float;OES_texture_half_float_linear;OES_vertex_array_object;WEBGL_color_buffer_float;WEBGL_compressed_texture_astc;WEBGL_compressed_texture_etc;WEBGL_compressed_texture_etc1;WEBGL_compressed_texture_s3tc;WEBGL_compressed_texture_s3tc_srgb;WEBGL_debug_renderer_info;WEBGL_debug_shaders;WEBGL_depth_texture;WEBGL_draw_buffers;WEBGL_lose_context;WEBGL_multi_draw"},{"key":"webgl_extensions_hash","value":"e9b895637474b1973cef1f7f4328d572"},{"key":"webgl_renderer","value":"WebKit WebGL"},{"key":"webgl_vendor","value":"WebKit"},{"key":"webgl_version","value":"WebGL 1.0 (OpenGL ES 2.0 Chromium)"},{"key":"webgl_shading_language_version","value":"WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)"},{"key":"webgl_aliased_line_width_range","value":"[1, 7.375]"},{"key":"webgl_aliased_point_size_range","value":"[1, 255]"},{"key":"webgl_antialiasing","value":"yes"},{"key":"webgl_bits","value":"8,8,24,8,8,0"},{"key":"webgl_max_params","value":"16,64,16384,1024,16384,32,16384,32,16,32,1024"},{"key":"webgl_max_viewport_dims","value":"[16384, 16384]"},{"key":"webgl_unmasked_vendor","value":"Google Inc. (Intel)"},{"key":"webgl_unmasked_renderer","value":"ANGLE (Intel, Mesa Intel(R) Xe Graphics (TGL GT2), OpenGL ES 3.2)"},{"key":"webgl_vsf_params","value":"23,127,127,23,127,127,23,127,127"},{"key":"webgl_vsi_params","value":"0,31,30,0,31,30,0,31,30"},{"key":"webgl_fsf_params","value":"23,127,127,23,127,127,23,127,127"},{"key":"webgl_fsi_params","value":"0,31,30,0,31,30,0,31,30"},{"key":"webgl_hash_webgl","value":"ab8bb1a3f75e1f1792e3faa7f00b722f"},{"key":"user_agent_data_brands","value":"Not.A/Brand,Chromium,Brave"},{"key":"user_agent_data_mobile","value":false},{"key":"navigator_connection_downlink","value":null},{"key":"navigator_connection_downlink_max","value":null},{"key":"network_info_rtt","value":null},{"key":"network_info_save_data","value":null},{"key":"network_info_rtt_type","value":null},{"key":"screen_pixel_depth","value":24},{"key":"navigator_device_memory","value":1},{"key":"navigator_languages","value":"en-US"},{"key":"window_inner_width","value":0},{"key":"window_inner_height","value":0},{"key":"window_outer_width","value":1128},{"key":"window_outer_height","value":724},{"key":"browser_detection_firefox","value":false},{"key":"browser_detection_brave","value":true},{"key":"audio_codecs","value":"{\"ogg\":\"probably\",\"mp3\":\"probably\",\"wav\":\"probably\",\"m4a\":\"maybe\",\"aac\":\"probably\"}"},{"key":"video_codecs","value":"{\"ogg\":\"probably\",\"h264\":\"probably\",\"webm\":\"probably\",\"mpeg4v\":\"\",\"mpeg4a\":\"\",\"theora\":\"\"}"},{"key":"media_query_dark_mode","value":true},{"key":"headless_browser_phantom","value":false},{"key":"headless_browser_selenium","value":false},{"key":"headless_browser_nightmare_js","value":false},{"key":"document__referrer","value":""},{"key":"window__ancestor_origins","value":["https://chat.openai.com"]},{"key":"window__tree_index","value":[0]},{"key":"window__tree_structure","value":"[[]]"},{"key":"window__location_href","value":"https://tcr9i.chat.openai.com/v2/1.5.2/enforcement.64b3a4e29686f93d52816249ecbf9857.html#35536E1E-65B4-4D96-9D97-6ADB7EFF8147"},{"key":"client_config__sitedata_location_href","value":"https://chat.openai.com/"},{"key":"client_config__surl","value":"https://tcr9i.chat.openai.com"},{"key":"mobile_sdk__is_sdk"},{"key":"client_config__language","value":null},{"key":"navigator_battery_charging","value":true},{"key":"audio_fingerprint","value":"36.3949139806391"}]},{"key":"fe","value":["DNT:unknown","L:en-US","D:24","PR:1","S:2256,1504","AS:2256,1504","TO:-480","SS:true","LS:true","IDB:true","B:false","ODB:true","CPUC:unknown","PK:Linux x86_64","CFP:-1990083474","FR:false","FOS:false","FB:false","JSF:Andale Mono,Arial,Arial Black,Calibri,Cambria,Comic Sans MS,Courier,Courier New,Georgia,Helvetica,Impact,MS Gothic,MS PGothic,Times,Times New Roman,Trebuchet MS,Verdana","P:Brave PDF Viewer,JavaScript document plug-in,euAn6d1,g3EpUSRI","T:0,false,false","H:3","SWF:false"]},{"key":"ife_hash","value":"4932422eb567a9fa3082f32e495e8f80"},{"key":"cs","value":1},{"key":"jsbd","value":"{\"HL\":7,\"NCE\":true,\"DT\":\"\",\"NWD\":\"false\",\"DOTO\":1,\"DMTO\":1}"}]`,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' + <time>))

Even simpler:

const fun = require("funcaptcha");
async function main() {
  const token = await fun.getToken({
    pkey: "35536E1E-65B4-4D96-9D97-6ADB7EFF8147", // The public key
    surl: "https://tcr9i.chat.openai.com ", // OPTIONAL: Some websites can have a custom service URL
    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://chat.openai.com", // OPTIONAL: The site parameter, usually not required
  });
  console.log(token);
}
main();

I'll be writing up an open source endpoint for fetching the BDA and stuff soon

wong2 commented

Great

I'll be writing up an open source endpoint for fetching the BDA and stuff soon

I've written a golang implementa tion of js funcaptcha. It work for me.

I'm not sure but I think it seems to break down again now.

With the same exception of
"OpenAI: {"detail":"Our systems have detected unusual activity from your system. Please try again later."} (code: 403)"

@acheong08 Could you check this when you are free? Thanks a lot.

Now it's 403 again. Could you please take a look.Thanks a lot.
@acheong08

looks like browser automation is the only sane way

It works again! Thank you.

It works again! Thank you.

breaks down again @acheong08

yes, everytime I try to use this repo, this error occurs again xD

It's working for now. I'm working on another implementation as well. Using endpoint provided by @linweiyuan via browser automation

Thanks to @flyingpot and @linweiyuan, I've got a local version working again.

Method:
Browser debug: https://linweiyuan.github.io/2023/06/24/%E5%A6%82%E4%BD%95%E7%94%9F%E6%88%90-GPT-4-arkose-token.html

Go implementation of ALFCCJS.encrypt by @flyingpot

The TL;DR of why the original funcaptcha implementation doesn't work anymore is due to added fingerprints and capi parameters in the form

Edit: It seems it works locally but not on my server? Perhaps server blacklisted?

I'll try hosting a separate endpoint to fetch the token and see if anything changes

Edit 2: Might have just been a typo

Edit: Forgot a timestamp

ChatGPT-Proxy-V4 works fine

This should keep working:
https://github.com/acheong08/ChatGPT-Proxy-V4/releases/tag/1.6.2

I missed a timestamp on the previous version

Edit: https://github.com/acheong08/ChatGPT-Proxy-V4/releases/tag/1.6.3 (Missed actually updating the timestamp)

There are now two mysteries to me left:

{
    "key": "wh",
    "value": "8bd9d6f9d9631d44e00e0d08202329b4|5ab5738955e0611421b686bc95655ad0"
  }

and

{ "key": "f", "value": "68bcbb9730494c5eef591ebf0b2ff666" }

in bx

@linweiyuan any hints?

(These two variables don't seem to have an effect though. They're MD5 hashes of something)

Need to check.

Per my tests, from yesterday night till now (UTC+08:00), if I pass null or just "abc" for arkose_token, still work, with different account, different IPs.

Did they relax security again?

Confirmed: Passing anything as arkose token works.

Bruh they keep trolling us

Honeypot.

sunner commented

Is OpenAI debugging or phishing? They have bad records on banning accounts.

As @linweiyuan pointed out, there is a possibility that this is a honeypot (they keep track of invalid access but do nothing for now, then ban later on)

Just in case, I have opted to continue passing along a valid arkose_token

Another possibility is that they are updating the captcha since we've already figured it out

Maybe failed again? (same 403 Error)
@acheong08
Could you please check when you are free? Thanks a lot.

yes this is happening again... cat & mouse game with openai

Fixed

Seems like I fixed it but forgot to bump dependency version

gchust commented

Seems like I fixed it but forgot to bump dependency version

Works now, thanks a lot!

gchust commented

Not working again! πŸ˜΅β€πŸ’«

gchust commented

There are now two mysteries to me left:

{
    "key": "wh",
    "value": "8bd9d6f9d9631d44e00e0d08202329b4|5ab5738955e0611421b686bc95655ad0"
  }

and

{ "key": "f", "value": "68bcbb9730494c5eef591ebf0b2ff666" }

in bx

@linweiyuan any hints?

(These two variables don't seem to have an effect though. They're MD5 hashes of something)

This can be retrieved by the following funcapture's js function (new ArkoseEnforcement()).fc_fp.getFP
We can get them by running the following codes in the browser's console.

image

Not sure if it is possible to run this function in a headless browser and get those values from there. πŸ˜΅β€πŸ’«

The f: https://github.com/flyingpot/funcaptcha/blob/main/fingerprint.go#L347-L364

The wh: getWindowHash()|getWindowProtoChainHash() (have not find out them yet)

image

What does it say in english?

β€œPlease answer this question to prove that you are a real person.”

They want to fuck us up, its a limit of 25 messages per 3 hours, why they now start this shit ...

I have tried using a proxy IP pool, but after each IP obtains a certain quantity of arkose_token(which is actually not a large amount), manual completion of the captcha is always required.

Previously, an arkose_token could be used repeatedly for a certain period of time or number of times. However, now it can only be used once.

Therefore, for a large number of requests, the problem can only be solved if the IP pool is extremely large. Additionally, the traffic consumed per request due to the bda issue will also be very costly.

So I guess its over now ... well it was a hell of a ride with you guys, and you did a great job