shamhi / HamsterKombatBot

Bot that mines coins in HamsterKombat
Apache License 2.0
770 stars 233 forks source link

Please create the same bot for the game moonbix (binance) #2419

Closed Theslandybrain closed 1 month ago

Theslandybrain commented 1 month ago

прошу для кого актуально оставлять реакции

WeNuLLApp commented 1 month ago

Need make payload first😅

lolyinseo commented 1 month ago

нахер не нужно, тк вывод будет скорее всего только на акк бинанса

slavon141 commented 1 month ago

Please, please please please 🙏🥺🥺🥺

kics223w1 commented 1 month ago
class MoonbixBot {
  sleep(time) {
    return new Promise((resolve) => setTimeout(resolve, time));
  }

  run() {
    setInterval(async () => {
      const buttonPlayGame = this.findButtonPlayGame();
      if (!buttonPlayGame) {
        return;
      }

      const event = new MouseEvent("click", {
        bubbles: true,
        cancelable: true,
        view: window,
      });
      buttonPlayGame.dispatchEvent(event);

      await this.sleep(1000);

      for (let i = 0; i < 50; i++) {
        await this.sleep(1000);
        this.simulateLeftClick();
      }

      this.findReturnButtonElementsAndClick();

      await this.sleep(1500);
    }, 1000);
  }

  findButtonPlayGame() {
    const button = document.querySelector("[class^='Game_entry__playBtn']");
    if (button && button.textContent.trim().toLowerCase() === "play game") {
      const style = window.getComputedStyle(button);
      if (style.marginTop === "40px") {
        return button;
      }
    }
    return null;
  }

  findReturnButtonElementsAndClick() {
    const svgs = document.getElementsByTagName("svg");
    for (let svg of svgs) {
      // Check if the SVG matches the specified structure
      if (
        svg.outerHTML ===
        '<svg class="bn-svg absolute top-4 start-4 w-6 h-6" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.999 11.999l7.071-7.072 1.768 1.768-4.055 4.055H21v2.5H7.785l4.053 4.053-1.768 1.768L3 12v-.001z" fill="currentColor"></path></svg>'
      ) {
        const event = new MouseEvent("click", {
          bubbles: true,
          cancelable: true,
          view: window,
        });
        svg.dispatchEvent(event);
      }
    }
  }

  autoMining() {}

  simulateLeftClick() {
    const canvas = document.querySelector("canvas");
    console.error("Canvas: ", canvas);
    if (canvas) {
      const event = new MouseEvent("mousedown", {
        bubbles: true,
        cancelable: true,
        view: window,
        button: 0, // 0 indicates the left mouse button
      });
      canvas.dispatchEvent(event);

      const clickEvent = new MouseEvent("mouseup", {
        bubbles: true,
        cancelable: true,
        view: window,
        button: 0, // 0 indicates the left mouse button
      });
      canvas.dispatchEvent(clickEvent);

      canvas.dispatchEvent(
        new MouseEvent("click", {
          bubbles: true,
          cancelable: true,
          view: window,
          button: 0, // 0 indicates the left mouse button
        })
      );
    }
  }
}

const moonBixBot = new MoonbixBot();
moonBixBot.run();

How to use

  1. Launch game
  2. Right click -> Inspect element -> Change to Console View
  3. Paste this code and click Enter
  4. @slavon141 @lolyinseo @WeNuLLApp

Description

How to reach me

Theslandybrain commented 1 month ago
class MoonbixBot {
  sleep(time) {
    return new Promise((resolve) => setTimeout(resolve, time));
  }

  run() {
    setInterval(async () => {
      const buttonPlayGame = this.findButtonPlayGame();
      if (!buttonPlayGame) {
        return;
      }

      const event = new MouseEvent("click", {
        bubbles: true,
        cancelable: true,
        view: window,
      });
      buttonPlayGame.dispatchEvent(event);

      await this.sleep(1000);

      for (let i = 0; i < 50; i++) {
        await this.sleep(1000);
        this.simulateLeftClick();
      }

      this.findReturnButtonElementsAndClick();

      await this.sleep(1500);
    }, 1000);
  }

  findButtonPlayGame() {
    const button = document.querySelector("[class^='Game_entry__playBtn']");
    if (button && button.textContent.trim().toLowerCase() === "play game") {
      const style = window.getComputedStyle(button);
      if (style.marginTop === "40px") {
        return button;
      }
    }
    return null;
  }

  findReturnButtonElementsAndClick() {
    const svgs = document.getElementsByTagName("svg");
    for (let svg of svgs) {
      // Check if the SVG matches the specified structure
      if (
        svg.outerHTML ===
        '<svg class="bn-svg absolute top-4 start-4 w-6 h-6" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.999 11.999l7.071-7.072 1.768 1.768-4.055 4.055H21v2.5H7.785l4.053 4.053-1.768 1.768L3 12v-.001z" fill="currentColor"></path></svg>'
      ) {
        const event = new MouseEvent("click", {
          bubbles: true,
          cancelable: true,
          view: window,
        });
        svg.dispatchEvent(event);
      }
    }
  }

  autoMining() {}

  simulateLeftClick() {
    const canvas = document.querySelector("canvas");
    console.error("Canvas: ", canvas);
    if (canvas) {
      const event = new MouseEvent("mousedown", {
        bubbles: true,
        cancelable: true,
        view: window,
        button: 0, // 0 indicates the left mouse button
      });
      canvas.dispatchEvent(event);

      const clickEvent = new MouseEvent("mouseup", {
        bubbles: true,
        cancelable: true,
        view: window,
        button: 0, // 0 indicates the left mouse button
      });
      canvas.dispatchEvent(clickEvent);

      canvas.dispatchEvent(
        new MouseEvent("click", {
          bubbles: true,
          cancelable: true,
          view: window,
          button: 0, // 0 indicates the left mouse button
        })
      );
    }
  }
}

const moonBixBot = new MoonbixBot();
moonBixBot.run();

Как использовать

  1. Запустить игру
  2. правый клик мыши -> Исследовать элемент -> Изменить на вид консоли.
  3. Вставьте этот код и нажмитеEnter
  4. @slavon141 @lolyinseo @WeNuLLApp

Описание

  • Этот код показывает результат непрерывно, процесс следующий: зарядка батареи Play Game-> Автоматический майнинг -> зарядка Back-> зарядка Play Game-> Повторить
  • Этот код написан не совсем чисто и не очень хорошо, но он выполняет свою работу 🚀

Как со мной связаться

  • Напишите мне в Telegram, если хотите, чтобы я написал для вас инструмент.

Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

kics223w1 commented 1 month ago

Well, I wrote this to use for my account. I didn't use your bot. Just came across this issue and thought I should share my code.

Theslandybrain commented 1 month ago

Well, I wrote this to use for my account. I didn't use your bot. Just came across this issue and thought I should share my code.

How did you use it? it just doesn't work

Theslandybrain commented 1 month ago

Well, I wrote this to use for my account. I didn't use your bot. Just came across this issue and thought I should share my code.

it's just returns undefined image

kics223w1 commented 1 month ago

Open game, paste the code to the inspect view then click Enter. That's it. It works well for me.

ảnh
Theslandybrain commented 1 month ago

Open game, paste the code to the inspect view then click Enter. That's it. It works well for me. ảnh

How to open this game via browser? I managed to do it only with the experimental functions of telegram desktop

kics223w1 commented 1 month ago

I use telegram desktop too. My friend send me the reference to launch the game.

image

Theslandybrain commented 1 month ago

I use telegram desktop too. My friend send me the reference to launch the game.

image

image

Theslandybrain commented 1 month ago

it just doesn't work in browser

kics223w1 commented 1 month ago

It works well for me.

Theslandybrain commented 1 month ago

image I fixed the launch via browser, but the script just doesn't work

Theslandybrain commented 1 month ago

i just change language to english, and it's worked! Thank you!

kics223w1 commented 1 month ago

Great to hear that. Yes it should be English because if it is Russian, the code will never found the Play Game button.

slavon141 commented 1 month ago

image I fixed the launch via browser, but the script just doesn't work

How did you fix the browser launch?

slavon141 commented 1 month ago

Open game, paste the code to the inspect view then click Enter. That's it. It works well for me. ảnh

How did you open moonbix in a browser?

kics223w1 commented 1 month ago

Just read my previous responses. I open it from telegram desktop

lacvietanh commented 1 month ago

need a way to open moonbix on browser. about 3 days ago, it (binance) fixed

vanhbakaa commented 1 month ago

Open in telegram

need a way to open moonbix on browser. about 3 days ago, it (binance) fixed