shamhi / TapSwapBot

Bot that mines coins in Tapswap
https://t.me/tapswap_bot
294 stars 119 forks source link

Fix any kind of issues. #129

Open masudscloud opened 5 months ago

masudscloud commented 5 months ago

Use virtual keyboard & selenium web driver to tap and capture the request. Get data from that request, use those data to perform any API actions.

Safe - Easier - Default - Tension Free - Non-changeable!

Best wishes to all, Thank you Shamhi. Thank you all the awesome people. Tapswapbot has come into it's end. It was a epic journey and battle between all the cool programmers and hackers vs tapswap developers.

❤ We will meet again to another awesome project.

ButCheR-PRO commented 5 months ago

That is, you don’t know how to fix errors in the bot?

nekooee commented 5 months ago

That is, you don’t know how to fix errors in the bot?

The person who wrote the above message is not the author or contributor to bot. The suggested method is without training. As I have reviewed, the Selenium library must be included and used in an application. It cannot be used without coding. And he didn't say how to solve the problem with selenium? With what operating system?!

masudscloud commented 5 months ago

Hey @ButCheR-PRO, @nekooee, check out this #79

Just to clarify, I'm not an expert in Python and I'm not using Shamhi's bot, though I admire his work. His bot faces daily issues due to algorithm changes by Tapswap developers. On the other hand, my own PHP-based bot doesn't encounter these problems.

Regarding your comment about "The suggested method is without training," I find the suggested approach practical and the most effective for this type of task. A coder like @headNbyte (a previous contributor) would easily grasp its utility.

To simplify, here's how I achieved it using PHP:

function simulateClick(element) {
    const event = new dom.window.MouseEvent('click', {
        view: dom.window,
        bubbles: true,
        cancelable: true
    });
    element.dispatchEvent(event);
}

[This code creates a new MouseEvent object with the type 'click', which simulates a real click event. It then dispatches this event on the element.]

That's it! This method is hassle-free and unbeatable. I can't code in Python, but I told the way to do it.

ButCheR-PRO commented 5 months ago

image

nekooee commented 5 months ago

Hey @ButCheR-PRO, @nekooee, check out this #79

Just to clarify, I'm not an expert in Python and I'm not using Shamhi's bot, though I admire his work. His bot faces daily issues due to algorithm changes by Tapswap developers. On the other hand, my own PHP-based bot doesn't encounter these problems. ...

That's it! This method is hassle-free and unbeatable. I can't code in Python, but I told the way to do it.

I did not use this bot either. Considering that my specialty is coding with JavaScript, I had written a code that I ran in the browser console and it completely simulated the action of touch. I had changed my user agent to the mobile browser. I had also overridden Telegram's js file to recognize my mobile phone. But now on one of the systems, as soon as the page comes up, it says you are a bot or you have several accounts. While the other system does not give such a message at all! It is not yet clear what the exact problem is. I think this issue is related to chr. When logging in, instead of returning chr, it gives a non-access error. Maybe the hardware ID of one of my systems is blocked. Or another method that I don't know what it is

async executeLogin($) {
        const W = this.getLoginParams();        
        if (W) {
            $ && (W.chr = $);
            try {
                const U = await this.api.account_login.post(W);
                return U.wait_s && (this.localData.wait_until = time.addSeconds(time.now(), U.wait_s),
                this.localData.flush()),
                U
            } catch (U) {
                const V = U;
                return this.log.error("login_failed", V),
                V.status >= 500 && (this.localData.wait_until = time.addSeconds(time.now(), 10),
                this.localData.flush()),
                U
            }
        }
    }
The code above is part of TonWalletButton-pTNPJ9zC.js file. In the code above, it first checks if chr is already on the system and compares it with the value of $. It seems that there is a problem here.
enolife commented 5 months ago

If conversations can be taken outside of GitHub, then i am in to dropping the fix and solutions.

I won't do it on github.

mrdarkerr commented 5 months ago

Hey @ButCheR-PRO, @nekooee, check out this #79

Just to clarify, I'm not an expert in Python and I'm not using Shamhi's bot, though I admire his work. His bot faces daily issues due to algorithm changes by Tapswap developers. On the other hand, my own PHP-based bot doesn't encounter these problems.

Regarding your comment about "The suggested method is without training," I find the suggested approach practical and the most effective for this type of task. A coder like @headNbyte (a previous contributor) would easily grasp its utility.

To simplify, here's how I achieved it using PHP:

  • Copy the source code from the Telegram mini app. (http://app.tapswap.club/)
  • Load the scripts using Node.js.
  • Tap to the center of the screen with the following function:
function simulateClick(element) {
    const event = new dom.window.MouseEvent('click', {
        view: dom.window,
        bubbles: true,
        cancelable: true
    });
    element.dispatchEvent(event);
}

[This code creates a new MouseEvent object with the type 'click', which simulates a real click event. It then dispatches this event on the element.]

  • Capture the API response from the Network tab.
  • Extract the necessary values for API authorization.
  • Execute your custom API actions using CURL.

That's it! This method is hassle-free and unbeatable. I can't code in Python, but I told the way to do it.

Did you publish the robot that you wrote based on php somewhere? Can I have the program you wrote?

WeendVidente777 commented 5 months ago

Hey @ButCheR-PRO, @nekooee, check out this #79

Just to clarify, I'm not an expert in Python and I'm not using Shamhi's bot, though I admire his work. His bot faces daily issues due to algorithm changes by Tapswap developers. On the other hand, my own PHP-based bot doesn't encounter these problems.

Regarding your comment about "The suggested method is without training," I find the suggested approach practical and the most effective for this type of task. A coder like @headNbyte (a previous contributor) would easily grasp its utility.

To simplify, here's how I achieved it using PHP:

  • Copy the source code from the Telegram mini app. (http://app.tapswap.club/)
  • Load the scripts using Node.js.
  • Tap to the center of the screen with the following function:
function simulateClick(element) {
    const event = new dom.window.MouseEvent('click', {
        view: dom.window,
        bubbles: true,
        cancelable: true
    });
    element.dispatchEvent(event);
}

[This code creates a new MouseEvent object with the type 'click', which simulates a real click event. It then dispatches this event on the element.]

  • Capture the API response from the Network tab.
  • Extract the necessary values for API authorization.
  • Execute your custom API actions using CURL.

That's it! This method is hassle-free and unbeatable. I can't code in Python, but I told the way to do it.

yeap. It works. Successfuly do this with puppeteer and nodejs. before all go to app.tapswap.club with correct and correctly encoded query parameters turn on listeners make tap gather headers from listeners pass gathered info to script.

Very important to pass correct headers. Run it on you mobile with usb-debugging and study carefully the requests that app send. UPD: Ah yes, you need to correctly fake you useragent in puppetter, for tapswap think you from mobile device. If you dont do it, you will be "temporaly banned"))

nekooee commented 5 months ago

Hey @ButCheR-PRO, @nekooee, check out this #79 Just to clarify, I'm not an expert in Python and I'm not using Shamhi's bot, though I admire his work. His bot faces daily issues due to algorithm changes by Tapswap developers. On the other hand, my own PHP-based bot doesn't encounter these problems. Regarding your comment about "The suggested method is without training," I find the suggested approach practical and the most effective for this type of task. A coder like @headNbyte (a previous contributor) would easily grasp its utility. To simplify, here's how I achieved it using PHP:

  • Copy the source code from the Telegram mini app. (http://app.tapswap.club/)
  • Load the scripts using Node.js.
  • Tap to the center of the screen with the following function:
function simulateClick(element) {
    const event = new dom.window.MouseEvent('click', {
        view: dom.window,
        bubbles: true,
        cancelable: true
    });
    element.dispatchEvent(event);
}

[This code creates a new MouseEvent object with the type 'click', which simulates a real click event. It then dispatches this event on the element.]

  • Capture the API response from the Network tab.
  • Extract the necessary values for API authorization.
  • Execute your custom API actions using CURL.

That's it! This method is hassle-free and unbeatable. I can't code in Python, but I told the way to do it.

yeap. It works. Successfuly do this with puppeteer and nodejs. before all go to app.tapswap.club with correct and correctly encoded query parameters turn on listeners make tap gather headers from listeners pass gathered info to script.

Very important to pass correct headers. Run it on you mobile with usb-debugging and study carefully the requests that app send. UPD: Ah yes, you need to correctly fake you useragent in puppetter, for tapswap think you from mobile device. If you dont do it, you will be "temporaly banned"))

I think the headers are fixed and only the user ID and some things are different. Can you post an example of the header you are sending here? Change or delete your personal information

WeendVidente777 commented 5 months ago

@nekooee i get initial header that pupetter try to send and modify it

  page.on('request', async (interceptedRequest) => {
        interceptedRequest.headers()
        const headers = interceptedRequest.headers();
        headers["user-agent"] = undefined
        headers["sec-ch-ua"] = "\"Not/A)Brand\";v=\"8\", \"Chromium\";v=\"126\", \"Android WebView\";v=\"126\""
        headers['sec-ch-ua-mobile'] = "?1"
        headers["accept-language"] =  "en-US,en;q=0.9"
        headers['sec-ch-ua-platform'] = "Android"
        headers["x-touch"] = "1"

        await interceptedRequest.continue( {headers})
    });

if query params in url correct - tapswap loads without problems query params formed from session_storage in browser or telegram app on deskrop

i just compared what pupetter send with what telephone send, and edit the difference

nekooee commented 5 months ago

thank you. I want to send this header with JavaScript. Does that mean you send undefined user-agent to the tapswap server?!

WeendVidente777 commented 5 months ago

thank you. I want to send this header with JavaScript. Does that mean you send undefined user-agent to the tapswap server?!

it some kind of deleting unnecessary header i think) It is my ferst time using pupetter, maybe it incorrect, but it works.

Correct url you can quickly get if lofin from mobile, then turn off inet and reload tapswap page. It will be printed on error screen. Just copy. Actualy there only data that stored in session storage of browser or webview.

nekooee commented 5 months ago

1

work for me too! Thank you

masudscloud commented 5 months ago

WeendVidente777

You did a great job! 🎉 That is what I was talking about, to be honest, there is zero chance of getting banned if you do it correctly, because this is the default way that users generally perform.

nekooee commented 5 months ago

Now I understand why it worked on my other system but not on this system! The reason was that the system had a touch LCD. In fact, we should only pass the touch in the header along with other things that we used to pass before.