Linux premium155.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
LiteSpeed
: 162.0.235.200 | : 3.144.21.206
Cant Read [ /etc/named.conf ]
7.4.33
varifktc
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
README
+ Create Folder
+ Create File
/
lib /
python2.7 /
site-packages /
pip /
_vendor /
lockfile /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
9.15
KB
-rw-r--r--
__init__.pyc
11.83
KB
-rw-r--r--
__init__.pyo
11.83
KB
-rw-r--r--
linklockfile.py
2.59
KB
-rw-r--r--
linklockfile.pyc
2.84
KB
-rw-r--r--
linklockfile.pyo
2.84
KB
-rw-r--r--
mkdirlockfile.py
3.02
KB
-rw-r--r--
mkdirlockfile.pyc
3.35
KB
-rw-r--r--
mkdirlockfile.pyo
3.35
KB
-rw-r--r--
pidlockfile.py
5.95
KB
-rw-r--r--
pidlockfile.pyc
5.77
KB
-rw-r--r--
pidlockfile.pyo
5.77
KB
-rw-r--r--
sqlitelockfile.py
5.38
KB
-rw-r--r--
sqlitelockfile.pyc
4.59
KB
-rw-r--r--
sqlitelockfile.pyo
4.59
KB
-rw-r--r--
symlinklockfile.py
2.55
KB
-rw-r--r--
symlinklockfile.pyc
2.76
KB
-rw-r--r--
symlinklockfile.pyo
2.76
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : symlinklockfile.py
from __future__ import absolute_import import os import time from . import (LockBase, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class SymlinkLockFile(LockBase): """Lock access to a file using symlink(2).""" def __init__(self, path, threaded=True, timeout=None): # super(SymlinkLockFile).__init(...) LockBase.__init__(self, path, threaded, timeout) # split it back! self.unique_name = os.path.split(self.unique_name)[1] def acquire(self, timeout=None): # Hopefully unnecessary for symlink. # try: # open(self.unique_name, "wb").close() # except IOError: # raise LockFailed("failed to create %s" % self.unique_name) timeout = timeout if timeout is not None else self.timeout end_time = time.time() if timeout is not None and timeout > 0: end_time += timeout while True: # Try and create a symbolic link to it. try: os.symlink(self.unique_name, self.lock_file) except OSError: # Link creation failed. Maybe we've double-locked? if self.i_am_locking(): # Linked to out unique name. Proceed. return else: # Otherwise the lock creation failed. if timeout is not None and time.time() > end_time: if timeout > 0: raise LockTimeout("Timeout waiting to acquire" " lock for %s" % self.path) else: raise AlreadyLocked("%s is already locked" % self.path) time.sleep(timeout / 10 if timeout is not None else 0.1) else: # Link creation succeeded. We're good to go. return def release(self): if not self.is_locked(): raise NotLocked("%s is not locked" % self.path) elif not self.i_am_locking(): raise NotMyLock("%s is locked, but not by me" % self.path) os.unlink(self.lock_file) def is_locked(self): return os.path.islink(self.lock_file) def i_am_locking(self): return (os.path.islink(self.lock_file) and os.readlink(self.lock_file) == self.unique_name) def break_lock(self): if os.path.islink(self.lock_file): # exists && link os.unlink(self.lock_file)
Close