Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python2.7 /
site-packages /
rhn /
Delete
Unzip
Name
Size
Permission
Date
Action
SSL.py
10.19
KB
-rw-r--r--
2018-10-30 14:36
SSL.pyc
7.99
KB
-rw-r--r--
2018-10-30 14:36
SSL.pyo
7.99
KB
-rw-r--r--
2018-10-30 14:36
SmartIO.py
2.65
KB
-rw-r--r--
2013-07-17 07:33
SmartIO.pyc
3.09
KB
-rw-r--r--
2018-10-30 14:36
SmartIO.pyo
3.09
KB
-rw-r--r--
2018-10-30 14:36
UserDictCase.py
2.81
KB
-rw-r--r--
2013-07-17 07:33
UserDictCase.pyc
3.66
KB
-rw-r--r--
2018-10-30 14:36
UserDictCase.pyo
3.66
KB
-rw-r--r--
2018-10-30 14:36
__init__.py
133
B
-rw-r--r--
2013-07-17 07:33
__init__.pyc
221
B
-rw-r--r--
2018-10-30 14:36
__init__.pyo
221
B
-rw-r--r--
2018-10-30 14:36
connections.py
9.09
KB
-rw-r--r--
2018-10-30 14:36
connections.pyc
8.66
KB
-rw-r--r--
2018-10-30 14:36
connections.pyo
8.6
KB
-rw-r--r--
2018-10-30 14:36
nonblocking.py
2.38
KB
-rw-r--r--
2013-07-17 07:33
nonblocking.pyc
2.69
KB
-rw-r--r--
2018-10-30 14:36
nonblocking.pyo
2.69
KB
-rw-r--r--
2018-10-30 14:36
rhnLockfile.py
3.25
KB
-rw-r--r--
2013-07-17 07:33
rhnLockfile.pyc
3.19
KB
-rw-r--r--
2018-10-30 14:36
rhnLockfile.pyo
3.19
KB
-rw-r--r--
2018-10-30 14:36
rpclib.py
23.54
KB
-rw-r--r--
2018-10-30 14:36
rpclib.pyc
21.2
KB
-rw-r--r--
2018-10-30 14:36
rpclib.pyo
21.08
KB
-rw-r--r--
2018-10-30 14:36
transports.py
30.8
KB
-rw-r--r--
2018-10-30 14:36
transports.pyc
22.85
KB
-rw-r--r--
2018-10-30 14:36
transports.pyo
22.85
KB
-rw-r--r--
2018-10-30 14:36
Save
Rename
# # # # $Id$ import select import fcntl import os class NonBlockingFile: def __init__(self, fd): # Keep a copy of the file descriptor self.fd = fd fcntl.fcntl(self.fd.fileno(), fcntl.F_SETFL, os.O_NDELAY) # Set the callback-related stuff self.read_fd_set = [] self.write_fd_set = [] self.exc_fd_set = [] self.user_data = None self.callback = None def set_callback(self, read_fd_set, write_fd_set, exc_fd_set, user_data, callback): self.read_fd_set = read_fd_set # Make the objects non-blocking for f in self.read_fd_set: fcntl.fcntl(f.fileno(), fcntl.F_SETFL, os.O_NDELAY) self.write_fd_set = write_fd_set self.exc_fd_set = exc_fd_set self.user_data = user_data self.callback = callback def read(self, amt=0): while 1: status_changed = 0 readfds = self.read_fd_set + [self.fd] writefds = self.write_fd_set excfds = self.exc_fd_set print "Calling select", readfds readfds, writefds, excfds = select.select(readfds, writefds, excfds) print "Select returned", readfds, writefds, excfds if self.fd in readfds: # Our own file descriptor has changed status # Mark this, but also try to call the callback with the rest # of the file descriptors that changed status status_changed = 1 readfds.remove(self.fd) if self.callback and (readfds or writefds or excfds): self.callback(readfds, writefds, excfds, self.user_data) if status_changed: break print "Returning" return self.fd.read(amt) def write(self, data): return self.fd.write(data) def __getattr__(self, name): return getattr(self.fd, name) def callback(r, w, e, user_data): print "Callback called", r, w, e print r[0].read() if __name__ == '__main__': import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("localhost", 5555)) f = s.makefile() ss = NonBlockingFile(f) s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2.connect(("localhost", 5556)) f = s2.makefile() ss.set_callback([f], [], [], None, callback) xx = ss.read() print len(xx)