Skip to content

Instantly share code, notes, and snippets.

@ExordiumX
Created November 28, 2021 16:18
Show Gist options
  • Save ExordiumX/540b0ccf093a5ade1986c33aa415a92e to your computer and use it in GitHub Desktop.
Save ExordiumX/540b0ccf093a5ade1986c33aa415a92e to your computer and use it in GitHub Desktop.
Object.defineProperty((webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.isDeveloper!==void 0).exports.default,"isDeveloper",{get:()=>true});
@RadioActive1221
Copy link

IT WORKS
JUST FOLLOW THE STEPS

@soumash
Copy link

soumash commented Apr 1, 2022

Yeah! It works for me

@Just-a-Unity-Dev
Copy link

Can you send the unobfuscated version (the pretty printed) version? I want to see how this code truly works, rather than a shitty webpacked version

@Just-a-Unity-Dev
Copy link

Author hasn't responded, so I started to de-obfuscate it myself. Progress so far.

// define a property in an object
Object.defineProperty(
    (
        // push values to webpackChunkdiscord_app
        webpackChunkdiscord_app.push(
            [
                [''], // empty array??? mfw???
                {}, // empty object??? mfw???????
                e => { // function
                    m=[]; // declare m as an array
                    for(let c in e.c) 
                        m.push(e.c[c])
                    }
            ]
        ),
        // finish defining property
        m
    ).find( // in this tuple, find object
        m=>m
        .exports
        .default
        .isDeveloper !==void 0
    )
    .exports
    .default,
        "isDeveloper",
        {get:()=>true}
);

@casualdegenerate
Copy link

I don't know why they made it one line either, it's a bit weird :/

@ari-party
Copy link

I don't know why they made it one line either, it's a bit weird :/

Just so it's more tiny

@mm12
Copy link

mm12 commented Aug 13, 2022

started getting this, I don't know when it started but it is present in Stable 141471 and Canary 140832

Uncaught TypeError: Cannot redefine property: isDeveloper
    at Function.defineProperty (<anonymous>)
    at <anonymous>:1:8```

@ari-party
Copy link

I believe it's unsupported now

@Andreytreyy
Copy link

BC3C4E4E-CFBC-442F-958B-DECC84C64A04
Can you help me about wrong?

@PABessero
Copy link

@Andreytreyy in case you're still looking to get it: https://gist.github.com/JohannesMP/afdf27383608c3b6f20a6a072d0be93c
The last one works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment