X7ROOT File Manager
Current Path:
/lib64/python2.7/Demo/sockets
lib64
/
python2.7
/
Demo
/
sockets
/
ðŸ“
..
📄
README
(628 B)
📄
broadcast.py
(283 B)
📄
broadcast.pyc
(547 B)
📄
broadcast.pyo
(547 B)
📄
echosvr.py
(738 B)
📄
echosvr.pyc
(827 B)
📄
echosvr.pyo
(827 B)
📄
finger.py
(1.23 KB)
📄
finger.pyc
(1.13 KB)
📄
finger.pyo
(1.13 KB)
📄
ftp.py
(3.84 KB)
📄
ftp.pyc
(2.88 KB)
📄
ftp.pyo
(2.88 KB)
📄
gopher.py
(9.55 KB)
📄
gopher.pyc
(10.08 KB)
📄
gopher.pyo
(10.08 KB)
📄
mcast.py
(2.16 KB)
📄
mcast.pyc
(2.12 KB)
📄
mcast.pyo
(2.12 KB)
📄
radio.py
(287 B)
📄
radio.pyc
(471 B)
📄
radio.pyo
(471 B)
📄
rpython.py
(713 B)
📄
rpython.pyc
(982 B)
📄
rpython.pyo
(982 B)
📄
rpythond.py
(1.18 KB)
📄
rpythond.pyc
(1.3 KB)
📄
rpythond.pyo
(1.3 KB)
📄
telnet.py
(2.94 KB)
📄
telnet.pyc
(2.1 KB)
📄
telnet.pyo
(2.1 KB)
📄
throughput.py
(2.04 KB)
📄
throughput.pyc
(2.42 KB)
📄
throughput.pyo
(2.42 KB)
📄
udpecho.py
(1.43 KB)
📄
udpecho.pyc
(1.98 KB)
📄
udpecho.pyo
(1.98 KB)
📄
unicast.py
(230 B)
📄
unicast.pyc
(456 B)
📄
unicast.pyo
(456 B)
📄
unixclient.py
(232 B)
📄
unixclient.pyc
(424 B)
📄
unixclient.pyo
(424 B)
📄
unixserver.py
(414 B)
📄
unixserver.pyc
(593 B)
📄
unixserver.pyo
(593 B)
Editing: finger.py
#! /usr/bin/python2.7 # Python interface to the Internet finger daemon. # # Usage: finger [options] [user][@host] ... # # If no host is given, the finger daemon on the local host is contacted. # Options are passed uninterpreted to the finger daemon! import sys, string from socket import * # Hardcode the number of the finger port here. # It's not likely to change soon... # FINGER_PORT = 79 # Function to do one remote finger invocation. # Output goes directly to stdout (although this can be changed). # def finger(host, args): s = socket(AF_INET, SOCK_STREAM) s.connect((host, FINGER_PORT)) s.send(args + '\n') while 1: buf = s.recv(1024) if not buf: break sys.stdout.write(buf) sys.stdout.flush() # Main function: argument parsing. # def main(): options = '' i = 1 while i < len(sys.argv) and sys.argv[i][:1] == '-': options = options + sys.argv[i] + ' ' i = i+1 args = sys.argv[i:] if not args: args = [''] for arg in args: if '@' in arg: at = string.index(arg, '@') host = arg[at+1:] arg = arg[:at] else: host = '' finger(host, options + arg) # Call the main function. # main()
Upload File
Create Folder