ahmadbader123

raw

Jul 27th, 2025
133
0
364 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.06 KB | Cryptocurrency | 0 0
  1. delete window.$;
  2. let wpRequire = webpackChunkdiscord_app.push([[Symbol()], {}, r => r]);
  3. webpackChunkdiscord_app.pop();
  4.  
  5. let ApplicationStreamingStore = Object.values(wpRequire.c).find(x => x?.exports?.Z?.__proto__?.getStreamerActiveStreamMetadata).exports.Z;
  6. let RunningGameStore = Object.values(wpRequire.c).find(x => x?.exports?.ZP?.getRunningGames).exports.ZP;
  7. let QuestsStore = Object.values(wpRequire.c).find(x => x?.exports?.Z?.__proto__?.getQuest).exports.Z;
  8. let ChannelStore = Object.values(wpRequire.c).find(x => x?.exports?.Z?.__proto__?.getAllThreadsForParent).exports.Z;
  9. let GuildChannelStore = Object.values(wpRequire.c).find(x => x?.exports?.ZP?.getSFWDefaultChannel).exports.ZP;
  10. let FluxDispatcher = Object.values(wpRequire.c).find(x => x?.exports?.Z?.__proto__?.flushWaitQueue).exports.Z;
  11. let api = Object.values(wpRequire.c).find(x => x?.exports?.tn?.get).exports.tn;
  12.  
  13. let quest = [...QuestsStore.quests.values()].find(x => x.id !== "1248385850622869556" && x.userStatus?.enrolledAt && !x.userStatus?.completedAt && new Date(x.config.expiresAt).getTime() > Date.now())
  14. let isApp = typeof DiscordNative !== "undefined"
  15. if(!quest) {
  16.     console.log("You don't have any uncompleted quests!")
  17. } else {
  18.     const pid = Math.floor(Math.random() * 30000) + 1000
  19.    
  20.     const applicationId = quest.config.application.id
  21.     const applicationName = quest.config.application.name
  22.     const questName = quest.config.messages.questName
  23.     const taskConfig = quest.config.taskConfig ?? quest.config.taskConfigV2
  24.     const taskName = ["WATCH_VIDEO", "PLAY_ON_DESKTOP", "STREAM_ON_DESKTOP", "PLAY_ACTIVITY", "WATCH_VIDEO_ON_MOBILE"].find(x => taskConfig.tasks[x] != null)
  25.     const secondsNeeded = taskConfig.tasks[taskName].target
  26.     let secondsDone = quest.userStatus?.progress?.[taskName]?.value ?? 0
  27.  
  28.     if(taskName === "WATCH_VIDEO" || taskName === "WATCH_VIDEO_ON_MOBILE") {
  29.         const maxFuture = 10, speed = 7, interval = 1
  30.         const enrolledAt = new Date(quest.userStatus.enrolledAt).getTime()
  31.         let completed = false
  32.         let fn = async () => {         
  33.             while(true) {
  34.                 const maxAllowed = Math.floor((Date.now() - enrolledAt)/1000) + maxFuture
  35.                 const diff = maxAllowed - secondsDone
  36.                 const timestamp = secondsDone + speed
  37.                 if(diff >= speed) {
  38.                     const res = await api.post({url: `/quests/${quest.id}/video-progress`, body: {timestamp: Math.min(secondsNeeded, timestamp + Math.random())}})
  39.                     completed = res.body.completed_at != null
  40.                     secondsDone = Math.min(secondsNeeded, timestamp)
  41.                 }
  42.                
  43.                 if(timestamp >= secondsNeeded) {
  44.                     break
  45.                 }
  46.                 await new Promise(resolve => setTimeout(resolve, interval * 1000))
  47.             }
  48.             if(!completed) {
  49.                 await api.post({url: `/quests/${quest.id}/video-progress`, body: {timestamp: secondsNeeded}})
  50.             }
  51.             console.log("Quest completed!")
  52.         }
  53.         fn()
  54.         console.log(`Spoofing video for ${questName}.`)
  55.     } else if(taskName === "PLAY_ON_DESKTOP") {
  56.         if(!isApp) {
  57.             console.log("This no longer works in browser for non-video quests. Use the desktop app to complete the", questName, "quest!")
  58.         } else {
  59.             api.get({url: `/applications/public?application_ids=${applicationId}`}).then(res => {
  60.                 const appData = res.body[0]
  61.                 const exeName = appData.executables.find(x => x.os === "win32").name.replace(">","")
  62.                
  63.                 const fakeGame = {
  64.                     cmdLine: `C:\\Program Files\\${appData.name}\\${exeName}`,
  65.                     exeName,
  66.                     exePath: `c:/program files/${appData.name.toLowerCase()}/${exeName}`,
  67.                     hidden: false,
  68.                     isLauncher: false,
  69.                     id: applicationId,
  70.                     name: appData.name,
  71.                     pid: pid,
  72.                     pidPath: [pid],
  73.                     processName: appData.name,
  74.                     start: Date.now(),
  75.                 }
  76.                 const realGames = RunningGameStore.getRunningGames()
  77.                 const fakeGames = [fakeGame]
  78.                 const realGetRunningGames = RunningGameStore.getRunningGames
  79.                 const realGetGameForPID = RunningGameStore.getGameForPID
  80.                 RunningGameStore.getRunningGames = () => fakeGames
  81.                 RunningGameStore.getGameForPID = (pid) => fakeGames.find(x => x.pid === pid)
  82.                 FluxDispatcher.dispatch({type: "RUNNING_GAMES_CHANGE", removed: realGames, added: [fakeGame], games: fakeGames})
  83.                
  84.                 let fn = data => {
  85.                     let progress = quest.config.configVersion === 1 ? data.userStatus.streamProgressSeconds : Math.floor(data.userStatus.progress.PLAY_ON_DESKTOP.value)
  86.                     console.log(`Quest progress: ${progress}/${secondsNeeded}`)
  87.                    
  88.                     if(progress >= secondsNeeded) {
  89.                         console.log("Quest completed!")
  90.                        
  91.                         RunningGameStore.getRunningGames = realGetRunningGames
  92.                         RunningGameStore.getGameForPID = realGetGameForPID
  93.                         FluxDispatcher.dispatch({type: "RUNNING_GAMES_CHANGE", removed: [fakeGame], added: [], games: []})
  94.                         FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
  95.                     }
  96.                 }
  97.                 FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
  98.                
  99.                 console.log(`Spoofed your game to ${applicationName}. Wait for ${Math.ceil((secondsNeeded - secondsDone) / 60)} more minutes.`)
  100.             })
  101.         }
  102.     } else if(taskName === "STREAM_ON_DESKTOP") {
  103.         if(!isApp) {
  104.             console.log("This no longer works in browser for non-video quests. Use the desktop app to complete the", questName, "quest!")
  105.         } else {
  106.             let realFunc = ApplicationStreamingStore.getStreamerActiveStreamMetadata
  107.             ApplicationStreamingStore.getStreamerActiveStreamMetadata = () => ({
  108.                 id: applicationId,
  109.                 pid,
  110.                 sourceName: null
  111.             })
  112.            
  113.             let fn = data => {
  114.                 let progress = quest.config.configVersion === 1 ? data.userStatus.streamProgressSeconds : Math.floor(data.userStatus.progress.STREAM_ON_DESKTOP.value)
  115.                 console.log(`Quest progress: ${progress}/${secondsNeeded}`)
  116.                
  117.                 if(progress >= secondsNeeded) {
  118.                     console.log("Quest completed!")
  119.                    
  120.                     ApplicationStreamingStore.getStreamerActiveStreamMetadata = realFunc
  121.                     FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
  122.                 }
  123.             }
  124.             FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
  125.            
  126.             console.log(`Spoofed your stream to ${applicationName}. Stream any window in vc for ${Math.ceil((secondsNeeded - secondsDone) / 60)} more minutes.`)
  127.             console.log("Remember that you need at least 1 other person to be in the vc!")
  128.         }
  129.     } else if(taskName === "PLAY_ACTIVITY") {
  130.         const channelId = ChannelStore.getSortedPrivateChannels()[0]?.id ?? Object.values(GuildChannelStore.getAllGuilds()).find(x => x != null && x.VOCAL.length > 0).VOCAL[0].channel.id
  131.         const streamKey = `call:${channelId}:1`
  132.        
  133.         let fn = async () => {
  134.             console.log("Completing quest", questName, "-", quest.config.messages.questName)
  135.            
  136.             while(true) {
  137.                 const res = await api.post({url: `/quests/${quest.id}/heartbeat`, body: {stream_key: streamKey, terminal: false}})
  138.                 const progress = res.body.progress.PLAY_ACTIVITY.value
  139.                 console.log(`Quest progress: ${progress}/${secondsNeeded}`)
  140.                
  141.                 await new Promise(resolve => setTimeout(resolve, 20 * 1000))
  142.                
  143.                 if(progress >= secondsNeeded) {
  144.                     await api.post({url: `/quests/${quest.id}/heartbeat`, body: {stream_key: streamKey, terminal: true}})
  145.                     break
  146.                 }
  147.             }
  148.            
  149.             console.log("Quest completed!")
  150.         }
  151.         fn()
  152.     }
  153. }
Tags: dadad
Advertisement
Add Comment
Please, Sign In to add comment