CasperSecurity

Current Path : /lib/python3/dist-packages/gyp/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/gyp/__pycache__/MSVSUserFile.cpython-310.pyc

o

p.a��@sTdZddlZddlZddlZddlZddlmZdd�Zdd�Z	Gdd�de
�ZdS)	z+Visual Studio user preferences file writer.�NcCshd|vsd|vr
|Stj�dd��tj�}|D]}tj�||�}tj�|�r1t�|tj	�r1|Sq|S)a{If there are no slashes in the command given, this function
     searches the PATH env to find the given command, and converts it
     to an absolute path.  We have to do this because MSVS is looking
     for an actual file to launch a debugger on, not just a command
     line.  Note that this happens at GYP time, so anything needing to
     be built needs to have a full path.�/�\�PATH�)
�os�environ�get�split�pathsep�path�join�isfile�access�X_OK)�command�pathsr�item�r�2/usr/lib/python3/dist-packages/gyp/MSVSUserFile.py�_FindCommandInPaths�rcCsXg}|D]%}|�d�dkrd�|�d��}d|}n
t�d|�r$d|}|�|�q|S)N�"���z""z"%s"z[ \t\n])�findrr	�re�search�append)�args�new_args�argrrr�_QuoteWin32CommandLineArgs&s
rc@s6eZdZdZdd�Zdd�Zidfdd�Zd	d
�ZdS)�Writerz(Visual Studio XML user user file writer.cCs||_||_||_i|_dS)z�Initializes the user file.

    Args:
      user_file_path: Path to the user file.
      version: Version info.
      name: Name of the user file.
    N)�user_file_path�version�name�configurations)�selfr!r"r#rrr�__init__9s
zWriter.__init__cCsdd|ig|j|<dS)zTAdds a configuration to the project.

    Args:
      name: Configuration name.
    �
Configuration�NameN)r$)r%r#rrr�	AddConfigFszWriter.AddConfigrcCs�t|�}t|d�}|r t|t�r dd�|��D�}d�|�}nd}did|�d|�d	d�|d
d���dt���d
|�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dddddd��g}||jvrt|�	|�|j|�
|�dS) a;Adds a DebugSettings node to the user file for a particular config.

    Args:
      command: command line to run.  First element in the list is the
        executable.  All elements of the command will be quoted if
        necessary.
      working_directory: other files which may trigger the rule. (optional)
    rcSsg|]
\}}d||f�qS)z%s="%s"r)�.0�key�valrrr�
<listcomp>]s�z+Writer.AddDebugSettings.<locals>.<listcomp>� r�
DebugSettings�Command�WorkingDirectory�CommandArguments�N�
RemoteMachine�Environment�EnvironmentMerge�true�Attach�false�DebuggerType�3�Remote�1�
RemoteCommand�HttpUrl�PDBPath�SQLDebugging�DebuggerFlavor�0�
MPIRunCommand�MPIRunArguments�MPIRunWorkingDirectory)�ApplicationCommand�ApplicationArguments�ShimCommand�
MPIAcceptMode�MPIAcceptFilter)rr�
isinstance�dict�itemsr�socket�gethostnamer$r)r)r%�config_namer�environment�working_directory�abs_command�env_list�n_cmdrrr�AddDebugSettingsNsh
������
���
����������

zWriter.AddDebugSettingscCsVdg}t|j���D]	\}}|�|�q
d|j��|jd�|g}tj||j	dd�dS)zWrites the user file.�Configurations�VisualStudioUserFile)�Versionr(zWindows-1252)�encodingN)
�sortedr$rNrr"�ProjectVersionr#�easy_xml�WriteXmlIfChangedr!)r%�configs�config�spec�contentrrr�WriteIfChanged�s��

�zWriter.WriteIfChangedN)�__name__�
__module__�__qualname__�__doc__r&r)rWrdrrrrr 6s

�9r )rhrrrO�
gyp.common�gyp�gyp.easy_xmlr^rr�objectr rrrr�<module>s
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY