shell bypass 403
�
Tf�M � � � d Z ddlZ ed� � \ ZZZZZ ej dej ej
z � � j Z ej dej � � j
Z ej dej ej z � � j
Z ej dej � � j
Z ej dej � � j
Z ej d ej � � j
Z G d
� de� � Ze� ed� � d
� � Ze� d� dD � � � � e� d� dD � � � � e� d� dD � � � � G d� d� � Zedk rddlmZ edd�� � dS dS )a� Define partial Python code Parser used by editor and hyperparser.
Instances of ParseMap are used with str.translate.
The following bound search and match functions are defined:
_synchre - start of popular statement;
_junkre - whitespace or comment line;
_match_stringre: string, possibly without closer;
_itemre - line that may have bracket structure start;
_closere - line that must be followed by dedent.
_chew_ordinaryre - non-special characters.
� N� z�
^
[ \t]*
(?: while
| else
| def
| return
| assert
| break
| class
| continue
| elif
| try
| except
| raise
| import
| yield
)
\b
z'
[ \t]*
(?: \# \S .* )?
\n
aK
\""" [^"\\]* (?:
(?: \\. | "(?!"") )
[^"\\]*
)*
(?: \""" )?
| " [^"\\\n]* (?: \\. [^"\\\n]* )* "?
| ''' [^'\\]* (?:
(?: \\. | '(?!'') )
[^'\\]*
)*
(?: ''' )?
| ' [^'\\\n]* (?: \\. [^'\\\n]* )* '?
zM
[ \t]*
[^\s#\\] # if we match, m.end()-1 is the interesting char
z_
\s*
(?: return
| break
| continue
| raise
| pass
)
\b
z
[^[\](){}#'"\\]+
c � � e Zd ZdZd� ZdS )�ParseMapap Dict subclass that maps anything not in dict to 'x'.
This is designed to be used with str.translate in study1.
Anything not specifically mapped otherwise becomes 'x'.
Example: replace everything except whitespace with 'x'.
>>> keepwhite = ParseMap((ord(c), ord(c)) for c in ' \t\n\r')
>>> "a + b\tc\nd".translate(keepwhite)
'x x x\tx\nx'
c � � dS )N�x � )�self�keys �8/usr/local/python-3.11/lib/python3.11/idlelib/pyparse.py�__missing__zParseMap.__missing__r s � ��s� N)�__name__�
__module__�__qualname__�__doc__r r r
r r r f s- � � � � � � � �� � � � r
r � r c # �R K � | ]"}t |� � t d � � fV � �#dS )�(N��ord��.0�cs r � <genexpr>r x �3 � � � �/�/�A�c�!�f�f�c�#�h�h�
�/�/�/�/�/�/r
z({[c # �R K � | ]"}t |� � t d � � fV � �#dS )�)Nr r s r r r y r r
z)}]c # �R K � | ]"}t |� � t |� � fV � �#d S �Nr r s r r r z s3 � � � �2�2�!�c�!�f�f�c�!�f�f�
�2�2�2�2�2�2r
z"'\
#c �b � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� Zd� ZdS )�Parserc �"