Skip to content

Commit

Permalink
Updated GPTforLove API encryption key, added more headers to `api.cre…
Browse files Browse the repository at this point in the history
…ateHeaders()` ↞ [auto-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jul 29, 2024
1 parent f461a49 commit 84b047a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.7.29.2
// @version 2024.7.29.3
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -2190,7 +2190,7 @@
let nn = Math.floor(new Date().getTime() / 1e3)
const fD = e => {
let t = CryptoJS.enc.Utf8.parse(e),
o = CryptoJS.AES.encrypt(t, 'brhbtehbwrb3274grhvHR诶ur3i', {
o = CryptoJS.AES.encrypt(t, decodeURI('woVB%E7%B2%97%E8%AF%B6%E7%9B%91%E7%9D%A3%E4%BA%BAenfje'), {
mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7
})
return o.toString()
Expand Down Expand Up @@ -2238,14 +2238,18 @@
createHeaders(api) {
const ip = ipv4.generate({ verbose: false })
const headers = {
'Accept': 'application/json, text/plain, */*', 'Accept-Encoding': 'gzip, deflate, br, zstd',
'Accept': /MixerBox|OpenAI/.test(api) ? '*/*' : 'application/json, text/plain, */*',
'Accept-Encoding': 'gzip, deflate, br, zstd',
'Connection': 'keep-alive', 'Content-Type': 'application/json', 'DNT': '1',
'Host': new URL(apis[api].endpoint).hostname, 'Origin': apis[api].expectedOrigin,
'X-Forwarded-For': ip, 'X-Real-IP': ip
'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': (
api == 'AIchatOS' ? 'cross-site' : api == 'MixerBox AI' ? 'same-origin' : 'same-site' ),
'TE': 'trailers', 'X-Forwarded-For': ip, 'X-Real-IP': ip
}
headers.Referer = headers.Origin + '/'
if (api != 'MixerBox AI') headers.Priority = `u=${ api == 'OpenAI' ? 4 : 0 }`
if (api == 'OpenAI') headers.Authorization = 'Bearer ' + config.openAIkey
else if (api == 'MixerBox AI') { headers.Accept = '*/*' ; headers['Alt-Used'] = headers.Host }
else if (api == 'MixerBox AI') headers['Alt-Used'] = headers.Host
return headers
},

Expand Down

0 comments on commit 84b047a

Please sign in to comment.