⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.253
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
oscrypto
/
_mac
/
__pycache__
/
View File Name :
_core_foundation_ctypes.cpython-39.pyc
a ������Ih�4����������������������@���s���d�dl�mZmZmZmZ�d�dlmZmZmZm Z m Z mZmZ�d�dlm Z mZmZmZmZ�d�dlZddlmZmZmZ�ddgZd Ze ed d�ZeZeZeZeZeZeZeZeZ eZ!eZ"eZ#eZ$ee!�Z%ee�Z&ee�Z'ee�Z(ee�Z)ee#�Z*ee�Z+ee �Z,eZ-eZ.eZ/eZ0ee�Z1�z`e'gej2_3eej2_4e'gej5_3eej5_4e-e egej6_3e'ej6_4e-e(e%ee.e/gej7_3e+ej7_4e+gej8_3eej8_4e(egej9_3e ej9_4e(e eegej:_3eej:_4e-e egej;_3e(ej;_4e-e$egej<_3e)ej<_4e"gej=_3e(ej=_4e%gej>_3dej>_4e%gej?_3dej?_4e,gej@_3e(ej@_4e,gejA_3e(ejA_4e,gejB_3eejB_4e*gejC_3e ejC_4g�ejD_3e"ejD_4g�ejE_3e"ejE_4g�ejF_3e"ejF_4g�ejG_3e"ejG_4e-ee�ee0gejH_3e&ejH_4e&gejI_3eejI_4e&egejJ_3e%ejJ_4e)gejK_3e$ejK_4e)e$egejL_3eejL_4e+e1e1gejM_3eejM_4e%gejN_3e"ejN_4eOede-�Ped���eOed e%�Ped ���e�Ped�ZQe�Ped�ZRe�Ped�ZSW�n�eT�y����ed��Y�n0�eOede'��eOede,��eOede&��e$d�ZUed�ZVdd��ZWG�dd��d�ZXdS�)�����)�unicode_literals�division�absolute_import�print_function)�c_void_p�c_long�c_uint32�c_char_p�c_byte�c_ulong�c_bool)�CDLL� string_at�cast�POINTER�byrefN����)�FFIEngineError�buffer_from_bytes�byte_string_from_buffer� CFHelpers�CoreFoundationzB/System/Library/Frameworks/CoreFoundation.framework/CoreFoundationT)� use_errno�kCFAllocatorDefaultZkCFBooleanTrue�kCFTypeDictionaryKeyCallBacks�kCFTypeDictionaryValueCallBacks�kCFTypeArrayCallBackszError initializing ctypes� CFDataRef� CFErrorRef� CFArrayRef����i��c�����������������C���s ���t�|�t�S�)z� Casts a value to a pointer of a pointer :param value: A ctypes object :return: A POINTER(c_void_p) object )r���� pointer_p)�value��r#����V/opt/nydus/tmp/pip-target-os3qdbx0/lib/python/oscrypto/_mac/_core_foundation_ctypes.py�_cast_pointer_p����s����r%���c�������������������@���s����e�Zd�ZdZi�Zedd���Zedd���Zedd���Z edd ���Z ed d���Zedd ���Zedd���Z edd���Zedd���Zedd���Zedd���ZdS�)r���z/ Namespace for core foundation helpers c�����������������C���s���||�j�t|�<�dS�)z� Register a function to convert a core foundation data type into its equivalent in python :param type_id: The CFTypeId for the type :param callback: A callback to pass the CFType object to N)�_native_map�int)�cls�type_id�callbackr#���r#���r$����register_native_mapping����s���� z!CFHelpers.register_native_mappingc�����������������C���st���t��t|���}ttjtjtjtjtj ttjtj ttjtjtj ttj tj d�|�}|d�}t�� t|��|t|���|jS�)z� Converts a CFNumber object to a python float or integer :param value: The CFNumber object :return: A python number (float or integer) )����r���������������������������� ���� ������������ ���r �����������r���)r����CFNumberGetTyper%���r ����ctypes�c_short�c_int32�c_int64�c_float�c_double�c_intr���� c_longlong�CFNumberGetValuer���r"���)r"����type_Zc_type�outputr#���r#���r$����cf_number_to_number����s.������zCFHelpers.cf_number_to_numberc�����������������C���sh���t��|��}t|���}t|���}t��|�t|�t|���i�}td|�D�] }t�||��|t�||��<�qB|S�)z� Converts a CFDictionary object into a python dictionary :param dictionary: The CFDictionary to convert :return: A python dict r���)r����CFDictionaryGetCount� CFTypeRef�CFDictionaryGetKeysAndValuesr%����ranger����native)� dictionaryZdict_length�keys�valuesrE����indexr#���r#���r$����cf_dictionary_to_dict ��s���� �zCFHelpers.cf_dictionary_to_dictc�����������������C���s*���t��|�}||�jv�r"|�j|�|�S�|S�dS�)z� Converts a CF* object into its python equivalent :param value: The CF* object to convert :return: The native python object N)r����CFGetTypeIDr&���)r(���r"���r)���r#���r#���r$���rK���<��s���� zCFHelpers.nativec�����������������C���s^���t��t|��t�}|du�rHtd�}t��t|��|dt�}|s@td��t|�}|durZ|�d�}|S�)z� Creates a python unicode string from a CFString object :param value: The CFString to convert :return: A python unicode string Ni���z'Error copying C string from CFStringRef�utf-8) r����CFStringGetCStringPtrr%����kCFStringEncodingUTF8r����CFStringGetCString�OSErrorr����decode)r"����string�buffer�resultr#���r#���r$����cf_string_to_unicodeN��s$������ zCFHelpers.cf_string_to_unicodec�����������������C���s���t��t�j|��d�t�S�)z� Creates a CFStringRef object from a unicode string :param string: The unicode string to create the CFString object from :return: A CFStringRef rR���)r����CFStringCreateWithCStringr����encoderT���)rX���r#���r#���r$����cf_string_from_unicodem��s �����z CFHelpers.cf_string_from_unicodec�����������������C���s���t��|��}t��|��}t||�S�)z� Extracts a bytestring from a CFData object :param value: A CFData object :return: A byte string )r����CFDataGetBytePtr�CFDataGetLengthr���)r"����start� num_bytesr#���r#���r$����cf_data_to_bytes��s���� zCFHelpers.cf_data_to_bytesc�����������������C���s���t��t�j|�t|���S�)z� Creates a CFDataRef object from a byte string :param bytes_: The data to create the CFData object from :return: A CFDataRef )r����CFDataCreater����len)�bytes_r#���r#���r$����cf_data_from_bytes���s �����zCFHelpers.cf_data_from_bytesc�����������������C���st���t�|��}g�}g�}|�D�] }|\}}|�|��|�|��qt|�|��}t|�|��}t�tjtt|��tt|��|t t �S�)a7�� Creates a CFDictionaryRef object from a list of 2-element tuples representing the key and value. Each key should be a CFStringRef and each value some sort of CF* type. :param pairs: A list of 2-element tuples :return: A CFDictionaryRef )re����append�CFStringRefrH���r����CFDictionaryCreater���r%���r���r���r���)�pairs�lengthrM���rN����pair�keyr"���r#���r#���r$����cf_dictionary_from_pairs���s"���� �z"CFHelpers.cf_dictionary_from_pairsc�����������������C���s.���t�|��}t|�|���}�t�tjtt|���|t�S�)z� Creates a CFArrayRef object from a list of CF* type objects. :param values: A list of CF* type object :return: A CFArrayRef )re���rH���r���� CFArrayCreater���r%���r���r���)rN���rl���r#���r#���r$����cf_array_from_list���s���� �zCFHelpers.cf_array_from_listc�����������������C���s���t�|��}t�tjtt|��S�)z� Creates a CFNumber object from an integer :param integer: The integer to create the CFNumber for :return: A CFNumber )r���r����CFNumberCreater����kCFNumberCFIndexTyper���)�integerZinteger_as_longr#���r#���r$����cf_number_from_integer���s�����z CFHelpers.cf_number_from_integerN)�__name__� __module__�__qualname__�__doc__r&����classmethodr+����staticmethodrF���rP���rK���r[���r^���rc���rg���ro���rq���ru���r#���r#���r#���r$���r�������s0��� " )Y� __future__r���r���r���r���r;���r���r���r���r ���r ���r���r���r ���r���r���r���r���Z_ffir���r���r����__all__Zcore_foundation_pathr���ZCFIndexZCFStringEncodingZCFArrayZCFDataZCFStringZCFNumberZCFDictionaryZCFErrorZCFTypeZCFTypeIDZ CFBooleanZCFNumberTyperH���r���r���ri���ZCFNumberRefZCFBooleanRefZCFDictionaryRefr���ZCFAllocatorRefZCFDictionaryKeyCallBacksZCFDictionaryValueCallBacksZCFArrayCallBacksr!���r`����argtypes�restyper_���rd���rj���rG���rS���rU���r\���rr���ZCFCopyTypeIDDescriptionZ CFReleaseZCFRetainZCFErrorCopyDescriptionZCFErrorGetDomainZCFErrorGetCodeZCFBooleanGetValueZCFDictionaryGetTypeIDZCFNumberGetTypeIDZCFStringGetTypeIDZCFDataGetTypeIDrp���ZCFArrayGetCountZCFArrayGetValueAtIndexr:���rC���rI���rQ����setattr�in_dllr���r���r����AttributeErrorrs���rT���r%���r���r#���r#���r#���r$����<module>���s*��$������������������������