Hackfut Security File Manager
Current Path:
/usr/lib64/python2.6/Demo/sockets
usr
/
lib64
/
python2.6
/
Demo
/
sockets
/
📁
..
📄
README
(814 B)
📄
broadcast.py
(283 B)
📄
broadcast.pyc
(546 B)
📄
broadcast.pyo
(546 B)
📄
echosvr.py
(742 B)
📄
echosvr.pyc
(830 B)
📄
echosvr.pyo
(830 B)
📄
finger.py
(1.23 KB)
📄
finger.pyc
(1.15 KB)
📄
finger.pyo
(1.15 KB)
📄
ftp.py
(3.84 KB)
📄
ftp.pyc
(2.9 KB)
📄
ftp.pyo
(2.9 KB)
📄
gopher.py
(9.56 KB)
📄
gopher.pyc
(10.18 KB)
📄
gopher.pyo
(10.18 KB)
📄
mcast.py
(2.33 KB)
📄
mcast.pyc
(2.04 KB)
📄
mcast.pyo
(2.04 KB)
📄
radio.py
(287 B)
📄
radio.pyc
(470 B)
📄
radio.pyo
(470 B)
📄
rpython.py
(717 B)
📄
rpython.pyc
(987 B)
📄
rpython.pyo
(987 B)
📄
rpythond.py
(1.19 KB)
📄
rpythond.pyc
(1.31 KB)
📄
rpythond.pyo
(1.31 KB)
📄
telnet.py
(2.94 KB)
📄
telnet.pyc
(2.13 KB)
📄
telnet.pyo
(2.13 KB)
📄
throughput.py
(2.04 KB)
📄
throughput.pyc
(2.43 KB)
📄
throughput.pyo
(2.43 KB)
📄
udpecho.py
(1.44 KB)
📄
udpecho.pyc
(1.99 KB)
📄
udpecho.pyo
(1.99 KB)
📄
unicast.py
(230 B)
📄
unicast.pyc
(455 B)
📄
unicast.pyo
(455 B)
📄
unixclient.py
(232 B)
📄
unixclient.pyc
(424 B)
📄
unixclient.pyo
(424 B)
📄
unixserver.py
(414 B)
📄
unixserver.pyc
(599 B)
📄
unixserver.pyo
(599 B)
Editing: rpythond.py
#! /usr/bin/env python2.6 # Remote python server. # Execute Python commands remotely and send output back. # WARNING: This version has a gaping security hole -- it accepts requests # from any host on the Internet! import sys from socket import * import StringIO import traceback PORT = 4127 BUFSIZE = 1024 def main(): if len(sys.argv) > 1: port = int(eval(sys.argv[1])) else: port = PORT s = socket(AF_INET, SOCK_STREAM) s.bind(('', port)) s.listen(1) while 1: conn, (remotehost, remoteport) = s.accept() print 'connected by', remotehost, remoteport request = '' while 1: data = conn.recv(BUFSIZE) if not data: break request = request + data reply = execute(request) conn.send(reply) conn.close() def execute(request): stdout = sys.stdout stderr = sys.stderr sys.stdout = sys.stderr = fakefile = StringIO.StringIO() try: try: exec request in {}, {} except: print traceback.print_exc(100) finally: sys.stderr = stderr sys.stdout = stdout return fakefile.getvalue() main()
Upload File
Create Folder