403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.223
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/tls.py
"""
    pygments.lexers.tls
    ~~~~~~~~~~~~~~~~~~~

    Lexers for the TLS presentation language.

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

from pygments.lexer import RegexLexer, words
from pygments.token import Comment, Operator, Keyword, Name, String, \
    Number, Punctuation, Whitespace

__all__ = ['TlsLexer']


class TlsLexer(RegexLexer):
    """
    The TLS presentation language, described in RFC 8446.

    .. versionadded:: 2.16
    """
    name = 'TLS Presentation Language'
    url = 'https://www.rfc-editor.org/rfc/rfc8446#section-3'
    filenames = []
    aliases = ['tls']
    mimetypes = []

    flags = re.MULTILINE | re.DOTALL

    tokens = {
        'root': [
            (r'\s+', Whitespace),
            # comments
            (r'/[*].*?[*]/', Comment.Multiline),
            # Keywords
            (words(('struct', 'enum', 'select', 'case'), suffix=r'\b'),
             Keyword),
            (words(('uint8', 'uint16', 'uint24', 'uint32', 'uint64', 'opaque'),
                   suffix=r'\b'), Keyword.Type),
            # numeric literals
            (r'0x[0-9a-fA-F]+', Number.Hex),
            (r'[0-9]+', Number.Integer),
            # string literal
            (r'"(\\.|[^"\\])*"', String),
            # tokens
            (r'[.]{2}', Operator),
            (r'[+\-*/&^]', Operator),
            (r'[|<>=!()\[\]{}.,;:\?]', Punctuation),
            # identifiers
            (r'[^\W\d]\w*', Name.Other),
        ]
    }

Youez - 2016 - github.com/yon3zu
LinuXploit