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__/highlight.cpython-36.pyc
3

x2_�#�@s�dZdZddlZddlZddlZddlZddlZddlZdd�Z	dd�Z
dd	�Zd
d�ZdOdPdQdRdSdTdUdVd�Z
e
fdd�ZdWdd�Zdddddddd d!�Zd"Zd#eefd$d%�Zd&d'd(d)d*d)d+d,d�Zd-Zd.d/�Zd#eefd0d1�Zed2k�r�ddlZddlZddlZddlZddlZejdejej d3�d4�Z!e!j"d5d6d7d8�e!j"d9d:d;d<d=�e!j"d>d?d;d@d=�e!j"dAdBd;dCd=�e!j"dDdEd;dFd=�e!j"dGdHd;dId=�e!j#�Z$e$j%�r�e$j&�s�e$j'�r�e!j(dJ�e$j)Z)e*e)��Z+e+j,�Z-WdQRXee-�Z.e$j/�r�ee.�Z0nNe$j'�s
e$j&�ree.e)dK�Z0n0e$j%�r*ee.�Z0ne$j1�r@ee.e)dK�Z0nee.�Z0e$j&�r�ej2j3ej2j4e)��ddLZ5e*e5dM��Z+e+j6e0�WdQRXej*dNej2j7e5��nej8j6e0�dS)Xz-Add syntax highlighting to Python source codezRaymond Hettinger�NcCs
tt|�S)z)Return True if s is the name of a builtin)�hasattr�builtins)�s�r�</opt/alt/python36/lib64/python3.6/Tools/scripts/highlight.py�
is_builtinsrcCs|||\}}\}}||kr2||d||�|fS||d|d�g|||d�||dd|�g}dj|�|fS)z8Join content from a range of lines between start and end�N�)�join)�lines�start�end�srow�scol�erow�ecolZrowsrrr�
combine_ranges
<rccsz|jd�}|jd�tjtt|�d�}d}}tj}d}�xtj|�D�]}||}}	|\}}\}
}\}}
}d}|tjkr�d}n�|tj	kr�|dd�dkr�d}nz|tj
kr�d	}|tjks�|dkr�d
}nT|tjk�r|dkr�d}n:|	dk�r�d}n*t
j|��rd}nt|��r|	dk�rd}|rFt|||
|f�\}}d|fV|||
f}}||fVqFWt||||
f�\}}d|fVdS)z�Generate and classify chunks of Python for syntax highlighting.
       Yields tuples in the form: (category, categorized_text).
    Tr	rr�commentNz{}[](),.:;@�operator�string�	docstring�def�class�import�from�
definition�defname�keyword�.�builtin)rr)rrrr)rr)�
splitlines�append�	functools�partial�next�iter�tokenize�COMMENT�generate_tokens�OP�STRING�INDENT�NAMEr�	iskeywordrr)�sourcer�readline�kindZtok_str�tok_typeZwritten�tokZ
prev_tok_typeZprev_tok_strrrrrZlogical_lineno�textZline_upto_tokenrrr�analyze_pythonsD






r4cCs6g}x&|D]\}}|jd|pd|f�q
Wdj|�S)z-Straight text display of text classificationsz
%15s:  %r
Zplainr	)r!r
)�classified_text�resultr0r3rrr�
raw_highlightDsr7������)rrrrrrrrcCs>g}x.|D]&\}}|j|d�\}}||||g7}q
Wdj|�S)zBAdd syntax highlighting to source code using ANSI escape sequencesr	)r	r	)�getr
)r5Zcolorsr6r0r3�opener�closerrrr�ansi_highlightXs
rA�<pre class="python">
�</pre>
cCs\|g}x@|D]8\}}|r&|jd|�|jtj|��|r|jd�qW|j|�dj|�S)z+Convert classified text to an HTML fragmentz<span class="%s">z</span>r	)r!�html_module�escaper
)r5r?r@r6r0r3rrr�html_highlightcs
rFz{color: crimson;}z{color: forestgreen;}z({color: forestgreen; font-style:italic;}z{color: darkorange;}z{color: purple;}z&{color: darkorange; font-weight:bold;}z{color: blue;}z{color: brown;})z.commentz.stringz
.docstringz.keywordz.builtinz.definitionz.defnamez	.operatora<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title> {title} </title>
<style type="text/css">
{css}
</style>
</head>
<body>
{body}
</body>
</html>
�pythoncCs:djdd�|j�D��}t|�}tj|�}|j|||d�S)z6Create a complete HTML page with colorized source code�
cSsg|]}d|�qS)z%s %sr)�.0�itemrrr�
<listcomp>�sz#build_html_page.<locals>.<listcomp>)�title�css�body)r
�itemsrFrDrE�format)r5rLrM�htmlZcss_strr6rrr�build_html_page�s
rRz{\color{red}#1}z{\color{ForestGreen}#1}z{\emph{\color{ForestGreen}#1}}z{\color{orange}#1}z{\color{purple}#1}z{\color{blue}#1}z{\color{brown}#1}a
\documentclass{article}
\usepackage{alltt}
\usepackage{upquote}
\usepackage{color}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[cm]{fullpage}
%(macros)s
\begin{document}
\center{\LARGE{%(title)s}}
\begin{alltt}
%(body)s
\end{alltt}
\end{document}
cs"dddd��tjd�fdd�|�S)z;Replace backslash and braces with their escaped equivalentsz\{z\}z\textbackslash{})�{�}�\z[\\{}]cs�|j�S)N)�group)Zmo)�xlatrr�<lambda>�szalltt_escape.<locals>.<lambda>)�re�sub)rr)rWr�alltt_escape�sr[cCstdjdd�|j�D��}g}x>|D]6\}}|r<|jd|�|jt|��|r"|jd�q"Wtt||dj|�d�S)z;Create a complete LaTeX document with colorized source coderHcss|]}d|VqdS)z\newcommand{\py%s}[1]{%s}Nr)rI�crrr�	<genexpr>�sz"latex_highlight.<locals>.<genexpr>z\py%s{rTr	)rL�macrosrN)r
rOr!r[�default_latex_document�dict)r5rLZcommandsZdocumentr^r6r0r3rrr�latex_highlight�sra�__main__aa
                examples:

                  # Show syntax highlighted code in the terminal window
                  $ ./highlight.py myfile.py

                  # Colorize myfile.py and display in a browser
                  $ ./highlight.py -b myfile.py

                  # Create an HTML section to embed in an existing webpage
                  ./highlight.py -s myfile.py

                  # Create a complete HTML file
                  $ ./highlight.py -c myfile.py > myfile.html

                  # Create a PDF using LaTeX
                  $ ./highlight.py -l myfile.py | pdflatex

            )ZdescriptionZformatter_classZepilog�
sourcefileZ
SOURCEFILEz!file containing Python sourcecode)�metavar�helpz-bz	--browser�
store_truez launch a browser to show results)�actionrez-cz
--completezbuild a complete html webpagez-lz--latexzbuild a LaTeX documentz-rz--rawzraw parse of categorized textz-sz	--sectionz3show an HTML section rather than a complete webpagezVThe -s/--section option is incompatible with the -b/--browser or -c/--complete options)rLz.html�wzfile://)r8r9)r:r9)r:r9)r;r9)r<r9)r;r9)r=r9)r;r9)rBrC)9�__doc__�
__author__rr"rQrDrrYr&rrr4r7Zdefault_ansirArFZdefault_cssZdefault_htmlrRZdefault_latex_commandsr_r[ra�__name__�argparseZos.path�os�sys�textwrapZ
webbrowser�ArgumentParserZRawDescriptionHelpFormatter�dedent�parser�add_argument�
parse_args�argsZsectionZbrowserZcomplete�errorrc�open�f�readr.r5�rawZencodedZlatex�path�splitext�basenameZhtmlfile�write�abspath�stdoutrrrr�<module>s�)
















Youez - 2016 - github.com/yon3zu
LinuXploit