Closed jikesgonzalez closed 4 months ago
but it does not work for me. Mabye the tokens quality?
I think so too, because my tokens are from 2021
oh, ill try
i get this error on newer tokens too
try v3.1.3 ;-;
yea, it works. manny thanks aiko
This seems to be happening again on v3.1.4.
(Not my screenshots)
Hey, I've found the cause.
JA3 fingerprinting is causing this. I've collected some documentation which might help. I will keep this comment updated if I find more.
https://medium.com/cu-cyber/impersonating-ja3-fingerprints-b9f555880e42 https://github.com/Danny-Dasilva/CycleTLS
I might see if I can add this under a client option and people can see if it works better or worse
I might see if I can add this under a client option and people can see if it works better or worse
Node.js adds its own ciphers and it's almost impossible to modify the EDCH curve points.
These are the properties we need to modify in order to spoof the JA3 hash. The first one is not a problem, but then we run into issues with ciphers as Node.js adds "TLS_EMPTY_RENEGOTIATION_INFO_SCSV" to the ciphers no matter the override.
The only viable option I can think of is to host a TLS server internally and use it through an https agent (example: https://github.com/Arteha/tcp-tls-tunnel)
maybe nodejs will implement it
Node.js needs OpenSSL to implement it: https://github.com/openssl/openssl/issues/19220#issuecomment-2034562468
@TheDevYellowy what if we implement cycle-tls only for the invites url path? This could be a solution although it is rather hacky as the API for cycle-tls is different.
Nevermind, it seems like we have been overcomplicating this.
@aiko-chan-ai Please implement these changes to fix this issue:
Set the User-Agent in the library to Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.310 Chrome/120.0.6099.291 Electron/28.2.7 Safari/537.36
The default properties should be:
{
"os": "Windows",
"browser": "Discord Client",
"release_channel": "canary",
"client_version": "1.0.310",
"os_version": "10.0.22635",
"os_arch": "x64",
"app_arch": "x64",
"system_locale": "en-GB",
"browser_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.310 Chrome/120.0.6099.291 Electron/28.2.7 Safari/537.36",
"browser_version": "28.2.7",
"client_build_number": 282037,
"native_build_number": 46216,
"client_event_source": null
}
X-Super-Properties header should be a base64 version of the above which would be eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiRGlzY29yZCBDbGllbnQiLCJyZWxlYXNlX2NoYW5uZWwiOiJjYW5hcnkiLCJjbGllbnRfdmVyc2lvbiI6IjEuMC4zMTAiLCJvc192ZXJzaW9uIjoiMTAuMC4yMjYzNSIsIm9zX2FyY2giOiJ4NjQiLCJhcHBfYXJjaCI6Ing2NCIsInN5c3RlbV9sb2NhbGUiOiJlbi1HQiIsImJyb3dzZXJfdXNlcl9hZ2VudCI6Ik1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIGRpc2NvcmQvMS4wLjMxMCBDaHJvbWUvMTIwLjAuNjA5OS4yOTEgRWxlY3Ryb24vMjguMi43IFNhZmFyaS81MzcuMzYiLCJicm93c2VyX3ZlcnNpb24iOiIyOC4yLjciLCJjbGllbnRfYnVpbGRfbnVtYmVyIjoyODIwMzcsIm5hdGl2ZV9idWlsZF9udW1iZXIiOjQ2MjE2LCJjbGllbnRfZXZlbnRfc291cmNlIjpudWxsfQ==
(better if this is done programmatically)
It would be even better if the client_build_number was automatically fetched from canary.discord.com/app like the example I pointed out above. It seems that this is already being added: https://github.com/aiko-chan-ai/discord.js-selfbot-v13/pull/1122
This can be adapted for the stable client. But do keep in mind for future issues opened in this repository from users: If the X-Super-Properties header or websocket properties are overridden to something non-compatible, this issue will come up.
Can u make a pr ?
I'll make a function like how discum does where it programmatically makes the X-Super-Properties header in case people want to change the ws.properties option
I lied, we already do it in the APIRequest.js file
fixed
Which package has the bugs?
The core library
Issue description
I have tried with various bots in various guilds, but... it does not work. And the worse is that after this, all the tokens became invalid.
Code sample
Package version
3.0.2
Node.js version
v20.10.0
Operating system
Linux
Priority this issue should have
Medium (should be fixed soon)
Checklist
Additional Information
Provided token: MTE3MzIyMDI2Njk2NTQ3OTUzNg.GSsPuv.** Preparing to connect to the gateway... [WS => Manager] Fetched Gateway Information URL: wss://gateway.discord.gg Recommended Shards: 1 [WS => Manager] Session Limit Information Total: Infinity Remaining: Infinity [WS => Manager] Spawning shards: 0 [WS => Shard 0] [CONNECT] Gateway : wss://gateway.discord.gg/ Version : 9 Encoding : json Compression: none Agent : false [WS => Shard 0] Setting a HELLO timeout for 20s. [WS => Shard 0] [CONNECTED] Took 141ms [WS => Shard 0] Clearing the HELLO timeout. [WS => Shard 0] Setting a heartbeat interval for 41250ms. [WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: undefined [WS => Shard 0] [READY] Session 636e7a6f451ca40e10392f8a92988cd0 | Resume url wss://gateway-us-east1-d.discord.gg. [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat. [USER_REQUIRED_ACTION] All required actions have been completed. [READY] Received 0 guilds, 0 large guilds [WS => Shard 0] Shard received all its guilds. Marking as fully ready. Ready! dreadael [WS => Shard 0] Heartbeat acknowledged, latency of 112ms. /root/joiner/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:390 throw new DiscordAPIError(data, res.status, request); ^
DiscordAPIError: Unknown Message at RequestHandler.execute (/root/joiner/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:390:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RequestHandler.push (/root/joiner/node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js:62:14) at async Client.acceptInvite (/root/joiner/node_modules/discord.js-selfbot-v13/src/client/Client.js:557:5) at async Client. (file:///root/joiner/test.mjs:25:2) {
method: 'post',
path: '/invites/mdmc',
code: 10008,
httpStatus: 403,
requestData: {
json: { session_id: '636e7a6f451ca40e10392f8a92988cd0' },
files: [],
headers: undefined
},
retries: 0,
captcha: null
}
Node.js v20.10.0