masterking32 / MasterHamsterKombatBot

Master Hamster Kombat Bot is a Python-based automation tool specifically designed for the game Hamster Kombat. This bot is capable of performing all in-game tasks, including auto-tapping, cipher tasks, and purchasing the best cards on your behalf. It's a free and fully automated farming bot that enhances your Hamster Kombat gaming experience.
https://github.com/masterking32/MasterCryptoFarmBot
Apache License 2.0
281 stars 92 forks source link

Error getting IP #160

Closed joshuazzz1 closed 2 months ago

joshuazzz1 commented 2 months ago

[Account 1] Error: Invalid \escape: line 1 column 154 (char 153) [Account 1] Failed to get IP.

I keep getting this error, but when I try to use any random VPN, it magically disappears. Using latest version

joshuazzz1 commented 2 months ago

Ok I found out why, My asn_org in api.hamsterkombatgame.io/ip has some slashes ( / ) in it. but what should I do? I thought of removing Ip request from main.py but I think that's a bad idea. When I go to inspect element and to networks and see the ip status in-game it seems fine, only when I use the script bot there is an error.

masterking32 commented 2 months ago

There is nothing we can do about that, The Hamster server returns an invalid JSON, comment these lines: https://github.com/masterking32/MasterHamsterKombatBot/blob/2c42aada07c5b7f7116746443fc0dd764a4fc9b8/main.py#L1226

        if ipResponse is None:
            log.error(f"[{self.account_name}] Failed to get IP.")
            self.SendTelegramLog(
                f"[{self.account_name}] Failed to get IP.", "other_errors"
            )
            return

or try with a different ISP or IP.

joshuazzz1 commented 2 months ago

There is nothing we can do about that, The Hamster server returns an invalid JSON, comment these lines:

https://github.com/masterking32/MasterHamsterKombatBot/blob/2c42aada07c5b7f7116746443fc0dd764a4fc9b8/main.py#L1226

        if ipResponse is None:
            log.error(f"[{self.account_name}] Failed to get IP.")
            self.SendTelegramLog(
                f"[{self.account_name}] Failed to get IP.", "other_errors"
            )
            return

Okay I will do that but first I just want to be sure, Is it a safe thing to do? or there will be higher chances of Hamster suspecting my account? Please reply so I know if it better to remove this code or just use a VPN while running your script.

masterking32 commented 2 months ago

There is nothing we can do about that, The Hamster server returns an invalid JSON, comment these lines: https://github.com/masterking32/MasterHamsterKombatBot/blob/2c42aada07c5b7f7116746443fc0dd764a4fc9b8/main.py#L1226

        if ipResponse is None:
            log.error(f"[{self.account_name}] Failed to get IP.")
            self.SendTelegramLog(
                f"[{self.account_name}] Failed to get IP.", "other_errors"
            )
            return

Okay I will do that but first I just want to be sure, Is it a safe thing to do? or there will be higher chances of Hamster suspecting my account? Please reply so I know if it better to remove this code or just use a VPN while running your script.

If you comment on these lines of code, a request will be sent; you will only disable the display of errors.