Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.122
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
lib /
python3.5 /
dist-packages /
PIL /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-sr-x
2025-04-10 17:07
BdfFontFile.py
2.75
KB
-rw-r--r--
2025-04-10 17:07
BlpImagePlugin.py
13.96
KB
-rw-r--r--
2025-04-10 17:07
BmpImagePlugin.py
14.04
KB
-rw-r--r--
2025-04-10 17:07
BufrStubImagePlugin.py
1.48
KB
-rw-r--r--
2025-04-10 17:07
ContainerIO.py
2.82
KB
-rw-r--r--
2025-04-10 17:07
CurImagePlugin.py
1.64
KB
-rw-r--r--
2025-04-10 17:07
DcxImagePlugin.py
2.09
KB
-rw-r--r--
2025-04-10 17:07
DdsImagePlugin.py
5.34
KB
-rw-r--r--
2025-04-10 17:07
EpsImagePlugin.py
11.84
KB
-rw-r--r--
2025-04-10 17:07
ExifTags.py
8.8
KB
-rw-r--r--
2025-04-10 17:07
FitsStubImagePlugin.py
1.59
KB
-rw-r--r--
2025-04-10 17:07
FliImagePlugin.py
4.17
KB
-rw-r--r--
2025-04-10 17:07
FontFile.py
2.7
KB
-rw-r--r--
2025-04-10 17:07
FpxImagePlugin.py
6.51
KB
-rw-r--r--
2025-04-10 17:07
FtexImagePlugin.py
3.23
KB
-rw-r--r--
2025-04-10 17:07
GbrImagePlugin.py
2.74
KB
-rw-r--r--
2025-04-10 17:07
GdImageFile.py
2.43
KB
-rw-r--r--
2025-04-10 17:07
GifImagePlugin.py
28.2
KB
-rw-r--r--
2025-04-10 17:07
GimpGradientFile.py
3.27
KB
-rw-r--r--
2025-04-10 17:07
GimpPaletteFile.py
1.24
KB
-rw-r--r--
2025-04-10 17:07
GribStubImagePlugin.py
1.51
KB
-rw-r--r--
2025-04-10 17:07
Hdf5StubImagePlugin.py
1.48
KB
-rw-r--r--
2025-04-10 17:07
IcnsImagePlugin.py
11.44
KB
-rw-r--r--
2025-04-10 17:07
IcoImagePlugin.py
9.9
KB
-rw-r--r--
2025-04-10 17:07
ImImagePlugin.py
10.57
KB
-rw-r--r--
2025-04-10 17:07
Image.py
112.93
KB
-rw-r--r--
2025-04-10 17:07
ImageChops.py
7.14
KB
-rw-r--r--
2025-04-10 17:07
ImageCms.py
35.89
KB
-rw-r--r--
2025-04-10 17:07
ImageColor.py
8.43
KB
-rw-r--r--
2025-04-10 17:07
ImageDraw.py
18.87
KB
-rw-r--r--
2025-04-10 17:07
ImageDraw2.py
4.9
KB
-rw-r--r--
2025-04-10 17:07
ImageEnhance.py
3.12
KB
-rw-r--r--
2025-04-10 17:07
ImageFile.py
20.52
KB
-rw-r--r--
2025-04-10 17:07
ImageFilter.py
15.51
KB
-rw-r--r--
2025-04-10 17:07
ImageFont.py
35.23
KB
-rw-r--r--
2025-04-10 17:07
ImageGrab.py
3.54
KB
-rw-r--r--
2025-04-10 17:07
ImageMath.py
6.89
KB
-rw-r--r--
2025-04-10 17:07
ImageMode.py
1.6
KB
-rw-r--r--
2025-04-10 17:07
ImageMorph.py
7.71
KB
-rw-r--r--
2025-04-10 17:07
ImageOps.py
17.6
KB
-rw-r--r--
2025-04-10 17:07
ImagePalette.py
6.2
KB
-rw-r--r--
2025-04-10 17:07
ImagePath.py
336
B
-rw-r--r--
2025-04-10 17:07
ImageQt.py
5.66
KB
-rw-r--r--
2025-04-10 17:07
ImageSequence.py
1.81
KB
-rw-r--r--
2025-04-10 17:07
ImageShow.py
6.21
KB
-rw-r--r--
2025-04-10 17:07
ImageStat.py
3.81
KB
-rw-r--r--
2025-04-10 17:07
ImageTk.py
9.11
KB
-rw-r--r--
2025-04-10 17:07
ImageTransform.py
2.78
KB
-rw-r--r--
2025-04-10 17:07
ImageWin.py
7.03
KB
-rw-r--r--
2025-04-10 17:07
ImtImagePlugin.py
2.15
KB
-rw-r--r--
2025-04-10 17:07
IptcImagePlugin.py
5.54
KB
-rw-r--r--
2025-04-10 17:07
Jpeg2KImagePlugin.py
8.52
KB
-rw-r--r--
2025-04-10 17:07
JpegImagePlugin.py
27.24
KB
-rw-r--r--
2025-04-10 17:07
JpegPresets.py
12.41
KB
-rw-r--r--
2025-04-10 17:07
McIdasImagePlugin.py
1.71
KB
-rw-r--r--
2025-04-10 17:07
MicImagePlugin.py
2.54
KB
-rw-r--r--
2025-04-10 17:07
MpegImagePlugin.py
1.76
KB
-rw-r--r--
2025-04-10 17:07
MpoImagePlugin.py
4.14
KB
-rw-r--r--
2025-04-10 17:07
MspImagePlugin.py
5.4
KB
-rw-r--r--
2025-04-10 17:07
PSDraw.py
6.58
KB
-rw-r--r--
2025-04-10 17:07
PaletteFile.py
1.08
KB
-rw-r--r--
2025-04-10 17:07
PalmImagePlugin.py
8.88
KB
-rw-r--r--
2025-04-10 17:07
PcdImagePlugin.py
1.47
KB
-rw-r--r--
2025-04-10 17:07
PcfFontFile.py
6.12
KB
-rw-r--r--
2025-04-10 17:07
PcxImagePlugin.py
5.35
KB
-rw-r--r--
2025-04-10 17:07
PdfImagePlugin.py
7.4
KB
-rw-r--r--
2025-04-10 17:07
PdfParser.py
33.62
KB
-rw-r--r--
2025-04-10 17:07
PixarImagePlugin.py
1.61
KB
-rw-r--r--
2025-04-10 17:07
PngImagePlugin.py
40.81
KB
-rw-r--r--
2025-04-10 17:07
PpmImagePlugin.py
4.35
KB
-rw-r--r--
2025-04-10 17:07
PsdImagePlugin.py
7.45
KB
-rw-r--r--
2025-04-10 17:07
PyAccess.py
9.37
KB
-rw-r--r--
2025-04-10 17:07
SgiImagePlugin.py
5.96
KB
-rw-r--r--
2025-04-10 17:07
SpiderImagePlugin.py
9.31
KB
-rw-r--r--
2025-04-10 17:07
SunImagePlugin.py
4.2
KB
-rw-r--r--
2025-04-10 17:07
TarIO.py
1.41
KB
-rw-r--r--
2025-04-10 17:07
TgaImagePlugin.py
6.12
KB
-rw-r--r--
2025-04-10 17:07
TiffImagePlugin.py
65.92
KB
-rw-r--r--
2025-04-10 17:07
TiffTags.py
14.21
KB
-rw-r--r--
2025-04-10 17:07
WalImageFile.py
5.4
KB
-rw-r--r--
2025-04-10 17:07
WebPImagePlugin.py
10.54
KB
-rw-r--r--
2025-04-10 17:07
WmfImagePlugin.py
4.5
KB
-rw-r--r--
2025-04-10 17:07
XVThumbImagePlugin.py
1.9
KB
-rw-r--r--
2025-04-10 17:07
XbmImagePlugin.py
2.39
KB
-rw-r--r--
2025-04-10 17:07
XpmImagePlugin.py
3
KB
-rw-r--r--
2025-04-10 17:07
__init__.py
3.19
KB
-rw-r--r--
2025-04-10 17:07
__main__.py
41
B
-rw-r--r--
2025-04-10 17:07
_binary.py
1.75
KB
-rw-r--r--
2025-04-10 17:07
_imaging.cpython-35m-x86_64-linux-gnu.so
637.91
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingcms.cpython-35m-x86_64-linux-gnu.so
44.27
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingft.cpython-35m-x86_64-linux-gnu.so
39.9
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingmath.cpython-35m-x86_64-linux-gnu.so
24.43
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingmorph.cpython-35m-x86_64-linux-gnu.so
8.12
KB
-rwxr-xr-x
2025-04-10 17:07
_imagingtk.cpython-35m-x86_64-linux-gnu.so
9.37
KB
-rwxr-xr-x
2025-04-10 17:07
_tkinter_finder.py
622
B
-rw-r--r--
2025-04-10 17:07
_util.py
503
B
-rw-r--r--
2025-04-10 17:07
_version.py
50
B
-rw-r--r--
2025-04-10 17:07
_webp.cpython-35m-x86_64-linux-gnu.so
38.5
KB
-rwxr-xr-x
2025-04-10 17:07
features.py
8.62
KB
-rw-r--r--
2025-04-10 17:07
Save
Rename
# # The Python Imaging Library. # $Id$ # # BMP file handler # # Windows (and OS/2) native bitmap storage format. # # history: # 1995-09-01 fl Created # 1996-04-30 fl Added save # 1997-08-27 fl Fixed save of 1-bit images # 1998-03-06 fl Load P images as L where possible # 1998-07-03 fl Load P images as 1 where possible # 1998-12-29 fl Handle small palettes # 2002-12-30 fl Fixed load of 1-bit palette images # 2003-04-21 fl Fixed load of 1-bit monochrome images # 2003-04-23 fl Added limited support for BI_BITFIELDS compression # # Copyright (c) 1997-2003 by Secret Labs AB # Copyright (c) 1995-2003 by Fredrik Lundh # # See the README file for information on usage and redistribution. # from . import Image, ImageFile, ImagePalette from ._binary import i8, i16le as i16, i32le as i32, o8, o16le as o16, o32le as o32 # # -------------------------------------------------------------------- # Read BMP file BIT2MODE = { # bits => mode, rawmode 1: ("P", "P;1"), 4: ("P", "P;4"), 8: ("P", "P"), 16: ("RGB", "BGR;15"), 24: ("RGB", "BGR"), 32: ("RGB", "BGRX"), } def _accept(prefix): return prefix[:2] == b"BM" def _dib_accept(prefix): return i32(prefix[:4]) in [12, 40, 64, 108, 124] # ============================================================================= # Image plugin for the Windows BMP format. # ============================================================================= class BmpImageFile(ImageFile.ImageFile): """ Image plugin for the Windows Bitmap format (BMP) """ # ------------------------------------------------------------- Description format_description = "Windows Bitmap" format = "BMP" # -------------------------------------------------- BMP Compression values COMPRESSIONS = {"RAW": 0, "RLE8": 1, "RLE4": 2, "BITFIELDS": 3, "JPEG": 4, "PNG": 5} for k, v in COMPRESSIONS.items(): vars()[k] = v def _bitmap(self, header=0, offset=0): """ Read relevant info about the BMP """ read, seek = self.fp.read, self.fp.seek if header: seek(header) file_info = {} # read bmp header size @offset 14 (this is part of the header size) file_info["header_size"] = i32(read(4)) file_info["direction"] = -1 # -------------------- If requested, read header at a specific position # read the rest of the bmp header, without its size header_data = ImageFile._safe_read(self.fp, file_info["header_size"] - 4) # -------------------------------------------------- IBM OS/2 Bitmap v1 # ----- This format has different offsets because of width/height types if file_info["header_size"] == 12: file_info["width"] = i16(header_data[0:2]) file_info["height"] = i16(header_data[2:4]) file_info["planes"] = i16(header_data[4:6]) file_info["bits"] = i16(header_data[6:8]) file_info["compression"] = self.RAW file_info["palette_padding"] = 3 # --------------------------------------------- Windows Bitmap v2 to v5 # v3, OS/2 v2, v4, v5 elif file_info["header_size"] in (40, 64, 108, 124): file_info["y_flip"] = i8(header_data[7]) == 0xFF file_info["direction"] = 1 if file_info["y_flip"] else -1 file_info["width"] = i32(header_data[0:4]) file_info["height"] = ( i32(header_data[4:8]) if not file_info["y_flip"] else 2 ** 32 - i32(header_data[4:8]) ) file_info["planes"] = i16(header_data[8:10]) file_info["bits"] = i16(header_data[10:12]) file_info["compression"] = i32(header_data[12:16]) # byte size of pixel data file_info["data_size"] = i32(header_data[16:20]) file_info["pixels_per_meter"] = ( i32(header_data[20:24]), i32(header_data[24:28]), ) file_info["colors"] = i32(header_data[28:32]) file_info["palette_padding"] = 4 self.info["dpi"] = tuple( int(x / 39.3701 + 0.5) for x in file_info["pixels_per_meter"] ) if file_info["compression"] == self.BITFIELDS: if len(header_data) >= 52: for idx, mask in enumerate( ["r_mask", "g_mask", "b_mask", "a_mask"] ): file_info[mask] = i32(header_data[36 + idx * 4 : 40 + idx * 4]) else: # 40 byte headers only have the three components in the # bitfields masks, ref: # https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx # See also # https://github.com/python-pillow/Pillow/issues/1293 # There is a 4th component in the RGBQuad, in the alpha # location, but it is listed as a reserved component, # and it is not generally an alpha channel file_info["a_mask"] = 0x0 for mask in ["r_mask", "g_mask", "b_mask"]: file_info[mask] = i32(read(4)) file_info["rgb_mask"] = ( file_info["r_mask"], file_info["g_mask"], file_info["b_mask"], ) file_info["rgba_mask"] = ( file_info["r_mask"], file_info["g_mask"], file_info["b_mask"], file_info["a_mask"], ) else: raise OSError("Unsupported BMP header type (%d)" % file_info["header_size"]) # ------------------ Special case : header is reported 40, which # ---------------------- is shorter than real size for bpp >= 16 self._size = file_info["width"], file_info["height"] # ------- If color count was not found in the header, compute from bits file_info["colors"] = ( file_info["colors"] if file_info.get("colors", 0) else (1 << file_info["bits"]) ) # ------------------------------- Check abnormal values for DOS attacks if file_info["width"] * file_info["height"] > 2 ** 31: raise OSError("Unsupported BMP Size: (%dx%d)" % self.size) # ---------------------- Check bit depth for unusual unsupported values self.mode, raw_mode = BIT2MODE.get(file_info["bits"], (None, None)) if self.mode is None: raise OSError("Unsupported BMP pixel depth (%d)" % file_info["bits"]) # ---------------- Process BMP with Bitfields compression (not palette) if file_info["compression"] == self.BITFIELDS: SUPPORTED = { 32: [ (0xFF0000, 0xFF00, 0xFF, 0x0), (0xFF0000, 0xFF00, 0xFF, 0xFF000000), (0xFF, 0xFF00, 0xFF0000, 0xFF000000), (0x0, 0x0, 0x0, 0x0), (0xFF000000, 0xFF0000, 0xFF00, 0x0), ], 24: [(0xFF0000, 0xFF00, 0xFF)], 16: [(0xF800, 0x7E0, 0x1F), (0x7C00, 0x3E0, 0x1F)], } MASK_MODES = { (32, (0xFF0000, 0xFF00, 0xFF, 0x0)): "BGRX", (32, (0xFF000000, 0xFF0000, 0xFF00, 0x0)): "XBGR", (32, (0xFF, 0xFF00, 0xFF0000, 0xFF000000)): "RGBA", (32, (0xFF0000, 0xFF00, 0xFF, 0xFF000000)): "BGRA", (32, (0x0, 0x0, 0x0, 0x0)): "BGRA", (24, (0xFF0000, 0xFF00, 0xFF)): "BGR", (16, (0xF800, 0x7E0, 0x1F)): "BGR;16", (16, (0x7C00, 0x3E0, 0x1F)): "BGR;15", } if file_info["bits"] in SUPPORTED: if ( file_info["bits"] == 32 and file_info["rgba_mask"] in SUPPORTED[file_info["bits"]] ): raw_mode = MASK_MODES[(file_info["bits"], file_info["rgba_mask"])] self.mode = "RGBA" if "A" in raw_mode else self.mode elif ( file_info["bits"] in (24, 16) and file_info["rgb_mask"] in SUPPORTED[file_info["bits"]] ): raw_mode = MASK_MODES[(file_info["bits"], file_info["rgb_mask"])] else: raise OSError("Unsupported BMP bitfields layout") else: raise OSError("Unsupported BMP bitfields layout") elif file_info["compression"] == self.RAW: if file_info["bits"] == 32 and header == 22: # 32-bit .cur offset raw_mode, self.mode = "BGRA", "RGBA" else: raise OSError("Unsupported BMP compression (%d)" % file_info["compression"]) # --------------- Once the header is processed, process the palette/LUT if self.mode == "P": # Paletted for 1, 4 and 8 bit images # ---------------------------------------------------- 1-bit images if not (0 < file_info["colors"] <= 65536): raise OSError("Unsupported BMP Palette size (%d)" % file_info["colors"]) else: padding = file_info["palette_padding"] palette = read(padding * file_info["colors"]) greyscale = True indices = ( (0, 255) if file_info["colors"] == 2 else list(range(file_info["colors"])) ) # ----------------- Check if greyscale and ignore palette if so for ind, val in enumerate(indices): rgb = palette[ind * padding : ind * padding + 3] if rgb != o8(val) * 3: greyscale = False # ------- If all colors are grey, white or black, ditch palette if greyscale: self.mode = "1" if file_info["colors"] == 2 else "L" raw_mode = self.mode else: self.mode = "P" self.palette = ImagePalette.raw( "BGRX" if padding == 4 else "BGR", palette ) # ---------------------------- Finally set the tile data for the plugin self.info["compression"] = file_info["compression"] self.tile = [ ( "raw", (0, 0, file_info["width"], file_info["height"]), offset or self.fp.tell(), ( raw_mode, ((file_info["width"] * file_info["bits"] + 31) >> 3) & (~3), file_info["direction"], ), ) ] def _open(self): """ Open file, check magic number and read header """ # read 14 bytes: magic number, filesize, reserved, header final offset head_data = self.fp.read(14) # choke if the file does not have the required magic bytes if not _accept(head_data): raise SyntaxError("Not a BMP file") # read the start position of the BMP image data (u32) offset = i32(head_data[10:14]) # load bitmap information (offset=raster info) self._bitmap(offset=offset) # ============================================================================= # Image plugin for the DIB format (BMP alias) # ============================================================================= class DibImageFile(BmpImageFile): format = "DIB" format_description = "Windows Bitmap" def _open(self): self._bitmap() # # -------------------------------------------------------------------- # Write BMP file SAVE = { "1": ("1", 1, 2), "L": ("L", 8, 256), "P": ("P", 8, 256), "RGB": ("BGR", 24, 0), "RGBA": ("BGRA", 32, 0), } def _dib_save(im, fp, filename): _save(im, fp, filename, False) def _save(im, fp, filename, bitmap_header=True): try: rawmode, bits, colors = SAVE[im.mode] except KeyError as e: raise OSError("cannot write mode %s as BMP" % im.mode) from e info = im.encoderinfo dpi = info.get("dpi", (96, 96)) # 1 meter == 39.3701 inches ppm = tuple(map(lambda x: int(x * 39.3701 + 0.5), dpi)) stride = ((im.size[0] * bits + 7) // 8 + 3) & (~3) header = 40 # or 64 for OS/2 version 2 image = stride * im.size[1] # bitmap header if bitmap_header: offset = 14 + header + colors * 4 file_size = offset + image if file_size > 2 ** 32 - 1: raise ValueError("File size is too large for the BMP format") fp.write( b"BM" # file type (magic) + o32(file_size) # file size + o32(0) # reserved + o32(offset) # image data offset ) # bitmap info header fp.write( o32(header) # info header size + o32(im.size[0]) # width + o32(im.size[1]) # height + o16(1) # planes + o16(bits) # depth + o32(0) # compression (0=uncompressed) + o32(image) # size of bitmap + o32(ppm[0]) # resolution + o32(ppm[1]) # resolution + o32(colors) # colors used + o32(colors) # colors important ) fp.write(b"\0" * (header - 40)) # padding (for OS/2 format) if im.mode == "1": for i in (0, 255): fp.write(o8(i) * 4) elif im.mode == "L": for i in range(256): fp.write(o8(i) * 4) elif im.mode == "P": fp.write(im.im.getpalette("RGB", "BGRX")) ImageFile._save(im, fp, [("raw", (0, 0) + im.size, 0, (rawmode, stride, -1))]) # # -------------------------------------------------------------------- # Registry Image.register_open(BmpImageFile.format, BmpImageFile, _accept) Image.register_save(BmpImageFile.format, _save) Image.register_extension(BmpImageFile.format, ".bmp") Image.register_mime(BmpImageFile.format, "image/bmp") Image.register_open(DibImageFile.format, DibImageFile, _dib_accept) Image.register_save(DibImageFile.format, _dib_save) Image.register_extension(DibImageFile.format, ".dib") Image.register_mime(DibImageFile.format, "image/bmp")