Website : rimsha.abasa.com
backdoor
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
lib
/
python3
/
dist-packages
/
olefile
/
__pycache__
/
Filename :
olefile.cpython-310.pyc
back
Copy
o 6��[_� � @ s� d Z ddlmZ dZdZdZg d�ZddlZddlZddl Z ddl Z ddlZddl Z ddlZeeur4eZzeZW n eZY e � d�jd krJdZne � d �jd krUd Zne � d�jd kr`dZned��ze W n eys eZY nw d Zejd dk r�dZndZejd fdd�Zed�Z dd� Z!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-d Z.dZ/dZ0dZ1dZ2dZ3dZ4d Z5dZ6dZ7d Z8d!Z9d"Z:d#Z;d$Z<d%Z=d&Z>d'Z?d(Z@d)ZAd*ZBd+ZCd,ZDd-ZEd.ZFd/ZGd0ZHd1ZId2ZJd3ZKd4ZLd5ZMd6ZNd7ZOd8ZPd9ZQd:ZRd;ZSd<ZTd=ZUd>ZVd?ZWd@ZXdAZYdBZZd#Z[d,Z\d6Z]dCZ^dDZ_dEdF� Z`eeu �rdGdH� ZandIdH� Zad]dJdK�Zbd]dLdM�ZcdNdO� ZddPdQ� ZeG dRdS� dS�ZfG dTdU� dUejg�ZhG dVdW� dW�ZiG dXdY� dY�ZjdZd[� Zkeld\k�r_ek� dS dS )^a: olefile (formerly OleFileIO_PL) Module to read/write Microsoft OLE2 files (also called Structured Storage or Microsoft Compound Document File Format), such as Microsoft Office 97-2003 documents, Image Composer and FlashPix files, Outlook messages, ... This version is compatible with Python 2.7 and 3.4+ Project website: https://www.decalage.info/olefile olefile is copyright (c) 2005-2018 Philippe Lagadec (https://www.decalage.info) olefile is based on the OleFileIO module from the PIL library v1.1.7 See: http://www.pythonware.com/products/pil/index.htm and http://svn.effbot.org/public/tags/pil-1.1.7/PIL/OleFileIO.py The Python Imaging Library (PIL) is Copyright (c) 1997-2009 by Secret Labs AB Copyright (c) 1995-2009 by Fredrik Lundh See source code and LICENSE.txt for information on usage and redistribution. � )�print_functionz 2018-09-09z0.46zPhilippe Lagadec)� isOleFile� OleFileIO�OleMetadata�enable_logging�MAGIC�STGTY_EMPTY�KEEP_UNICODE_NAMES�STGTY_STREAM� STGTY_STORAGE� STGTY_ROOT�STGTY_PROPERTY�STGTY_LOCKBYTES�MINIMAL_OLEFILE_SIZE� DEFECT_UNSURE�DEFECT_POTENTIAL�DEFECT_INCORRECT�DEFECT_FATAL�DEFAULT_PATH_ENCODING� MAXREGSECT�DIFSECT�FATSECT� ENDOFCHAIN�FREESECT� MAXREGSID�NOSTREAM�UNKNOWN_SIZE� WORD_CLSIDN�L� �I�iz>Need to fix a bug with 32 bit arrays, please contact author...T� zutf-8� c C sL | t jjjv rt �| �}|�|� |S t �| �}|�t �� � |�|� |S )an Create a suitable logger object for this module. The goal is not to change settings of the root logger, to avoid getting other modules' logs on the screen. If a logger exists with same name, reuse it. (Else it would have duplicate handlers and messages would be doubled.) The level is set to CRITICAL+1 by default, to avoid any logging. )�logging�Logger�manager� loggerDict� getLogger�setLevel� addHandler�NullHandler)�name�level�logger� r/ �1/usr/lib/python3/dist-packages/olefile/olefile.py� get_logger� s r1 �olefilec C s t �tj� dS )z� Enable logging for this module (disabled by default). This will set the module-specific logger level to NOTSET, which means the main application controls the actual logging level. N)�logr) r$ �NOTSETr/ r/ r/ r0 r � s r s ��ࡱ�l �� l �� l �� l �� � �� � � i���� � � � � � � � � � � � � � � � � � � � � � � � � �@ �A �B �C �D �E �F �G �H � z$00020900-0000-0000-C000-000000000046�( i c C s� t | d�r| �tt��}| �d� n0t| t�r&t| �tkr&| dtt�� }nt| d��}|�tt��}W d � n1 s=w Y |tkrHdS dS )aJ Test if a file is an OLE container (according to the magic bytes in its header). .. note:: This function only checks the first 8 bytes of the file, not the rest of the OLE structure. .. versionadded:: 0.16 :param filename: filename, contents or file-like object of the OLE file (string-like or file-like object) - if filename is a string smaller than 1536 bytes, it is the path of the file to open. (bytes or unicode string) - if filename is a string longer than 1535 bytes, it is parsed as the content of an OLE file in memory. (bytes type only) - if filename is a file-like object (with read and seek methods), it is parsed as-is. :type filename: bytes or str or unicode or file :returns: True if OLE, False otherwise. :rtype: bool �readr N�rbTF) �hasattrr\ �lenr �seek� isinstance�bytesr �open)�filename�header�fpr/ r/ r0 r s �r c C s t | �S �N)�ord��cr/ r/ r0 �i8? s rk c C s | j tu r| S | d S �Nr )� __class__�intri r/ r/ r0 rk C s c C � t �d| ||d � �d S )z� Converts a 2-bytes (16 bits) string to an integer. :param c: string containing bytes to convert :param o: offset of bytes to convert in string z<Hr6 r ��struct�unpack�rj �or/ r/ r0 �i16G � ru c C ro )z� Converts a 4-bytes (32 bits) string to an integer. :param c: string containing bytes to convert :param o: offset of bytes to convert in string z<Ir r rp rs r/ r/ r0 �i32Q rv rw c C sT t | �dksJ �| �d�sdS dt| d�t| d�t| d�fttt| dd� �� S ) z^ Converts a CLSID to a human-readable string. :param clsid: string of length 16. rA � � z0%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02Xr r r8 r: )r_ �striprw ru �tuple�maprk )�clsidr/ r/ r0 �_clsid[ s ��r~ c C s( t � dddddd�}|t j| d d� S )zL convert FILETIME (64 bits int) to Python datetime.datetime �A r# r r<