From d011286fa17bf3a66c8d27696173d10eff6ddaa2 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sat, 16 Sep 2023 12:31:10 -0400 Subject: [PATCH] Fixed broken identd link and possible fix for issue reported by chrono --- README.md | 2 +- jupiter.py | 53 ++++++++++++++++++++++++++++------------------------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 03a7649..963a274 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Any server with SSL/TLS ports opened, will be connected using SSL/TLS. If using The bot is designed to be very minimal, secure, & trustless by nature. This means anyone can run a copy of your script on their server to help build your botnet. -It is highly recommended that you use a [random spoofing ident protocol daemon](https://github.com/acidvegas/random/blob/master/irc/identd.py) +It is highly recommended that you use a [random spoofing ident protocol daemon](https://github.com/internet-relay-chat/archive/blob/master/identd.py) ## Commands | Command | Description | diff --git a/jupiter.py b/jupiter.py index 419fa39..817dcd7 100644 --- a/jupiter.py +++ b/jupiter.py @@ -140,32 +140,32 @@ class clone(): self.writer = None async def connect(self): - if connect_delay: - await asyncio.sleep(random.randint(300,900)) while True: - if self.proxy: - options = { - 'proxy' : aiosocks.Socks5Addr(self.proxy.split(':')[0], int(self.proxy.split(':')[1])), - 'proxy_auth' : None, - 'dst' : (self.server['server'], self.server['ssl'] if self.server['ssl'] and self.ssl_status else 6667), - 'limit' : 1024, - 'ssl' : ssl_ctx() if self.server['ssl'] and self.ssl_status else None, - 'family' : 2 - } - self.reader, self.writer = await asyncio.wait_for(aiosocks.open_connection(**options), 15) - else: - options = { - 'host' : self.server['server'], - 'port' : self.server['ssl'] if self.server['ssl'] and self.ssl_status else 6667, - 'limit' : 1024, - 'ssl' : ssl_ctx() if self.server['ssl'] and self.ssl_status else None, - 'family' : socket.AF_INET6 if self.use_ipv6 else socket.AF_INET, - 'local_addr' : (self.vhost, random.randint(5000,60000)) if self.vhost else None - } try: - self.reader, self.writer = await asyncio.wait_for(asyncio.open_connection(**options), 15) - await self.raw(f'USER {rndnick()} 0 * :{rndnick()}') - await self.raw('NICK ' + self.nickname) + if connect_delay: + await asyncio.sleep(random.randint(300,900)) + if self.proxy: + options = { + 'proxy' : aiosocks.Socks5Addr(self.proxy.split(':')[0], int(self.proxy.split(':')[1])), + 'proxy_auth' : None, + 'dst' : (self.server['server'], self.server['ssl'] if self.server['ssl'] and self.ssl_status else 6667), + 'limit' : 1024, + 'ssl' : ssl_ctx() if self.server['ssl'] and self.ssl_status else None, + 'family' : 2 + } + self.reader, self.writer = await asyncio.wait_for(aiosocks.open_connection(**options), 15) + else: + options = { + 'host' : self.server['server'], + 'port' : self.server['ssl'] if self.server['ssl'] and self.ssl_status else 6667, + 'limit' : 1024, + 'ssl' : ssl_ctx() if self.server['ssl'] and self.ssl_status else None, + 'family' : socket.AF_INET6 if self.use_ipv6 else socket.AF_INET, + 'local_addr' : (self.vhost, random.randint(5000,60000)) if self.vhost else None + } + self.reader, self.writer = await asyncio.wait_for(asyncio.open_connection(**options), 15) + await self.raw(f'USER {rndnick()} 0 * :{rndnick()}') + await self.raw('NICK ' + self.nickname) except Exception as ex: v6 = 'using IPv6 ' if self.use_ipv6 else '' if self.ssl_status and self.server['ssl']: @@ -177,7 +177,6 @@ class clone(): error('Failed to connect to \'{0}\' IRC server {1}'.format(self.server['server'], v6), ex) else: await self.listen() - self.loop.cancel() finally: await asyncio.sleep(86400+random.randint(1800,3600)) @@ -396,6 +395,10 @@ class clone(): pass except Exception as ex: error('Unexpected error occured on \'{0}\' server.'.format(self.server['server']), ex) + try: + self.loop.cancel() + except: + pass break async def mode(self, target, mode):