OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
automat
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/17/2025 09:32:20 AM
rwxr-xr-x
📄
__init__.py
169 bytes
05/23/2016 11:01:06 PM
rw-r--r--
📁
__pycache__
-
10/21/2019 03:49:51 PM
rwxr-xr-x
📄
_core.py
4.71 KB
05/16/2017 10:15:41 PM
rw-r--r--
📄
_discover.py
4.26 KB
11/19/2016 08:35:36 PM
rw-r--r--
📄
_introspection.py
1.09 KB
05/18/2016 05:43:06 AM
rw-r--r--
📄
_methodical.py
11.58 KB
05/16/2017 11:11:19 PM
rw-r--r--
📁
_test
-
10/21/2019 03:49:51 PM
rwxr-xr-x
📄
_visualize.py
6.19 KB
05/16/2017 10:58:07 PM
rw-r--r--
Editing: _introspection.py
Close
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellvars" ] if str is not bytes: names.insert(1, "kwonlyargcount") values = [ changes.get(name, getattr(template, "co_" + name)) for name in names ] return code(*values) def copyfunction(template, funcchanges, codechanges): names = [ "globals", "name", "defaults", "closure", ] values = [ funcchanges.get(name, getattr(template, "__" + name + "__")) for name in names ] return function(copycode(template.__code__, codechanges), *values) def preserveName(f): """ Preserve the name of the given function on the decorated function. """ def decorator(decorated): return copyfunction(decorated, dict(name=f.__name__), dict(name=f.__name__)) return decorator