Skip to content

Instantly share code, notes, and snippets.

@supersonictw
Last active September 28, 2021 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supersonictw/1256d731663f6898f992ff5828f3272b to your computer and use it in GitHub Desktop.
Save supersonictw/1256d731663f6898f992ff5828f3272b to your computer and use it in GitHub Desktop.
The inject script for popcat.click to help Taiwan get No.1.
(function(){
const app = document.getElementById("app").__vue__;
setInterval(()=>{
app.bot=false;
app.accumulator = 800;
}, 5);
})();
@LianSheng197
Copy link

不確定原始碼寫在哪,但是 counter 沒有變動的話似乎不會觸發 sendStats。
因此基於大大提供的原始碼,我改成這樣:

(function(){
    const app = document.getElementById("app").__vue__;
	
    let id = setInterval(() => {
        // 避免抓到 undefined
        if(app.counter) {
            clearInterval(id);

            let c = app.counter + 800;

            setInterval(() => {
                c += 800;
            }, 30000);

            setInterval(() => {
                app.bot = false;
                app.counter = c;
                app.accumulator = 800;
            }, 5);
        }
    }, 10);
})();

@supersonictw
Copy link
Author

其實只改accumulator的話,sendStats仍然會被觸發,
sendStats的條件,實質上只有accumulatorbot
counter是為了累計觸發次數設立的,只應用於顯示觸發次數,
還是感謝你的貢獻就是((

歡迎一起按貓貓 /

@LianSheng197
Copy link

是噢?因爲我拿原本大大的程式碼去試
從 XHR 去看是看不到有送出請求的... 所以才想說是不是有檢測 counter

@Suferr
Copy link

Suferr commented Sep 28, 2021


THIS SCRIPT GET 1000 POPS
var event = new KeyboardEvent('keydown', {
key: 'g',
ctrlKey: true
});

setInterval(function(){
for (i = 0; i < 1000; i++) {
document.dispatchEvent(event);
}
}, 0);250

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