403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/aptdaemon/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/aptdaemon/__pycache__/policykit1.cpython-310.pyc
o

T@3b��@s�dZdZdZddlZddlmZmZmZddlm	Z	m
Z
dZd	Zd
Z
dZdZd
ZdZdZdZdZdZdZdZdZdZ		d"dd�Z		d"dd�Zd#dd�Zd#dd�Zed#dd��Zed#d d!��ZdS)$zHProvides access to PolicyKit privilege mangement using gdefer Deferreds.z%Sebastian Heinlein <devel@glatzor.de>)�check_authorization_by_name�check_authorization_by_pid�get_pid_from_dbus_name�get_uid_from_dbus_name�!CHECK_AUTH_ALLOW_USER_INTERACTION�CHECK_AUTH_NONE�PK_ACTION_ADD_REMOVE_VENDOR_KEY�PK_ACTION_CANCEL_FOREIGN�PK_ACTION_CHANGE_REPOSITORY�PK_ACTION_CHANGE_CONIFG�!PK_ACTION_GET_TRUSTED_VENDOR_KEYS�PK_ACTION_INSTALL_FILE�$PK_ACTION_INSTALL_OR_REMOVE_PACKAGES�(PK_ACTION_INSTALL_PACKAGES_FROM_NEW_REPO�/PK_ACTION_INSTALL_PACKAGES_FROM_HIGH_TRUST_REPO�$PK_ACTION_INSTALL_PURCHASED_PACKAGES�PK_ACTION_UPDATE_CACHE�PK_ACTION_UPGRADE_PACKAGES�PK_ACTION_SET_PROXY�PK_ACTION_CLEAN�N)�Deferred�inline_callbacks�return_value�)�NotAuthorizedError�AuthorizationFailedz)org.debian.apt.install-or-remove-packagesz)org.debian.apt.install-purchased-packagesz-org.debian.apt.install-packages-from-new-repoz/org.debian.apt.install-packages.high-trust-repozorg.debian.apt.install-filezorg.debian.apt.upgrade-packageszorg.debian.apt.update-cachezorg.debian.apt.cancel-foreignz&org.debian.apt.get-trusted-vendor-keysz org.debian.apt.change-repositoryzorg.debian.apt.change-configzorg.debian.apt.set-proxyzorg.debian.apt.clean�QcC�dd|if}t|||||�S)a�Check if the given sender is authorized for the specified action.

    If the sender is not authorized raise NotAuthorizedError.

    Keyword arguments:
    dbus_name -- D-Bus name of the subject
    action_id -- the PolicyKit policy name of the action
    timeout -- time in seconds for the user to authenticate
    bus -- the D-Bus connection (defaults to the system bus)
    flags -- optional flags to control the authentication process
    zsystem-bus-name�name��_check_authorization)�	dbus_name�	action_id�timeout�bus�flags�subject�r'�6/usr/lib/python3/dist-packages/aptdaemon/policykit1.pyr@�
rcCr)a�Check if the given process is authorized for the specified action.

    If the sender is not authorized raise NotAuthorizedError.

    Keyword arguments:
    pid -- id of the process
    action_id -- the PolicyKit policy name of the action
    timeout -- time in seconds for the user to authenticate
    bus -- the D-Bus connection (defaults to the system bus)
    flags -- optional flags to control the authentication process
    zunix-process�pidr)r*r"r#r$r%r&r'r'r(rQr)rcs`���fdd�}|st��}|durt}t��|�dd�}i}|j��||dd||�jd�	�S)NcsH|\}}}|r��|�dS|r��t����dS��t����dS�N)�callback�errbackrr)�xxx_todo_changeme�
authorized�
challenged�auth_details�r"�deferredr&r'r(�policykit_donecs
z,_check_authorization.<locals>.policykit_donezorg.freedesktop.PolicyKit1z%/org/freedesktop/PolicyKit1/Authority�z$org.freedesktop.PolicyKit1.Authority)�dbus_interfacer#�
reply_handler�
error_handler)�dbus�	SystemBusrr�
get_object�CheckAuthorizationr-)r&r"r#r$r%r4�pk�detailsr'r2r(r bs$�
�r cCs8|st��}t�}|�dd�}|j|d|j|jd�|S)zZReturn a deferred that gets the id of process owning the given
    system D-Bus name.
    zorg.freedesktop.DBusz/org/freedesktop/DBus/Bus)r6r7r8)r9r:rr;�GetConnectionUnixProcessIDr,r-)r!r$r3�bus_objr'r'r(r}s��rccsx�|st��}t||�V}td|��}dd�|��D�}Wd�n1s'wYt|d��d�}t|�dS)z\Return a deferred that gets the uid of the user owning the given
    system D-Bus name.
    �/proc/%s/statuscS�g|]	}|�d�r|�qS�zUid:��
startswith��.0�vr'r'r(�
<listcomp>��z*get_uid_from_dbus_name.<locals>.<listcomp>Nrr)r9r:r�open�	readlines�int�splitr)r!r$r*�proc�values�uidr'r'r(r�s��rccs��|st��}t||�V}td|��}|��}dd�|D�}dd�|D�}Wd�n1s0wYtd|d��}|���d�}Wd�n1sNwYt|d	��d
�}	t|d	��d
�}
t	||	|
|f�dS)zzReturn a deferred that gets the pid, the uid of the user owning the
    given system D-Bus name and its command line.
    rAcSrBrCrDrFr'r'r(rI�rJz0get_proc_info_from_dbus_name.<locals>.<listcomp>cSrB)zGid:rDrFr'r'r(rI�rJNz/proc/%s/cmdline�rbzutf-8rr)
r9r:rrKrL�read�decoderMrNr)r!r$r*rO�lines�
uid_values�
gid_values�cmdline_file�cmdlinerQ�gidr'r'r(�get_proc_info_from_dbus_name�s���r[)rNNr+) �__doc__�
__author__�__all__r9�deferrrr�errorsrrr
rrrrrrrrr	�PK_ACTION_CHANGE_CONFIGrrrrrrr rrr[r'r'r'r(�<module>sJ����
�
�




Youez - 2016 - github.com/yon3zu
LinuXploit