403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.150
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pygments/lexers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pygments/lexers/asc.py
"""
    pygments.lexers.asc
    ~~~~~~~~~~~~~~~~~~~

    Lexer for various ASCII armored files.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""
import re

from pygments.lexer import RegexLexer, bygroups
from pygments.token import Comment, Generic, Name, Operator, String, Whitespace

__all__ = ['AscLexer']


class AscLexer(RegexLexer):
    """
    Lexer for ASCII armored files, containing `-----BEGIN/END ...-----` wrapped
    base64 data.

    .. versionadded:: 2.10
    """
    name = 'ASCII armored'
    aliases = ['asc', 'pem']
    filenames = [
        '*.asc',  # PGP; *.gpg, *.pgp, and *.sig too, but those can be binary
        '*.pem',  # X.509; *.cer, *.crt, *.csr, and key etc too, but those can be binary
        'id_dsa', 'id_ecdsa', 'id_ecdsa_sk', 'id_ed25519', 'id_ed25519_sk',
        'id_rsa',  # SSH private keys
    ]
    mimetypes = ['application/pgp-keys', 'application/pgp-encrypted',
                 'application/pgp-signature', 'application/pem-certificate-chain']

    flags = re.MULTILINE

    tokens = {
        'root': [
            (r'\s+', Whitespace),
            (r'^-----BEGIN [^\n]+-----$', Generic.Heading, 'data'),
            (r'\S+', Comment),
        ],
        'data': [
            (r'\s+', Whitespace),
            (r'^([^:]+)(:)([ \t]+)(.*)',
             bygroups(Name.Attribute, Operator, Whitespace, String)),
            (r'^-----END [^\n]+-----$', Generic.Heading, 'root'),
            (r'\S+', String),
        ],
    }

    def analyse_text(text):
        if re.search(r'^-----BEGIN [^\n]+-----\r?\n', text):
            return True

Youez - 2016 - github.com/yon3zu
LinuXploit