Skip to content

Commit

Permalink
update generateProofToken (josStorer#713, josStorer#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer authored and missdeer committed Jun 3, 2024
1 parent 295e64c commit 6dab64c
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions src/services/apis/chatgpt-web.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,43 @@ export async function getArkoseToken(config) {
}

// https://github.com/tctien342/chatgpt-proxy/blob/9147a4345b34eece20681f257fd475a8a2c81171/src/openai.ts#L103
// https://github.com/zatxm/aiproxy
function generateProofToken(seed, diff, userAgent) {
const cores = [8, 12, 16, 24]
const screens = [3000, 4000, 6000]
const cores = [1, 2, 4]
const screens = [3008, 4010, 6000]
const reacts = [
'_reactListeningcfilawjnerp',
'_reactListening9ne2dfo1i47',
'_reactListening410nzwhan2a',
]
const acts = ['alert', 'ontransitionend', 'onprogress']

const core = cores[randomInt(0, cores.length)]
const screen = screens[randomInt(0, screens.length)]
const screen = screens[randomInt(0, screens.length)] + core
const react = cores[randomInt(0, reacts.length)]
const act = screens[randomInt(0, acts.length)]

const parseTime = new Date().toString()

const config = [core + screen, parseTime, 4294705152, 0, userAgent]

const diffLen = diff.length / 2

for (let i = 0; i < 100000; i++) {
const config = [
screen,
parseTime,
4294705152,
0,
userAgent,
'https://tcr9i.chat.openai.com/v2/35536E1E-65B4-4D96-9D97-6ADB7EFF8147/api.js',
'dpl=1440a687921de39ff5ee56b92807faaadce73f13',
'en',
'en-US',
4294705152,
'plugins−[object PluginArray]',
react,
act,
]

const diffLen = diff.length

for (let i = 0; i < 200000; i++) {
config[3] = i
const jsonData = JSON.stringify(config)
// eslint-disable-next-line no-undef
Expand Down

0 comments on commit 6dab64c

Please sign in to comment.