Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
duplicity /
[ HOME SHELL ]
Name
Size
Permission
Action
backends
[ DIR ]
drwxr-xr-x
__pycache__
[ DIR ]
drwxr-xr-x
asyncscheduler.py
10.56
KB
-rw-r--r--
backend.py
26.56
KB
-rw-r--r--
cached_ops.py
1.66
KB
-rw-r--r--
commandline.py
53.7
KB
-rw-r--r--
config.py
10.92
KB
-rw-r--r--
diffdir.py
26.5
KB
-rw-r--r--
dup_collections.py
46.48
KB
-rw-r--r--
dup_main.py
67.04
KB
-rw-r--r--
dup_temp.py
8.06
KB
-rw-r--r--
dup_threading.py
8.53
KB
-rw-r--r--
dup_time.py
11.37
KB
-rw-r--r--
errors.py
2.72
KB
-rw-r--r--
filechunkio.py
2.63
KB
-rw-r--r--
file_naming.py
16.8
KB
-rw-r--r--
globmatch.py
7.06
KB
-rw-r--r--
gpginterface.py
23.09
KB
-rw-r--r--
gpg.py
17.29
KB
-rw-r--r--
__init__.py
1.13
KB
-rw-r--r--
lazy.py
14.82
KB
-rw-r--r--
_librsync.cpython-310-x86_64-linux-gnu.so
19.98
KB
-rw-r--r--
_librsyncmodule.c
14.1
KB
-rw-r--r--
librsync.py
8.54
KB
-rw-r--r--
log.py
15.34
KB
-rw-r--r--
manifest.py
18.04
KB
-rw-r--r--
patchdir.py
22.04
KB
-rw-r--r--
path.py
28.56
KB
-rw-r--r--
progress.py
13.58
KB
-rw-r--r--
robust.py
2.44
KB
-rw-r--r--
selection.py
21.96
KB
-rw-r--r--
statistics.py
13.26
KB
-rw-r--r--
tarfile.py
1.27
KB
-rw-r--r--
tempdir.py
10.56
KB
-rw-r--r--
util.py
10.42
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : filechunkio.py
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4; encoding:utf8 -*- # # Copyright 2011 Fabian Topfstedt <topfstedt@schneevonmorgen.com> # # This module is included with granted permission from the original author. # The original source is available at http://bitbucket.org/fabian/filechunkio import io import os SEEK_SET = getattr(io, u'SEEK_SET', 0) SEEK_CUR = getattr(io, u'SEEK_CUR', 1) SEEK_END = getattr(io, u'SEEK_END', 2) class FileChunkIO(io.FileIO): u""" A class that allows you reading only a chunk of a file. """ def __init__(self, name, mode=u'r', closefd=True, offset=0, bytes=None, # pylint: disable=redefined-builtin *args, **kwargs): # pylint: disable=redefined-builtin u""" Open a file chunk. The mode can only be 'r' for reading. Offset is the amount of bytes that the chunks starts after the real file's first byte. Bytes defines the amount of bytes the chunk has, which you can set to None to include the last byte of the real file. """ if not mode.startswith(u'r'): raise ValueError(u"Mode string must begin with 'r'") self.offset = offset self.bytes = bytes if bytes is None: self.bytes = os.stat(name).st_size - self.offset super(FileChunkIO, self).__init__(name, mode, closefd, *args, **kwargs) self.seek(0) def seek(self, offset, whence=SEEK_SET): u""" Move to a new chunk position. """ if whence == SEEK_SET: super(FileChunkIO, self).seek(self.offset + offset) elif whence == SEEK_CUR: self.seek(self.tell() + offset) elif whence == SEEK_END: self.seek(self.bytes + offset) def tell(self): u""" Current file position. """ return super(FileChunkIO, self).tell() - self.offset def read(self, n=-1): u""" Read and return at most n bytes. """ if n >= 0: max_n = self.bytes - self.tell() n = min([n, max_n]) return super(FileChunkIO, self).read(n) else: return self.readall() def readall(self): u""" Read all data from the chunk. """ return self.read(self.bytes - self.tell()) def readinto(self, b): u""" Same as RawIOBase.readinto(). """ data = self.read(len(b)) n = len(data) try: b[:n] = data except TypeError as err: import array if not isinstance(b, array.array): raise err b[:n] = array.array(b'b', data) return n
Close