Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

a crappy overview on how to make discord webpack scripts (not betterdiscord scripts but rather actual reverse engineering stuff)

NotificationsYou must be signed in to change notification settings

shidemuri/discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

a crappy overview on how to make discord webpack scripts (not betterdiscord scripts but rather actual reverse engineering stuff)

idk shit about webpack all of this is from personal experience

Before anything (if you are on the desktop client):

go to%appdata%\discord\settings.json and add

"DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING":true

to the end of the object, it allows the developer console to be opened with ctrl+shift+i

actual "tutorial"

Alright so:Discord runs mainly on Electron, React and webpack

almost every single discord feature is accessible from the

window.webpackChunkdiscord_app

array, which contains every single webpack functions and stuff that discord relies on

"but hey dude how in the world am i supposed to actually abuse it its jsut a gigantic bunch of [[1231313],{123123213:fafasfasdfsf},()=>{}]"

simple:

window.webpackChunkdiscord_app.push([[Math.random()],{},(req)=>{}])

when pushing this array into the webpackChunk, the(req)=>{} function will instantly execute

thereq thing is a function that you can pass a number to it, and it returns an object whose contents may vary a lot

however:

doingreq.c returns an object with every single function-holding object loaded (which is where all the functions are)it looks something like:

{  NUMERIC_ID:{    exports:{//there may be other object with a random 1-3 letter name such as Z, Plq, ZP or whatever//thats where the functions actually are}    id:NUMERIC_ID,//note: passing the id to the `req` function returns the `exports` object//personally, since discord updates a lot i dont rely on using this number because it can update//i just search though the object insteadloaded:true}}

so, for example:

window.webpackChunkdiscord_app.push([[Math.random()],{},(req)=>{for(constthingofreq.c){if(thing.exports.Z.getCurrentUser){returnthing.exports.Z}}}])/*{  commands: {...},  events: {...},  getCurrentUser: f(), //this one is interesting  getJoi: f(),  onConnect: f(e),  onDisconnect: f(e,t),  sockets: Set(0) {size: 0},  subscriptions: []}and getCurrentUser returns all the information for your currently logged in user (except for token)*/// and for the token:window.webpackChunkdiscord_app.push([[Math.random()],{},(req)=>{for(constthingofreq.c){if(thing.exports.Z.getToken){returnthing.exports.Z.getToken()}}}])//returns the token :)

There are many snippets out there, i will include some tomorrow, but for now, if you want to further analyze the webpack script source code easily (the discord app one is minified), useDiscord-Datamining

some snippets i have

1. clyde saying the funny

letamongus;window.webpackChunkdiscord_app.push([[Math.random()],{},(a)=>{amongus=a}])Object.values(amongus.c).find(x=>x.exports?.Z?.sendBotMessage).exports.Z.sendBotMessage(window.location.pathname.slice(10).split('/')[1],'mongus balls')

clyd

2. tells you if you have embed failure (no EMBED_LINKS permission)

letamongus;window.webpackChunkdiscord_app.push([[Math.random()],{},(a)=>{amongus=a}]);constperms=Object.values(amongus.c).find(x=>x.exports?.Plq).exports.Plq;constchannel=Object.values(amongus.c).find(x=>x.exports?.Z?.getDMChannelFromUserId).exports.Z.getChannel(window.location.pathname.match(/\d+/g)[1])constpiss=Object.values(amongus.c).find(x=>x.exports?.Z?.canAccessGuildSettings).exports.Z.can(perms.EMBED_LINKS,channel)console.log(piss ?'you dont have embed failure big W' :'you have embed failure big LLLLLLLL')

3. message spam (be careful with this)

constrepeat=20;constmessage='amongus'letamongus;window.webpackChunkdiscord_app.push([[Math.random()],{},(req)=>{amongus=Object.values(req.c)}])constsend=amongus.find(x=>x.exports?.Z?.sendMessage).exports.Z.sendMessageconstid=window.location.pathname.slice(10).split('/')[1]for(leti=0;i<repeat;i++)send(id,{content:message,invalidEmojis:[],tts:false,validNonShortcutEmojis:[]})

20 amongus messages

4. create quick friend invite link

window.webpackChunkdiscord_app.push([[Math.random()],{},async(r)=>{DiscordNative.clipboard.copy(`https://discord.gg/${(awaitObject.values(r.c).find(x=>x.exports?.Z?.createFriendInvite).exports.Z.createFriendInvite()).code}`)}])

invite

5. stop showing "*yourself* is typing..."

window.webpackChunkdiscord_app.push([[Math.random()],{},r=>{Object.values(r.c).find(x=>x.exports?.Z?.startTyping).exports.Z.startTyping=()=>{}}])

About

a crappy overview on how to make discord webpack scripts (not betterdiscord scripts but rather actual reverse engineering stuff)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp