Linux ams-business-8.hostwindsdns.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
LiteSpeed
Server IP : 192.236.177.161 & Your IP : 216.73.216.50
Domains :
Cant Read [ /etc/named.conf ]
User : ajzdfbpz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib64 /
python3.6 /
site-packages /
PIL /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-07-04 11:33
BdfFontFile.py
3.29
KB
-rw-r--r--
2018-04-12 21:15
BlpImagePlugin.py
14.26
KB
-rw-r--r--
2024-07-03 09:03
BmpImagePlugin.py
12.83
KB
-rw-r--r--
2018-04-12 21:15
BufrStubImagePlugin.py
1.48
KB
-rw-r--r--
2018-04-12 21:15
ContainerIO.py
2.63
KB
-rw-r--r--
2018-04-12 21:15
CurImagePlugin.py
2.02
KB
-rw-r--r--
2018-04-12 21:15
DcxImagePlugin.py
1.98
KB
-rw-r--r--
2018-04-12 21:15
DdsImagePlugin.py
4.88
KB
-rw-r--r--
2018-04-12 21:15
EpsImagePlugin.py
12.59
KB
-rw-r--r--
2024-07-03 09:03
ExifTags.py
8.63
KB
-rw-r--r--
2018-04-12 21:15
FitsStubImagePlugin.py
1.58
KB
-rw-r--r--
2018-04-12 21:15
FliImagePlugin.py
4
KB
-rw-r--r--
2018-04-12 21:15
FontFile.py
2.77
KB
-rw-r--r--
2018-04-12 21:15
FpxImagePlugin.py
6.23
KB
-rw-r--r--
2018-04-12 21:15
FtexImagePlugin.py
3.19
KB
-rw-r--r--
2018-04-12 21:15
GbrImagePlugin.py
2.66
KB
-rw-r--r--
2018-04-12 21:15
GdImageFile.py
2.15
KB
-rw-r--r--
2018-04-12 21:15
GifImagePlugin.py
26.11
KB
-rw-r--r--
2024-07-03 09:03
GimpGradientFile.py
3.27
KB
-rw-r--r--
2018-04-12 21:15
GimpPaletteFile.py
1.31
KB
-rw-r--r--
2018-04-12 21:15
GribStubImagePlugin.py
1.5
KB
-rw-r--r--
2018-04-12 21:15
Hdf5StubImagePlugin.py
1.48
KB
-rw-r--r--
2018-04-12 21:15
IcnsImagePlugin.py
10.82
KB
-rw-r--r--
2024-07-03 09:03
IcoImagePlugin.py
9.22
KB
-rw-r--r--
2024-07-03 09:03
ImImagePlugin.py
9.92
KB
-rw-r--r--
2018-04-12 21:15
Image.py
93.16
KB
-rw-r--r--
2018-04-12 21:15
ImageChops.py
6.04
KB
-rw-r--r--
2018-04-12 21:15
ImageCms.py
35.76
KB
-rw-r--r--
2018-04-12 21:15
ImageColor.py
8.05
KB
-rw-r--r--
2018-04-12 21:15
ImageDraw.py
13.32
KB
-rw-r--r--
2018-04-12 21:15
ImageDraw2.py
3.15
KB
-rw-r--r--
2018-04-12 21:15
ImageEnhance.py
3.12
KB
-rw-r--r--
2018-04-12 21:15
ImageFile.py
20.27
KB
-rw-r--r--
2024-07-03 09:03
ImageFilter.py
7.23
KB
-rw-r--r--
2018-04-12 21:15
ImageFont.py
20.66
KB
-rw-r--r--
2024-07-03 09:03
ImageGrab.py
2.1
KB
-rw-r--r--
2018-04-12 21:15
ImageMath.py
7.83
KB
-rw-r--r--
2024-07-03 09:03
ImageMode.py
1.52
KB
-rw-r--r--
2018-04-12 21:15
ImageMorph.py
8.12
KB
-rw-r--r--
2018-04-12 21:15
ImageOps.py
15.73
KB
-rw-r--r--
2018-04-12 21:15
ImagePalette.py
6.17
KB
-rw-r--r--
2018-04-12 21:15
ImagePath.py
1.26
KB
-rw-r--r--
2018-04-12 21:15
ImageSequence.py
1.21
KB
-rw-r--r--
2018-04-12 21:15
ImageShow.py
5.14
KB
-rw-r--r--
2018-04-12 21:15
ImageStat.py
3.76
KB
-rw-r--r--
2018-04-12 21:15
ImageTransform.py
2.74
KB
-rw-r--r--
2018-04-12 21:15
ImageWin.py
7
KB
-rw-r--r--
2018-04-12 21:15
ImtImagePlugin.py
2.19
KB
-rw-r--r--
2018-04-12 21:15
IptcImagePlugin.py
6.64
KB
-rw-r--r--
2018-04-12 21:15
Jpeg2KImagePlugin.py
7.55
KB
-rw-r--r--
2018-04-12 21:15
JpegImagePlugin.py
26.98
KB
-rw-r--r--
2018-04-12 21:15
JpegPresets.py
12.11
KB
-rw-r--r--
2018-04-12 21:15
McIdasImagePlugin.py
1.73
KB
-rw-r--r--
2018-04-12 21:15
MicImagePlugin.py
2.4
KB
-rw-r--r--
2018-04-12 21:15
MpegImagePlugin.py
1.79
KB
-rw-r--r--
2018-04-12 21:15
MpoImagePlugin.py
2.91
KB
-rw-r--r--
2018-04-12 21:15
MspImagePlugin.py
5.39
KB
-rw-r--r--
2018-04-12 21:15
OleFileIO.py
152
B
-rw-r--r--
2018-04-12 21:15
PSDraw.py
6.69
KB
-rw-r--r--
2018-04-12 21:15
PaletteFile.py
1.08
KB
-rw-r--r--
2018-04-12 21:15
PalmImagePlugin.py
8.94
KB
-rw-r--r--
2018-04-12 21:15
PcdImagePlugin.py
1.48
KB
-rw-r--r--
2018-04-12 21:15
PcfFontFile.py
5.99
KB
-rw-r--r--
2018-04-12 21:15
PcxImagePlugin.py
5.29
KB
-rw-r--r--
2024-07-03 09:03
PdfImagePlugin.py
7.16
KB
-rw-r--r--
2018-04-12 21:15
PdfParser.py
32.64
KB
-rw-r--r--
2024-07-03 09:03
PixarImagePlugin.py
1.63
KB
-rw-r--r--
2018-04-12 21:15
PngImagePlugin.py
25.09
KB
-rw-r--r--
2018-04-12 21:15
PpmImagePlugin.py
4.11
KB
-rw-r--r--
2018-04-12 21:15
PsdImagePlugin.py
7.76
KB
-rw-r--r--
2024-07-03 09:03
PyAccess.py
8.61
KB
-rw-r--r--
2018-04-12 21:15
SgiImagePlugin.py
5.97
KB
-rw-r--r--
2018-04-12 21:15
SunImagePlugin.py
4.22
KB
-rw-r--r--
2018-04-12 21:15
TarIO.py
1.21
KB
-rw-r--r--
2018-04-12 21:15
TgaImagePlugin.py
4.88
KB
-rw-r--r--
2018-04-12 21:15
TiffImagePlugin.py
63.49
KB
-rw-r--r--
2024-07-03 09:03
TiffTags.py
14.1
KB
-rw-r--r--
2018-04-12 21:15
WalImageFile.py
5.43
KB
-rw-r--r--
2018-04-12 21:15
WebPImagePlugin.py
9.45
KB
-rw-r--r--
2018-04-12 21:15
WmfImagePlugin.py
4.15
KB
-rw-r--r--
2018-04-12 21:15
XVThumbImagePlugin.py
1.91
KB
-rw-r--r--
2018-04-12 21:15
XbmImagePlugin.py
2.45
KB
-rw-r--r--
2018-04-12 21:15
XpmImagePlugin.py
3.03
KB
-rw-r--r--
2018-04-12 21:15
__init__.py
1.66
KB
-rw-r--r--
2018-04-12 21:15
_binary.py
1.75
KB
-rw-r--r--
2018-04-12 21:15
_imaging.cpython-36m-x86_64-linux-gnu.so
391.95
KB
-rwxr-xr-x
2024-07-03 09:03
_imagingcms.cpython-36m-x86_64-linux-gnu.so
35.89
KB
-rwxr-xr-x
2024-07-03 09:03
_imagingft.cpython-36m-x86_64-linux-gnu.so
30.39
KB
-rwxr-xr-x
2024-07-03 09:03
_imagingmath.cpython-36m-x86_64-linux-gnu.so
20.16
KB
-rwxr-xr-x
2024-07-03 09:03
_imagingmorph.cpython-36m-x86_64-linux-gnu.so
11.84
KB
-rwxr-xr-x
2024-07-03 09:03
_tkinter_finder.py
702
B
-rw-r--r--
2018-04-12 21:15
_util.py
553
B
-rw-r--r--
2018-04-12 21:15
_webp.cpython-36m-x86_64-linux-gnu.so
25.16
KB
-rwxr-xr-x
2024-07-03 09:03
features.py
1.83
KB
-rw-r--r--
2018-04-12 21:15
version.py
50
B
-rw-r--r--
2018-04-12 21:15
Save
Rename
""" Blizzard Mipmap Format (.blp) Jerome Leclanche <jerome@leclan.ch> The contents of this file are hereby released in the public domain (CC0) Full text of the CC0 license: https://creativecommons.org/publicdomain/zero/1.0/ BLP1 files, used mostly in Warcraft III, are not fully supported. All types of BLP2 files used in World of Warcraft are supported. The BLP file structure consists of a header, up to 16 mipmaps of the texture Texture sizes must be powers of two, though the two dimensions do not have to be equal; 512x256 is valid, but 512x200 is not. The first mipmap (mipmap #0) is the full size image; each subsequent mipmap halves both dimensions. The final mipmap should be 1x1. BLP files come in many different flavours: * JPEG-compressed (type == 0) - only supported for BLP1. * RAW images (type == 1, encoding == 1). Each mipmap is stored as an array of 8-bit values, one per pixel, left to right, top to bottom. Each value is an index to the palette. * DXT-compressed (type == 1, encoding == 2): - DXT1 compression is used if alpha_encoding == 0. - An additional alpha bit is used if alpha_depth == 1. - DXT3 compression is used if alpha_encoding == 1. - DXT5 compression is used if alpha_encoding == 7. """ import struct from io import BytesIO from . import Image, ImageFile BLP_FORMAT_JPEG = 0 BLP_ENCODING_UNCOMPRESSED = 1 BLP_ENCODING_DXT = 2 BLP_ENCODING_UNCOMPRESSED_RAW_BGRA = 3 BLP_ALPHA_ENCODING_DXT1 = 0 BLP_ALPHA_ENCODING_DXT3 = 1 BLP_ALPHA_ENCODING_DXT5 = 7 def unpack_565(i): return ( ((i >> 11) & 0x1f) << 3, ((i >> 5) & 0x3f) << 2, (i & 0x1f) << 3 ) def decode_dxt1(data, alpha=False): """ input: one "row" of data (i.e. will produce 4*width pixels) """ blocks = len(data) // 8 # number of blocks in row ret = (bytearray(), bytearray(), bytearray(), bytearray()) for block in range(blocks): # Decode next 8-byte block. idx = block * 8 color0, color1, bits = struct.unpack("<HHI", data[idx:idx + 8]) r0, g0, b0 = unpack_565(color0) r1, g1, b1 = unpack_565(color1) # Decode this block into 4x4 pixels # Accumulate the results onto our 4 row accumulators for j in range(4): for i in range(4): # get next control op and generate a pixel control = bits & 3 bits = bits >> 2 a = 0xFF if control == 0: r, g, b = r0, g0, b0 elif control == 1: r, g, b = r1, g1, b1 elif control == 2: if color0 > color1: r = (2 * r0 + r1) // 3 g = (2 * g0 + g1) // 3 b = (2 * b0 + b1) // 3 else: r = (r0 + r1) // 2 g = (g0 + g1) // 2 b = (b0 + b1) // 2 elif control == 3: if color0 > color1: r = (2 * r1 + r0) // 3 g = (2 * g1 + g0) // 3 b = (2 * b1 + b0) // 3 else: r, g, b, a = 0, 0, 0, 0 if alpha: ret[j].extend([r, g, b, a]) else: ret[j].extend([r, g, b]) return ret def decode_dxt3(data): """ input: one "row" of data (i.e. will produce 4*width pixels) """ blocks = len(data) // 16 # number of blocks in row ret = (bytearray(), bytearray(), bytearray(), bytearray()) for block in range(blocks): idx = block * 16 block = data[idx:idx + 16] # Decode next 16-byte block. bits = struct.unpack("<8B", block[:8]) color0, color1 = struct.unpack("<HH", block[8:12]) code, = struct.unpack("<I", block[12:]) r0, g0, b0 = unpack_565(color0) r1, g1, b1 = unpack_565(color1) for j in range(4): high = False # Do we want the higher bits? for i in range(4): alphacode_index = (4 * j + i) // 2 a = bits[alphacode_index] if high: high = False a >>= 4 else: high = True a &= 0xf a *= 17 # We get a value between 0 and 15 color_code = (code >> 2 * (4 * j + i)) & 0x03 if color_code == 0: r, g, b = r0, g0, b0 elif color_code == 1: r, g, b = r1, g1, b1 elif color_code == 2: r = (2 * r0 + r1) // 3 g = (2 * g0 + g1) // 3 b = (2 * b0 + b1) // 3 elif color_code == 3: r = (2 * r1 + r0) // 3 g = (2 * g1 + g0) // 3 b = (2 * b1 + b0) // 3 ret[j].extend([r, g, b, a]) return ret def decode_dxt5(data): """ input: one "row" of data (i.e. will produce 4 * width pixels) """ blocks = len(data) // 16 # number of blocks in row ret = (bytearray(), bytearray(), bytearray(), bytearray()) for block in range(blocks): idx = block * 16 block = data[idx:idx + 16] # Decode next 16-byte block. a0, a1 = struct.unpack("<BB", block[:2]) bits = struct.unpack("<6B", block[2:8]) alphacode1 = ( bits[2] | (bits[3] << 8) | (bits[4] << 16) | (bits[5] << 24) ) alphacode2 = bits[0] | (bits[1] << 8) color0, color1 = struct.unpack("<HH", block[8:12]) code, = struct.unpack("<I", block[12:]) r0, g0, b0 = unpack_565(color0) r1, g1, b1 = unpack_565(color1) for j in range(4): for i in range(4): # get next control op and generate a pixel alphacode_index = 3 * (4 * j + i) if alphacode_index <= 12: alphacode = (alphacode2 >> alphacode_index) & 0x07 elif alphacode_index == 15: alphacode = (alphacode2 >> 15) | ((alphacode1 << 1) & 0x06) else: # alphacode_index >= 18 and alphacode_index <= 45 alphacode = (alphacode1 >> (alphacode_index - 16)) & 0x07 if alphacode == 0: a = a0 elif alphacode == 1: a = a1 elif a0 > a1: a = ((8 - alphacode) * a0 + (alphacode - 1) * a1) // 7 elif alphacode == 6: a = 0 elif alphacode == 7: a = 255 else: a = ((6 - alphacode) * a0 + (alphacode - 1) * a1) // 5 color_code = (code >> 2 * (4 * j + i)) & 0x03 if color_code == 0: r, g, b = r0, g0, b0 elif color_code == 1: r, g, b = r1, g1, b1 elif color_code == 2: r = (2 * r0 + r1) // 3 g = (2 * g0 + g1) // 3 b = (2 * b0 + b1) // 3 elif color_code == 3: r = (2 * r1 + r0) // 3 g = (2 * g1 + g0) // 3 b = (2 * b1 + b0) // 3 ret[j].extend([r, g, b, a]) return ret class BLPFormatError(NotImplementedError): pass class BlpImageFile(ImageFile.ImageFile): """ Blizzard Mipmap Format """ format = "BLP" format_description = "Blizzard Mipmap Format" def _open(self): self.magic = self.fp.read(4) self._read_blp_header() if self.magic == b"BLP1": decoder = "BLP1" self.mode = "RGB" elif self.magic == b"BLP2": decoder = "BLP2" self.mode = "RGBA" if self._blp_alpha_depth else "RGB" else: raise BLPFormatError("Bad BLP magic %r" % (self.magic)) self.tile = [ (decoder, (0, 0) + self.size, 0, (self.mode, 0, 1)) ] def _read_blp_header(self): self._blp_compression, = struct.unpack("<i", self.fp.read(4)) self._blp_encoding, = struct.unpack("<b", self.fp.read(1)) self._blp_alpha_depth, = struct.unpack("<b", self.fp.read(1)) self._blp_alpha_encoding, = struct.unpack("<b", self.fp.read(1)) self._blp_mips, = struct.unpack("<b", self.fp.read(1)) self.size = struct.unpack("<II", self.fp.read(8)) if self.magic == b"BLP1": # Only present for BLP1 self._blp_encoding, = struct.unpack("<i", self.fp.read(4)) self._blp_subtype, = struct.unpack("<i", self.fp.read(4)) self._blp_offsets = struct.unpack("<16I", self.fp.read(16 * 4)) self._blp_lengths = struct.unpack("<16I", self.fp.read(16 * 4)) class _BLPBaseDecoder(ImageFile.PyDecoder): _pulls_fd = True def decode(self, buffer): try: self.fd.seek(0) self.magic = self.fd.read(4) self._read_blp_header() self._load() except struct.error: raise IOError("Truncated Blp file") return 0, 0 def _safe_read(self, length): return ImageFile._safe_read(self.fd, length) def _read_palette(self): ret = [] for i in range(256): try: b, g, r, a = struct.unpack("<4B", self._safe_read(4)) except struct.error: break ret.append((b, g, r, a)) return ret def _read_blp_header(self): self._blp_compression, = struct.unpack("<i", self._safe_read(4)) self._blp_encoding, = struct.unpack("<b", self._safe_read(1)) self._blp_alpha_depth, = struct.unpack("<b", self._safe_read(1)) self._blp_alpha_encoding, = struct.unpack("<b", self._safe_read(1)) self._blp_mips, = struct.unpack("<b", self._safe_read(1)) self.size = struct.unpack("<II", self._safe_read(8)) if self.magic == b"BLP1": # Only present for BLP1 self._blp_encoding, = struct.unpack("<i", self._safe_read(4)) self._blp_subtype, = struct.unpack("<i", self._safe_read(4)) self._blp_offsets = struct.unpack("<16I", self._safe_read(16 * 4)) self._blp_lengths = struct.unpack("<16I", self._safe_read(16 * 4)) class BLP1Decoder(_BLPBaseDecoder): def _load(self): if self._blp_compression == BLP_FORMAT_JPEG: self._decode_jpeg_stream() elif self._blp_compression == 1: if self._blp_encoding in (4, 5): data = bytearray() palette = self._read_palette() _data = BytesIO(self._safe_read(self._blp_lengths[0])) while True: try: offset, = struct.unpack("<B", _data.read(1)) except struct.error: break b, g, r, a = palette[offset] data.extend([r, g, b]) self.set_as_raw(bytes(data)) else: raise BLPFormatError( "Unsupported BLP encoding %r" % (self._blp_encoding) ) else: raise BLPFormatError( "Unsupported BLP compression %r" % (self._blp_encoding) ) def _decode_jpeg_stream(self): from PIL.JpegImagePlugin import JpegImageFile jpeg_header_size, = struct.unpack("<I", self._safe_read(4)) jpeg_header = self._safe_read(jpeg_header_size) self._safe_read(self._blp_offsets[0] - self.fd.tell()) # What IS this? data = self._safe_read(self._blp_lengths[0]) data = jpeg_header + data data = BytesIO(data) image = JpegImageFile(data) Image._decompression_bomb_check(image.size) self.tile = image.tile # :/ self.fd = image.fp self.mode = image.mode class BLP2Decoder(_BLPBaseDecoder): def _load(self): palette = self._read_palette() data = bytearray() self.fd.seek(self._blp_offsets[0]) if self._blp_compression == 1: # Uncompressed or DirectX compression if self._blp_encoding == BLP_ENCODING_UNCOMPRESSED: _data = BytesIO(self._safe_read(self._blp_lengths[0])) while True: try: offset, = struct.unpack("<B", _data.read(1)) except struct.error: break b, g, r, a = palette[offset] data.extend((r, g, b)) elif self._blp_encoding == BLP_ENCODING_DXT: if self._blp_alpha_encoding == BLP_ALPHA_ENCODING_DXT1: linesize = (self.size[0] + 3) // 4 * 8 for yb in range((self.size[1] + 3) // 4): for d in decode_dxt1( self._safe_read(linesize), alpha=bool(self._blp_alpha_depth) ): data += d elif self._blp_alpha_encoding == BLP_ALPHA_ENCODING_DXT3: linesize = (self.size[0] + 3) // 4 * 16 for yb in range((self.size[1] + 3) // 4): for d in decode_dxt3(self._safe_read(linesize)): data += d elif self._blp_alpha_encoding == BLP_ALPHA_ENCODING_DXT5: linesize = (self.size[0] + 3) // 4 * 16 for yb in range((self.size[1] + 3) // 4): for d in decode_dxt5(self._safe_read(linesize)): data += d else: raise BLPFormatError("Unsupported alpha encoding %r" % ( self._blp_alpha_encoding )) else: raise BLPFormatError( "Unknown BLP encoding %r" % (self._blp_encoding) ) else: raise BLPFormatError( "Unknown BLP compression %r" % (self._blp_compression) ) self.set_as_raw(bytes(data)) Image.register_open( BlpImageFile.format, BlpImageFile, lambda p: p[:4] in (b"BLP1", b"BLP2") ) Image.register_extension(BlpImageFile.format, ".blp") Image.register_decoder("BLP1", BLP1Decoder) Image.register_decoder("BLP2", BLP2Decoder)