botta

try to take over the world!2

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         botta
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  try to take over the world!2
// @author       You
// @match        https://www.nitrotype.com/race/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant        GM.xmlHttpRequest
// ==/UserScript==

(function() {
    'use strict';
    function race(user){
     const findReact = (dom, traverseUp = 0) => {
    const key = Object.keys(dom).find((key) => key.startsWith("__reactFiber$"))
    const domFiber = dom[key]
    if (domFiber == null) return null
    const getCompFiber = (fiber) => {
        let parentFiber = fiber?.return
        while (typeof parentFiber?.type == "string") {
            parentFiber = parentFiber?.return
        }
        return parentFiber
    }
    let compFiber = getCompFiber(domFiber)
    for (let i = 0; i < traverseUp && compFiber; i++) {
        compFiber = getCompFiber(compFiber)
    }
    return compFiber?.stateNode
}
    var token = 0
GM.xmlHttpRequest({
  method: "POST",
    url: "https://www.nitrotype.com/api/v2/auth/login/username/?username="+user+"&password=hahaha",

  onload: function(response) {
    token=(JSON.parse(response.responseText)['results'])['token'];
    console.log(token)
    var ws = new WebSocket('wss://realtime2.nitrotype.com/realtime/?token='+token+'&transport=websocket')
    setInterval(function(){ws.send('4{"stream":"race","msg":"join","payload":{"trackLeader":"jointhenleave5","trackLeaderUserID":58293957,"update":"03417","cacheId":"cd6f0dbae179f99e0f6f446b56dbb5c890443631","cacheIdInteger":1650,"site":"nitrotype"}}')},1500);
    setInterval(function(){ws.send('4"primus::pong::'+Date.now()*1000+'"')},500);
      setInterval(function(){
 if (findReact(raceContainer)['server']['logs'].slice(-1)[0]['type']=='playerUpdate'){ws.send('4{"stream":"race","msg":"update","payload":'+JSON.stringify(findReact(raceContainer)['server']['logs'].slice(-1)[0]['data'])+'}')}},10);
  }
});
    }
        race('getandrewviews1526')
    race('getandrewviews1525')
    race('getandrewviews1524')
    race('getandrewviews1523')
})();