Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Banned #75

Closed
Archerman888 opened this issue Jun 14, 2022 · 10 comments
Closed

Banned #75

Archerman888 opened this issue Jun 14, 2022 · 10 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@Archerman888
Copy link

image
After some disconnect noaut....

@hldh214 hldh214 self-assigned this Jun 14, 2022
@hldh214 hldh214 pinned this issue Jun 14, 2022
@Asnos
Copy link

Asnos commented Jun 14, 2022

อ่อน

@hldh214 hldh214 added the bug Something isn't working label Jun 15, 2022
@Archerman888
Copy link
Author

อ่อน

พี่เข้าใจ น้องอาจจะยังงงอยู่

@Ken24
Copy link

Ken24 commented Jun 18, 2022

the api of kingdom/enter seems to be changed. The web client posts json=FRI%3D. therefore, i tried to add this, but it returned 400 bad request (and banned with the same message above lol).
Even though the issue of kingdom/enter/ will solved, the response is now also "encrypted", so BASE64ENCODE_URL_WHITELIST will probably need to be changed

@someone21212
Copy link

any plan about updating the bot or encryption is hard now ?

@Ken24
Copy link

Ken24 commented Jun 25, 2022

the way to request on kingdom/enter seems to be identified, but the response is maybe really encrypted.

in order to get the response from kingdom/enter, we need to set sticky session key on cookie. (seems the LoK server has become distributed by sticky session. great job lol. therefore, duplicated login error once occurs after updates)

in the client.py...

class LokBotApi:
    def __init__(self, access_token, captcha_solver_config, request_callback=None):
        self.opener = httpx.Client(
            headers={
                'content-type': 'application/x-www-form-urlencoded',
                'sec-fetch-site': 'same-site',
                'user-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:100.0) Gecko/20100101 Firefox/100.0',
                'x-access-token': access_token
            },
            http2=True,
            base_url=lokbot.enum.API_BASE_URL
        )
        self.cookies = httpx.Cookies()
        self.cookies.set(
            'AWSALB',
            'XXXXXwXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQ+',
            domain='lok-api-live.leagueofkingdoms.com'
        )
        self.cookies.set(
            'AWSALBCORS',
            'XXXXXwXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQ+',
            domain='lok-api-live.leagueofkingdoms.com'
        )

...

    @ratelimit.limits(calls=1, period=0.1)
    def post(self, url, json_data=None):
        if json_data is None:
            json_data = {}

        post_data = json.dumps(json_data)
        if url not in BASE64ENCODE_URL_WHITELIST:
            post_data = base64.b64encode(post_data.encode()).decode()

        if url == "kingdom/enter":
            logger.info(f"try kingdom enter, cookie: {self.cookies}")
            post_data = "json=FRI%3D"
            response = self.opener.post(url, data=post_data, cookies=self.cookies)

thre response from kingdom/enter still need to be analyzed.

@Ken24
Copy link

Ken24 commented Jun 25, 2022

as you may know, kingdom/connect returns sticky session as a set-cookie like the followings. the need value is only first strings

AWSALB=XXXXXwXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; Expires=Sat, 02 Jul 2022 AA:BB:CC GMT; Path=/

@someone21212
Copy link

so is there a way to make the bot work again ? or now it become impossible ?

@CloudBotScripts
Copy link

Check this bot: https://www.youtube.com/watch?v=BpeEHzkbl6U it does work with encryption and it does not give ban, as it emulates mouse movement and uses image recognition.

@stale
Copy link

stale bot commented Sep 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 7, 2022
@stale stale bot closed this as completed Sep 14, 2022
@drakulpb
Copy link

drakulpb commented Feb 3, 2023

the script still works?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

7 participants