GRAYBYTE WORDPRESS FILE MANAGER7999

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/lib64/python2.7/lib2to3/pgen2/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current 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()

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 15 2024 08:34:30
root / root
0755
__init__.py
0.14 KB
April 10 2024 04:58:35
root / root
0644
__init__.pyc
0.17 KB
April 10 2024 04:58:46
root / root
0644
__init__.pyo
0.17 KB
April 10 2024 04:58:46
root / root
0644
conv.py
9.401 KB
April 10 2024 04:58:35
root / root
0644
conv.pyc
7.997 KB
April 10 2024 04:58:46
root / root
0644
conv.pyo
6.872 KB
April 10 2024 04:58:43
root / root
0644
driver.py
5.899 KB
April 10 2024 04:58:35
root / root
0644
driver.pyc
6.312 KB
April 10 2024 04:58:46
root / root
0644
driver.pyo
6.25 KB
April 10 2024 04:58:43
root / root
0644
grammar.py
6.439 KB
April 10 2024 04:58:35
root / root
0644
grammar.pyc
7.504 KB
April 10 2024 04:58:46
root / root
0644
grammar.pyo
7.504 KB
April 10 2024 04:58:46
root / root
0644
literals.py
1.576 KB
April 10 2024 04:58:35
root / root
0644
literals.pyc
1.971 KB
April 10 2024 04:58:46
root / root
0644
literals.pyo
1.744 KB
April 10 2024 04:58:43
root / root
0644
parse.py
7.864 KB
April 10 2024 04:58:35
root / root
0644
parse.pyc
7.066 KB
April 10 2024 04:58:46
root / root
0644
parse.pyo
7.028 KB
April 10 2024 04:58:43
root / root
0644
pgen.py
13.502 KB
April 10 2024 04:58:35
root / root
0644
pgen.pyc
11.951 KB
April 10 2024 04:58:46
root / root
0644
pgen.pyo
11.353 KB
April 10 2024 04:58:43
root / root
0644
token.py
1.227 KB
April 10 2024 04:58:35
root / root
0755
token.pyc
2.249 KB
April 10 2024 04:58:46
root / root
0644
token.pyo
2.249 KB
April 10 2024 04:58:46
root / root
0644
tokenize.py
18.793 KB
April 10 2024 04:58:35
root / root
0644
tokenize.pyc
16.573 KB
April 10 2024 04:58:46
root / root
0644
tokenize.pyo
16.486 KB
April 10 2024 04:58:43
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF