Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
zope /
component /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
testfiles
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
__init__.py
2.68
KB
-rw-r--r--
_api.py
8.83
KB
-rw-r--r--
_compat.py
962
B
-rw-r--r--
_declaration.py
1.87
KB
-rw-r--r--
configure.zcml
444
B
-rw-r--r--
event.py
1.2
KB
-rw-r--r--
eventtesting.py
2.04
KB
-rw-r--r--
factory.py
1.71
KB
-rw-r--r--
globalregistry.py
2.67
KB
-rw-r--r--
hookable.py
1.29
KB
-rw-r--r--
hooks.py
4.18
KB
-rw-r--r--
interface.py
4.25
KB
-rw-r--r--
interfaces.py
16.28
KB
-rw-r--r--
meta.zcml
1.12
KB
-rw-r--r--
persistentregistry.py
2.05
KB
-rw-r--r--
registry.py
2.14
KB
-rw-r--r--
security.py
3.54
KB
-rw-r--r--
standalonetests.py
1.18
KB
-rw-r--r--
testing.py
1.23
KB
-rw-r--r--
testlayer.py
4.09
KB
-rw-r--r--
zcml.py
19.94
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : security.py
############################################################################## # # Copyright (c) 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """zope.security support for the configuration handlers """ from zope.interface import providedBy from zope.proxy import ProxyBase from zope.proxy import getProxiedObject from zope.security.adapter import LocatingTrustedAdapterFactory from zope.security.adapter import LocatingUntrustedAdapterFactory from zope.security.adapter import TrustedAdapterFactory from zope.security.checker import Checker from zope.security.checker import CheckerPublic from zope.security.checker import InterfaceChecker from zope.security.proxy import Proxy PublicPermission = 'zope.Public' class PermissionProxy(ProxyBase): __slots__ = ('__Security_checker__', ) def __providedBy__(self): return providedBy(getProxiedObject(self)) __providedBy__ = property(__providedBy__) def _checker(_context, permission, allowed_interface, allowed_attributes): if (not allowed_attributes) and (not allowed_interface): allowed_attributes = ["__call__"] if permission == PublicPermission: permission = CheckerPublic require={} if allowed_attributes: for name in allowed_attributes: require[name] = permission if allowed_interface: for i in allowed_interface: for name in i.names(all=True): require[name] = permission checker = Checker(require) return checker def proxify(ob, checker=None, provides=None, permission=None): """Try to get the object proxied with the `checker`, but not too soon We really don't want to proxy the object unless we need to. """ if checker is None: if provides is None or permission is None: raise ValueError('Required arguments: ' 'checker or both provides and permissions') if permission == PublicPermission: permission = CheckerPublic checker = InterfaceChecker(provides, permission) ob = PermissionProxy(ob) ob.__Security_checker__ = checker return ob def protectedFactory(original_factory, provides, permission): if permission == PublicPermission: permission = CheckerPublic checker = InterfaceChecker(provides, permission) # This has to be named 'factory', aparently, so as not to confuse apidoc :( def factory(*args): ob = original_factory(*args) try: ob.__Security_checker__ = checker except AttributeError: ob = Proxy(ob, checker) return ob factory.factory = original_factory return factory def securityAdapterFactory(factory, permission, locate, trusted): if permission == PublicPermission: permission = CheckerPublic if locate or (permission is not None and permission is not CheckerPublic): if trusted: return LocatingTrustedAdapterFactory(factory) else: return LocatingUntrustedAdapterFactory(factory) elif trusted: return TrustedAdapterFactory(factory) else: return factory
Close