Linux worldls-302.fr.planethoster.net 4.18.0-553.8.1.lve.el7h.x86_64 #1 SMP Thu Jul 4 15:19:33 UTC 2024 x86_64
LiteSpeed
Server IP : 10.185.0.203 & Your IP : 216.73.217.14
Domains :
Cant Read [ /etc/named.conf ]
User : gerathty
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python2.7 /
site-packages /
pyzor /
Delete
Unzip
Name
Size
Permission
Date
Action
engines
[ DIR ]
drwxr-xr-x
2017-07-03 22:07
hacks
[ DIR ]
drwxr-xr-x
2017-07-03 22:07
__init__.py
1.38
KB
-rw-r--r--
2014-12-10 14:25
__init__.pyc
2.42
KB
-rw-r--r--
2017-07-03 22:07
account.py
2.49
KB
-rw-r--r--
2014-12-10 14:10
account.pyc
3.2
KB
-rw-r--r--
2017-07-03 22:07
client.py
10.56
KB
-rw-r--r--
2014-12-10 14:10
client.pyc
12.77
KB
-rw-r--r--
2017-07-03 22:07
config.py
8.95
KB
-rw-r--r--
2014-12-10 14:10
config.pyc
8.07
KB
-rw-r--r--
2017-07-03 22:07
digest.py
5.74
KB
-rw-r--r--
2014-12-10 14:10
digest.pyc
6.25
KB
-rw-r--r--
2017-07-03 22:07
forwarder.py
2.51
KB
-rw-r--r--
2014-12-10 14:10
forwarder.pyc
2.87
KB
-rw-r--r--
2017-07-03 22:07
message.py
3.93
KB
-rw-r--r--
2014-12-10 14:10
message.pyc
8.52
KB
-rw-r--r--
2017-07-03 22:07
server.py
15.41
KB
-rw-r--r--
2014-12-10 14:10
server.pyc
16.16
KB
-rw-r--r--
2017-07-03 22:07
Save
Rename
"""Manage the forwarder process.""" import logging import threading try: import Queue except ImportError: import queue as Queue class Forwarder(object): """Forwards digest to remote pyzor servers""" def __init__(self, forwarding_client, remote_servers, max_queue_size=10000): """ forward_client: a pyzor.client.Client instance to use as forwarding client remote_servers: a list of (hostname,port) tuples where digests should be forwarded to max_queue_size: max amount of queued digests """ self.log = logging.getLogger("pyzord") self.forwarding_client = forwarding_client self.forward_queue = Queue.Queue(max_queue_size) self.remote_servers = remote_servers def _forward_loop(self): """read forwarding requests from the queue""" while True: try: digest, whitelist = self.forward_queue.get(block=True, timeout=2) except Queue.Empty: # If the forwarding client has been deleted we should # end the thread if self.forwarding_client is None: return else: continue for server in self.remote_servers: try: if whitelist: self.forwarding_client.whitelist(digest, server) else: self.forwarding_client.report(digest, server) except Exception as ex: self.log.warn('Forwarding digest %s to %s failed: %s', digest, server, ex) def queue_forward_request(self, digest, whitelist=False): """If forwarding is enabled, insert a digest into the forwarding queue if whitelist is True, the digest will be forwarded as whitelist request if the queue is full, the digest is dropped """ if self.forwarding_client is None: # forwarding has been disabled return try: self.forward_queue.put_nowait((digest, whitelist),) except Queue.Full: pass def start_forwarding(self): """start the forwarding thread""" threading.Thread(target=self._forward_loop).start() def stop_forwarding(self): """disable forwarding and tell the forwarding thread to end itself""" self.forwarding_client = None