403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/win32utils.cpython-313.pyc
�

p��g�;����SrSSKrSSKrSSKrSSKJr \"\"5S5 SrSrSrS	r	S
r
SrSrS
r
SrSrSrS!SjrS"SjrSrSrSrSrSrSrSrSrSrSrSrSrSrS#Sjr Sr!\!r"S r#g)$z Win32-specific helper functions.�N�)�lazy_importzK
import ctypes

from breezy import cmdline
from breezy.i18n import gettext
i����i����i����i���c��SSKJn "SS[R5n[RR
R
5nU"5n[RRRU[RU5[RU55nU(dUR[S55 gURURURUR UR"UR$UR&UR(UR*UR,S.
nU(a8UR[S5R/US	S
-USS
-U55 gU(aURSU5 UR[S
5US	S
-5 UR[S5USS
-5 UR[S5UR1SS5S
-5 UR[S5UR1SS5S
-5 UR[S5UR1SS5S
-5 UR[S5UR1SS55 g)z1Use trace.note() to dump the running memory info.r��tracec�:�\rSrSrSrS\R4S\R4S\R4S\R4S\R4S\R4S	\R4S
\R4S\R4S\R4S
\R4/rSr	g)�9debug_memory_win32api.<locals>.PROCESS_MEMORY_COUNTERS_EX�>zUsed by GetProcessMemoryInfo.�cb�PageFaultCount�PeakWorkingSetSize�WorkingSetSize�QuotaPeakPagedPoolUsage�QuotaPagedPoolUsage�QuotaPeakNonPagedPoolUsage�QuotaNonPagedPoolUsage�
PagefileUsage�PeakPagefileUsage�PrivateUsage�N)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__�ctypes�c_ulong�c_size_t�_fields_�__static_attributes__r��3/usr/lib/python3/dist-packages/breezy/win32utils.py�PROCESS_MEMORY_COUNTERS_EXr>s���+��6�>�>�"�
�v�~�~�.�
!�6�?�?�3�
�v���/�
&����8�
"�F�O�O�4�
)�6�?�?�;�
%�v���7�
�f�o�o�.�
 �&�/�/�2�
�V�_�_�-�
�r'r)z Failed to GetProcessMemoryInfo()N)
rrrrrrrrrrz/WorkingSize {0:>7}KiB	PeakWorking {1:>7}KiB	{2}rirz%szWorkingSize       %8d KiBzPeakWorking       %8d KiBzPagefileUsage     %8d KiBrzPeakPagefileUsage %8d KiBrzPrivateUsage      %8d KiBrzPageFaultCount    %8dr)�breezyr
r"�	Structure�windll�kernel32�GetCurrentProcess�psapi�GetProcessMemoryInfo�byref�sizeof�note�gettextrrrrrrrrrr�format�get)�message�shortr
r)�cur_process�
mem_struct�ret�infos        r(�debug_memory_win32apir=:s���
�V�%5�%5�
�"�-�-�(�(�:�:�<�K�+�-�J�
�-�-�
�
�
2�
2��V�\�\�*�-�v�}�}�Z�/H��C��
�
�
�7�=�>�?��$�3�3�(�;�;�$�3�3�#-�#E�#E�)�=�=�&0�&K�&K�",�"C�"C�#�1�1�'�9�9�"�/�/��D�
�
�
�
��G�H�O�O��%�&��-��)�*�T�1��
�	
�	��
�
�
�4��!�	�J�J�w�2�3�T�:J�5K�d�5R�S�	�J�J�w�2�3�T�:N�5O�RV�5V�W�	�J�J��+�,�d�h�h���.J�T�.Q��
�J�J��+�,�d�h�h�7J�A�.N�QU�.U��
�J�J�w�2�3�T�X�X�n�a�5P�SW�5W�X�	�J�J�w�.�/����:J�A�1N�Or'c�`�[RRR[5n[RS5n[RRR
X#5nU(a:[R"SUR5upVpxp�p�p�nX�-
S-nX�-
S-nUU4$X4$)z�Return size of current console.

This function try to determine actual size of current working
console window and return tuple (sizex, sizey) if success,
or default size (defaultx, defaulty) otherwise.
��hhhhHhhhhhhr)
r"r,r-�GetStdHandle�WIN32_STDERR_HANDLE�create_string_buffer�GetConsoleScreenBufferInfo�struct�unpack�raw)�defaultx�defaulty�h�csbi�res�bufx�bufy�curx�cury�wattr�left�top�right�bottom�maxx�maxy�sizex�sizeys                  r(�get_console_sizerZ{s���	�
�
���+�+�,?�@�A��&�&�r�*�D�
�-�-�
 �
 �
;�
;�A�
D�C�
��M�M�-����2�	N��T��c�&����q� ����q� ���u�~���#�#r'c���[RRRn[R	[
5nU"SX S5(aUR$g![a gf=f)z`Call SHGetSpecialFolderPathW if available, or return None.

Result is always unicode (or None).
Nr)r"r,�shell32�SHGetSpecialFolderPathW�create_unicode_buffer�MAX_PATH�value�AttributeError)�csidl�SHGetSpecialFolderPath�bufs   r(�_get_sh_special_folder_pathre�sa��
�!'���!6�!6�!N�!N���*�*�8�4��!�$��A�6�6��9�9��7��	�
��
�s�$A�
A(�'A(c�p�[[5nU(aU$[RR	S5$)agReturn Application Data location.
Return None if we cannot obtain location.

Windows defines two 'Application Data' folders per user - a 'roaming'
one that moves with the user as they logon to different machines, and
a 'local' one that stays local to the machine.  This returns the 'roaming'
directory, and thus is suitable for storing user-preferences, etc.
�APPDATA)re�
CSIDL_APPDATA�os�environr6)�appdatas r(�get_appdata_locationrl�s)��*�-�8�G����
�:�:�>�>�)�$�$r'c��[[5nU(aU$[RR	S5nU(aU$[5$)a�Return Local Application Data location.
Return the same as get_appdata_location() if we cannot obtain location.

Windows defines two 'Application Data' folders per user - a 'roaming'
one that moves with the user as they logon to different machines, and
a 'local' one that stays local to the machine.  This returns the 'local'
directory, and thus is suitable for caches, temp files and other things
which don't need to move with the user.
�LOCALAPPDATA)re�CSIDL_LOCAL_APPDATArirjr6rl)�locals r(�get_local_appdata_locationrq�s:��
(�(;�<�E�����J�J�N�N�>�*�E�����!�!r'c���[[5nU(aU$[RR	S5nUbU$[RR	S5nUb>[R
R
[RR	SS5U5$[RR	S5nU(a%[R
RU5SS-$g)	z�Return user's home location.
Assume on win32 it's the <My Documents> folder.
If location cannot be obtained return system drive root,
i.e. C:    �HOME�HOMEPATH�HOMEDIR��WINDIRr�/zC:/)re�CSIDL_PERSONALrirjr6�path�join�
splitdrive)�home�homepath�windirs   r(�get_home_locationr��s���'�~�6�D����
�:�:�>�>�&�!�D������z�z�~�~�j�)�H����w�w�|�|�B�J�J�N�N�9�b�9�4�@�@�
�Z�Z�^�^�H�
%�F�
��w�w�!�!�&�)�!�,�s�2�2�r'c�z�[RRnURn[R	[
S-5n[R
[
S-5nU"U[RU55(aUR$[RRS5$![a N+f=f)zHReturn user name as login name.
If name cannot be obtained return None.
r�USERNAME)
r"r,�advapi32�GetUserNameWr^�UNLEN�c_intr1r`rarirjr6)r��GetUserNamerd�ns    r(�
get_user_namer��s���	��=�=�)�)���+�+���*�*�5�1�9�5���L�L����#���s�F�L�L��O�,�,��9�9��-��:�:�>�>�*�%�%���
��
�s�&B-�-
B:�9B:c�d�[R[S-5n[R[S-5n[	[R
RSS5nUb2U"[U[RU55(aUR$[RRS5$)zyReturn host machine name.
If name cannot be obtained return None.

:return: A unicode string representing the host name.
r�GetComputerNameExWN�COMPUTERNAME)
r"r^�MAX_COMPUTERNAME_LENGTHr��getattrr,r-�_WIN32_ComputerNameDnsHostnamer1r`rirjr6)rdr��GetComputerNameExs   r(�
get_host_namer��s����
&�
&�'>��'B�
C�C����,�q�0�1�A� ��
�
� 6� 6�8L�d�S���$�):�&��V�\�\�!�_�*�*��y�y��
�:�:�>�>�.�)�)r'c��[RRU5S(a,URS5(dURS5(aSU-S4$US4$)Nr�*�?z./TF)rirz�split�
startswith)rzs r(�_ensure_with_dirr�sL��
�7�7�=�=���q�!�T�_�_�S�%9�%9�T�_�_�S�=Q�=Q��d�{�D� � ��U�{�r'c��U(aUSS$U$)Nr
r)rz�	correcteds  r(�_undo_ensure_with_dirr�
s����A�B�x���r'c��[U5up[R"U5nU(dU/nO"U(aUVs/sHn[XB5PM nnUVs/sHoDRSS5PM sn$s snfs snf)z�Same as glob.glob().

work around bugs in glob.glob()
- Python bug #1001604 ("glob doesn't return unicode with ...")
- failing expansion for */* with non-iso-8859-* chars
�\rx)r��globr��replace)�
possible_glob�corrected_globr��
glob_files�elems     r(�glob_oner�so��!1�� ?��N����>�*�J��$�_�
�	�IS�T���+�D�<��
�T�0:�;�
��L�L��s�#�
�;�;��U��;s�A3�A8c�b�U(d/$/nUHnUR[U55 M U$)a	Replacement for glob expansion by the shell.

Win32's cmd.exe does not do glob expansion (eg ``*.py``), so we do our own
here.

:param file_list: A list of filenames which may include shell globs.
:return: An expanded list of filenames.

Introduced in breezy 0.18.
)�extendr�)�	file_list�expanded_file_listr�s   r(�glob_expandr�'s5����	���"�
��!�!�(�=�"9�:�#��r'c��SSKnUn[RRU5S(dUS-nUR	UR
SU-5nURUS5upEURU5 U[:XaU$U$![a Us$f=f![a UsURU5 $f=f!URU5 f=f)a�Look up in Windows registry for full path to application executable.
Typically, applications create subkey with their basename
in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\

:param  appname:    name of application (if no filename extension
                    is specified, .exe used)
:return:    full path to aplication executable from registry,
            or appname itself if nothing found.
rNrz.exez4SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\rv)
�winregrirz�splitext�OpenKey�HKEY_LOCAL_MACHINE�OSError�QueryValueEx�CloseKey�REG_SZ)�appnamer��basename�hkeyrz�type_ids      r(�get_app_pathr�:s�����H�
�7�7���H�%�a�(��V�#����~�~��%�%�G�(�R�
���	�"�/�/��b�9�M�D�'�	������&�����N���������	��N������	��	�����s5�B	�B�	B�B�B;�'B>�:B;�;B>�>Cc���SSKJnJnJn [R
RRnX24UlXl	SnU"X5(d-[R5nSSKJn URSX5 gg)z*Set file attributes to hidden if possible.r)�BOOL�DWORD�LPWSTRr
rrz(Unable to set hidden attribute on %r: %sN)�ctypes.wintypesr�r�r�r"r,r-�SetFileAttributesW�argtypes�restype�WinErrorrvr
�mutter)rzr�r�r��SetFileAttributes�FILE_ATTRIBUTE_HIDDEN�er
s        r(�set_file_attr_hiddenr�_se��3�3��
�
�.�.�A�A��!'���� $�����T�9�9��O�O����
���?��I�	:r'c�t�[RXS9n[U5n[U5[U5:a[	S5eU[U5[U5-
Sn/nUHTupgU(d[
R"U5(dURU5 M:UR[U55 MV U$)aConvert a Unicode command line into a list of argv arguments.

It performs wildcard expansion to make wildcards act closer to how they
work in posix shells, versus how they work by default on Windows. Quoted
arguments are left untouched.

:param command_line: The unicode string to split into an arg list.
:param single_quotes_allowed: Whether single quotes are accepted as quoting
                              characters like double quotes. False by
                              default.
:return: A list of unicode strings.
)�single_quotes_allowedz-Split command line can't be shorter than argvN)
�cmdline�Splitter�list�len�AssertionErrorr��	has_magic�appendr�r�)�command_line�argvr��s�	arguments�args�	is_quoted�args        r(�_command_line_to_argvr�os���	�����S�A��Q��I��9�~��D�	�!��L�M�M��#�i�.�3�t�9�4�6�7�I��D�#��	��D�N�N�3�/�/��K�K����K�K���
�&�	$�
�Kr'c��[RRnURSSU5nU(d7[R	5nUS:XagUS:Xag[RU5eUR
U5 g)z?True if pid doesn't correspond to live process on this machine.rFr�WT)r"r,r-�OpenProcess�GetLastErrorr��CloseHandle)�pidr-�handle�	errorcodes    r(�_ctypes_is_local_pid_deadr��sj���}�}�%�%�H�
�
!�
!�!�U�C�
0�F���'�'�)�	���>��
�"�_���o�o�i�(�(����� �r'c
���Sn[RRnURn[R	US-5nU"USSSSSUU5(aUR
$g)z�Return file system type for a drive on the system.

Args:
  drive: Unicode string with drive including trailing backslash (e.g.
     "C:\\")

Returns:
  Windows filesystem type name (e.g. "FAT32", "NTFS") or None
  if the drive can not be found
�rNr)r"r,r-�GetVolumeInformationWr^r`)�drive�MAX_FS_TYPE_LENGTHr-�GetVolumeInformation�fs_types     r(�get_fs_typer��so�����}�}�%�%�H�#�9�9���*�*�+=��+A�B�G��
��	������	�	��}�}��r')rvT)�P�)F)$r!r�rirEr�globals�WIN32_STDIN_HANDLE�WIN32_STDOUT_HANDLErBrhroryr_r�r�r��
REG_EXPAND_SZr=rZrerlrqr�r�r�r�r�r�r�r�r�r�r�r��is_local_pid_deadr�rr'r(�<module>r�s���"'��	�
�$���I����������
�����������
���
�>P�B$�0�
%� "�(�.&�("#��*�$��<�&�&"�J
J� &�R
� .��r'

Youez - 2016 - github.com/yon3zu
LinuXploit