Hackfut Security File Manager
Current Path:
/usr/lib/python2.6/site-packages/supervisor/medusa
usr
/
lib
/
python2.6
/
site-packages
/
supervisor
/
medusa
/
📁
..
📄
__init__.py
(128 B)
📄
__init__.pyc
(277 B)
📄
__init__.pyo
(277 B)
📄
auth_handler.py
(4.63 KB)
📄
auth_handler.pyc
(4.41 KB)
📄
auth_handler.pyo
(4.41 KB)
📄
chat_server.py
(4.43 KB)
📄
chat_server.pyc
(6.28 KB)
📄
chat_server.pyo
(6.28 KB)
📄
counter.py
(1.41 KB)
📄
counter.pyc
(1.99 KB)
📄
counter.pyo
(1.99 KB)
📄
default_handler.py
(6.18 KB)
📄
default_handler.pyc
(4.92 KB)
📄
default_handler.pyo
(4.92 KB)
📄
event_loop.py
(2.91 KB)
📄
event_loop.pyc
(3.43 KB)
📄
event_loop.pyo
(3.43 KB)
📄
filesys.py
(10.94 KB)
📄
filesys.pyc
(13.28 KB)
📄
filesys.pyo
(13.28 KB)
📄
ftp_server.py
(39.6 KB)
📄
ftp_server.pyc
(33.91 KB)
📄
ftp_server.pyo
(33.91 KB)
📄
http_date.py
(3.33 KB)
📄
http_date.pyc
(3.39 KB)
📄
http_date.pyo
(3.39 KB)
📄
http_server.py
(24.63 KB)
📄
http_server.pyc
(20.96 KB)
📄
http_server.pyo
(20.96 KB)
📄
logger.py
(7.81 KB)
📄
logger.pyc
(10.73 KB)
📄
logger.pyo
(10.73 KB)
📄
m_syslog.py
(7.18 KB)
📄
m_syslog.pyc
(3.91 KB)
📄
m_syslog.pyo
(3.91 KB)
📄
medusa_gif.py
(2.71 KB)
📄
medusa_gif.pyc
(1.13 KB)
📄
medusa_gif.pyo
(1.13 KB)
📄
monitor.py
(10.79 KB)
📄
monitor.pyc
(12 KB)
📄
monitor.pyo
(12 KB)
📄
monitor_client.py
(3.2 KB)
📄
monitor_client.pyc
(5.26 KB)
📄
monitor_client.pyo
(5.26 KB)
📄
monitor_client_win32.py
(1.3 KB)
📄
monitor_client_win32.pyc
(2.04 KB)
📄
monitor_client_win32.pyo
(2.04 KB)
📄
producers.py
(9.22 KB)
📄
producers.pyc
(11.36 KB)
📄
producers.pyo
(11.36 KB)
📄
put_handler.py
(3.25 KB)
📄
put_handler.pyc
(3.43 KB)
📄
put_handler.pyo
(3.43 KB)
📄
redirecting_handler.py
(1.37 KB)
📄
redirecting_handler.pyc
(2.11 KB)
📄
redirecting_handler.pyo
(2.11 KB)
📄
resolver.py
(15.19 KB)
📄
resolver.pyc
(12.11 KB)
📄
resolver.pyo
(12.11 KB)
📄
rpc_client.py
(9.45 KB)
📄
rpc_client.pyc
(10.1 KB)
📄
rpc_client.pyo
(10.1 KB)
📄
rpc_server.py
(9.72 KB)
📄
rpc_server.pyc
(9.31 KB)
📄
rpc_server.pyo
(9.31 KB)
📄
script_handler.py
(6.4 KB)
📄
script_handler.pyc
(6.5 KB)
📄
script_handler.pyo
(6.5 KB)
📄
setup.py
(496 B)
📄
setup.pyc
(729 B)
📄
setup.pyo
(729 B)
📄
status_handler.py
(9.13 KB)
📄
status_handler.pyc
(9.45 KB)
📄
status_handler.pyo
(9.45 KB)
📄
unix_user_handler.py
(2.26 KB)
📄
unix_user_handler.pyc
(2.31 KB)
📄
unix_user_handler.pyo
(2.31 KB)
📄
virtual_handler.py
(1.68 KB)
📄
virtual_handler.pyc
(3.09 KB)
📄
virtual_handler.pyo
(3.09 KB)
📄
xmlrpc_handler.py
(2.88 KB)
📄
xmlrpc_handler.pyc
(3.7 KB)
📄
xmlrpc_handler.pyo
(3.7 KB)
Editing: monitor_client.py
# -*- Mode: Python -*- # monitor client, unix version. import asyncore import asynchat import socket import string import sys import os import md5 class stdin_channel (asyncore.file_dispatcher): def handle_read (self): data = self.recv(512) if not data: print '\nclosed.' self.sock_channel.close() try: self.close() except: pass data = string.replace(data, '\n', '\r\n') self.sock_channel.push (data) def writable (self): return 0 def log (self, *ignore): pass class monitor_client (asynchat.async_chat): def __init__ (self, password, addr=('',8023), socket_type=socket.AF_INET): asynchat.async_chat.__init__ (self) self.create_socket (socket_type, socket.SOCK_STREAM) self.terminator = '\r\n' self.connect (addr) self.sent_auth = 0 self.timestamp = '' self.password = password def collect_incoming_data (self, data): if not self.sent_auth: self.timestamp = self.timestamp + data else: sys.stdout.write (data) sys.stdout.flush() def found_terminator (self): if not self.sent_auth: self.push (hex_digest (self.timestamp + self.password) + '\r\n') self.sent_auth = 1 else: print def handle_close (self): # close all the channels, which will make the standard main # loop exit. map (lambda x: x.close(), asyncore.socket_map.values()) def log (self, *ignore): pass class encrypted_monitor_client (monitor_client): "Wrap push() and recv() with a stream cipher" def init_cipher (self, cipher, key): self.outgoing = cipher.new (key) self.incoming = cipher.new (key) def push (self, data): # push the encrypted data instead return monitor_client.push (self, self.outgoing.encrypt (data)) def recv (self, block_size): data = monitor_client.recv (self, block_size) if data: return self.incoming.decrypt (data) else: return data def hex_digest (s): m = md5.md5() m.update (s) return string.join ( map (lambda x: hex (ord (x))[2:], map (None, m.digest())), '', ) if __name__ == '__main__': if len(sys.argv) == 1: print 'Usage: %s host port' % sys.argv[0] sys.exit(0) if ('-e' in sys.argv): encrypt = 1 sys.argv.remove ('-e') else: encrypt = 0 sys.stderr.write ('Enter Password: ') sys.stderr.flush() try: os.system ('stty -echo') p = raw_input() print finally: os.system ('stty echo') stdin = stdin_channel (0) if len(sys.argv) > 1: if encrypt: client = encrypted_monitor_client (p, (sys.argv[1], string.atoi (sys.argv[2]))) import sapphire client.init_cipher (sapphire, p) else: client = monitor_client (p, (sys.argv[1], string.atoi (sys.argv[2]))) else: # default to local host, 'standard' port client = monitor_client (p) stdin.sock_channel = client asyncore.loop()
Upload File
Create Folder