aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
799 stars 169 forks source link

Captch solver is not working #988

Closed jikesgonzalez closed 9 months ago

jikesgonzalez commented 9 months ago

Which package has the bugs?

The core library

Issue description

The captcha is not working correctly. I am getting the refresh my client message every time I complete a captcha, and even before completing it. This happens to me when trying to accept an invitation, with: await client.acceptInvite(invite)

Code sample

const client = new Client({
        captchaSolver: function (captcha, userAgent) {
            return cmcClient.Solve(new HCaptchaRequest({
                websiteURL: 'https://discord.com/channels/@me',
                websiteKey: captcha.captcha_sitekey,
                isInvisible: !!captcha.captcha_rqdata,
                data: captcha.captcha_rqdata,
                proxyType: 'http',
                proxyAddress: '148.251.5.30',
                proxyPort: 823,
                proxyLogin: '2f7a7eb3a671f3befec9',
                proxyPassword: 'ae453d701c00e436',
                userAgent,
            })).then(result => {
                result.solution.gRecaptchaResponse
            });
        },
        captchaRetryLimit: 3,
        checkUpdate: false,
        proxy: process.env.PROXY_URL,
    });

Package version

3.0.2

Node.js version

v20.10.0

Operating system

No response

Priority this issue should have

High (immediate attention needed)

Checklist

Additional Information

Logs:

Intento 1 fallido: You need to update your app to join this server. // This my console.log
b2b02ab5-7dae-4d6f-830e-7b55634c888b
hcaptcha
q8BvoL59YYKIo0kjvoN/zqotzwYgOhhczP4imfiBsIqUbRamR4wKl0W885gxPdolE+DEso9k5Yh9nUZ9/qVDZDZU3KxhXs00xKBT2mX/iuib4DaBpFsYJkS9cr6MB0yd8wizJlCq1quCnpPWCBvn4xUHPooQq4ClGiX0j2bP
IldsK0lCaFpzK3pkRDRtOFNxdk82S1FGRGFRQTgvVHJobVRMMG03RElzMHM5WjErc0d2K0xHSVZUSFVVN0NPM1pnSjd2Zmc9PUJvYTNHNkloL0lVV2ZuWWIi.ZaRXeQ.tooTXaTN6m2FOkMA4PBuQXw9P_Q
aiko-chan-ai commented 9 months ago
node test

      Logging on with a user token is unfortunately against the Discord
      `Terms of Service` <https://support.discord.com/hc/en-us/articles/115002192352>
      and doing so might potentially get your account banned.
      Use this at your own risk.
Provided token: <token>
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 456ms
[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 <id> | Resume url wss://gateway-us-east1-c.discord.gg.
[WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
[USER_REQUIRED_ACTION] All required actions have been completed.
[READY] Received 1 guilds, 0 large guilds
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
Ready! <username>#0
[WS => Shard 0] Heartbeat acknowledged, latency of 244ms.
Hit a captcha while executing a request (You need to update your app to join this server.)
    Method  : post
    Path    : /invites/mdmc
    Route   : /invites/mdmc
    Sitekey : b2b02ab5-7dae-4d6f-830e-7b55634c888b
    rqToken : IlFHTVhrZThvRGdvczJXdUpaS1JlSDkzbFBpNHkvY1ozcE5pcGdrWERtL1haTVJQcDU5a1ZqMEFrV1J4SXplQVU5UWFBNGc9PTBkYVBnUTFQY3VESlM1NHci.ZaUOmw.QcDllFvHkwrWnBAYceORBXes46E
Captcha details:
    Method  : post
    Path    : /invites/mdmc
    Route   : /invites/mdmc
    Key     : P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.hKdwYXNza2V5xQY9U2P1wLZ8k4uCzJOctP5LXbEY-NDy-72D7nKTO_Z9WuRLd2rqWMxtAPTAw6QSnxh2...
    rqToken : IlFHTVhrZThvRGdvczJXdUpaS1JlSDkzbFBpNHkvY1ozcE5pcGdrWERtL1haTVJQcDU5a1ZqMEFrV1J4SXplQVU5UWFBNGc9PTBkYVBnUTFQY3VESlM1NHci.ZaUOmw.QcDllFvHkwrWnBAYceORBXes46E
const Discord = require('discord.js-selfbot-v13');
const Captcha = require('2captcha');
const solver = new Captcha.Solver('<api>');

const client = new Discord.Client({
    captchaSolver: function (captcha, UA) {
        return solver
            .hcaptcha(captcha.captcha_sitekey, 'discord.com', {
                invisible: 1,
                userAgent: UA,
                data: captcha.captcha_rqdata,
            })
            .then((res) => res.data);
    },
});

client.on('debug', console.log);

client.on('ready', async (client) => {
    console.log('Ready!', client.user.tag);
    client.acceptInvite('mdmc');
});

client.login('token');

image

jikesgonzalez commented 9 months ago
Captura de pantalla 2024-01-15 a las 18 13 18
jikesgonzalez commented 9 months ago

@aiko-chan-ai look