acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28.01k stars 4.48k forks source link

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

Open SwimmingLiu opened 1 year ago

SwimmingLiu commented 1 year ago

Is there an existing issue for this?

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

gchust commented 1 year ago

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

acheong08 commented 1 year ago

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

Nadeus commented 1 year ago

Works fine in Europe, thanks!!!

hzlujunyi commented 1 year ago

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)"

luluhuhu commented 1 year ago

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

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

Looks like I might have to do some browser automation

acheong08 commented 1 year ago

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

{"ct":"/vfjnTlE3ZVKglS/2rXeoeDwcgCsKl/RgwpfExRQ90DTC+FYeFy4ZSzAsGJ9AiHCZ4NILmiMlF9I9tjTMB3K320yPa8/BRyPAU9fR8eaexyLH9XmXWF9ccO0aOD6fZf12nuUAp60x8ZZaX0mL6pF/F8ZQP0iyzg6dmQ77Xg0HCMCbEJYR9kavnknUSydOKNWtdGHNxNnNuvsxm2Qlpwq0+joshVwwHHJqlOUJHS9cC3dGEmFleWWQXwFz9Vx0EF8GtZJ9122n+CAkG0H6wi1cbbBUsyQWk9kl+KDy3O1t5+FsGf+F9pThpECMgcxPiJuf1aCtUbKIOmvpIHwYAcsWTOV3sNDf9yfJ5GnR7ZEBUGur4oz5UKJrp1B2xFrGfIkl4Vc8kFAFl4aoY5Uhf6k7c5Itj2XOjdbl5kPLlxFiRr+WqVFxexWtisNQrJ9vPwWGNxGGWi926UrkF4rwJV8SgOOPHPUfDobY8ezZRMuiQv8TPV84/LwDp2MuLaEJl0G/kyHMfxAyyLYbYJw3wXJ26pqfhvxasJfEQ2Q+IpNwQrnTx9PAV4C5nk832jujCOXAOnUwl8YBRSl/8pYgl+X/JJs+pgACBbKz9CX/ARAlDy4hzULMDtCpmiGWcOhQIkVOcPRGpEfef/0RGc0XfztcZMeDjaVWXnImELaRdfZ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hQkvD9lozzs9ZkiPXwcsF6BOf2r5/DjCZRFQxoc0fLGKZ3kDtUa1euxUsTpqZ2MoZevPkXY09ff0bAXGEG8EWapTHLTkWTy+zx4SU41WFNjSvXuX6x2D8f/oGg/ER1WV80nbZ0PjyncyG7VqC8QNgTHdq4DzW38/19PRor8BU/PEZT8V6pvqK2mHQIFci75/c6yj5c/KDyJ6orftgccn//KtCDYDngZYdTSoiQI0rec6r9UltfX4","iv":"105fe368222748c1264b91bc33b007db","s":"7b9a4247f3ba1451"}
acheong08 commented 1 year ago

To think I found the answer in a roblox repo https://github.com/search?q=repo%3Anoahcoolboy%2Ffuncaptcha+encrypt&type=code

acheong08 commented 1 year ago

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>))
acheong08 commented 1 year ago

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();
acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

https://github.com/acheong08/arkose-generator

wong2 commented 1 year ago

Great

flyingpot commented 1 year ago

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.

hzlujunyi commented 1 year ago

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.

luluhuhu commented 1 year ago

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

acheong08 commented 1 year ago

looks like browser automation is the only sane way

hzlujunyi commented 1 year ago

It works again! Thank you.

hzlujunyi commented 1 year ago

It works again! Thank you.

breaks down again @acheong08

Daedra22 commented 1 year ago

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

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

Edit 2: Might have just been a typo

acheong08 commented 1 year ago

Edit: Forgot a timestamp

mygit-2023 commented 1 year ago

ChatGPT-Proxy-V4 works fine

acheong08 commented 1 year ago

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)

acheong08 commented 1 year ago

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)

linweiyuan commented 1 year ago

Need to check.

linweiyuan commented 1 year ago

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.

acheong08 commented 1 year ago

Did they relax security again?

acheong08 commented 1 year ago

Confirmed: Passing anything as arkose token works.

Bruh they keep trolling us

linweiyuan commented 1 year ago

Honeypot.

sunner commented 1 year ago

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

acheong08 commented 1 year ago

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)

acheong08 commented 1 year ago

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

acheong08 commented 1 year ago

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

hzlujunyi commented 1 year ago

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

badgeek commented 1 year ago

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

acheong08 commented 1 year ago

Fixed

acheong08 commented 1 year ago

Seems like I fixed it but forgot to bump dependency version

gchust commented 1 year ago

Seems like I fixed it but forgot to bump dependency version

Works now, thanks a lot!

gchust commented 1 year ago

Not working again! 😵‍💫

gchust commented 1 year ago

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. 😵‍💫

linweiyuan commented 1 year ago

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

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

Daedra22 commented 1 year ago
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 ...

Daedra22 commented 1 year ago

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