SILENT KILLERPanel

Current Path: > > usr > lib64 > python2.7 > lib2to3 > pgen2 >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //usr/lib64/python2.7/lib2to3/pgen2/

NameTypeSizeLast ModifiedActions
__init__.py File 143 bytes April 10 2024 04:58:35.
__init__.pyc File 174 bytes April 10 2024 04:58:46.
__init__.pyo File 174 bytes April 10 2024 04:58:46.
conv.py File 9627 bytes April 10 2024 04:58:35.
conv.pyc File 8189 bytes April 10 2024 04:58:46.
conv.pyo File 7037 bytes April 10 2024 04:58:43.
driver.py File 6041 bytes April 10 2024 04:58:35.
driver.pyc File 6463 bytes April 10 2024 04:58:46.
driver.pyo File 6400 bytes April 10 2024 04:58:43.
grammar.py File 6594 bytes April 10 2024 04:58:35.
grammar.pyc File 7684 bytes April 10 2024 04:58:46.
grammar.pyo File 7684 bytes April 10 2024 04:58:46.
literals.py File 1614 bytes April 10 2024 04:58:35.
literals.pyc File 2018 bytes April 10 2024 04:58:46.
literals.pyo File 1786 bytes April 10 2024 04:58:43.
parse.py File 8053 bytes April 10 2024 04:58:35.
parse.pyc File 7236 bytes April 10 2024 04:58:46.
parse.pyo File 7197 bytes April 10 2024 04:58:43.
pgen.py File 13826 bytes April 10 2024 04:58:35.
pgen.pyc File 12238 bytes April 10 2024 04:58:46.
pgen.pyo File 11625 bytes April 10 2024 04:58:43.
token.py File 1256 bytes April 10 2024 04:58:35.
token.pyc File 2303 bytes April 10 2024 04:58:46.
token.pyo File 2303 bytes April 10 2024 04:58:46.
tokenize.py File 19244 bytes April 10 2024 04:58:35.
tokenize.pyc File 16971 bytes April 10 2024 04:58:46.
tokenize.pyo File 16882 bytes April 10 2024 04:58:43.

Reading File: //usr/lib64/python2.7/lib2to3/pgen2//literals.py

# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Safely evaluate Python string literals without using eval()."""

import re

simple_escapes = {"a": "\a",
                  "b": "\b",
                  "f": "\f",
                  "n": "\n",
                  "r": "\r",
                  "t": "\t",
                  "v": "\v",
                  "'": "'",
                  '"': '"',
                  "\\": "\\"}

def escape(m):
    all, tail = m.group(0, 1)
    assert all.startswith("\\")
    esc = simple_escapes.get(tail)
    if esc is not None:
        return esc
    if tail.startswith("x"):
        hexes = tail[1:]
        if len(hexes) < 2:
            raise ValueError("invalid hex string escape ('\\%s')" % tail)
        try:
            i = int(hexes, 16)
        except ValueError:
            raise ValueError("invalid hex string escape ('\\%s')" % tail)
    else:
        try:
            i = int(tail, 8)
        except ValueError:
            raise ValueError("invalid octal string escape ('\\%s')" % tail)
    return chr(i)

def evalString(s):
    assert s.startswith("'") or s.startswith('"'), repr(s[:1])
    q = s[0]
    if s[:3] == q*3:
        q = q*3
    assert s.endswith(q), repr(s[-len(q):])
    assert len(s) >= 2*len(q)
    s = s[len(q):-len(q)]
    return re.sub(r"\\(\'|\"|\\|[abfnrtv]|x.{0,2}|[0-7]{1,3})", escape, s)

def test():
    for i in range(256):
        c = chr(i)
        s = repr(c)
        e = evalString(s)
        if e != c:
            print i, c, s, e


if __name__ == "__main__":
    test()

SILENT KILLER Tool