403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/UpdateManager/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

{��f�N�@s�ddlmZmZddlmZddlmZmZddlmZddlmZddlm	Z	ddl
mmm
mmmZeddlZe�dd	e�ddlZddlZddlZddlZddlZddlZddlZdd
lmZddlZddlZddl m!Z!e!dd
�ddl"m"Z"ddl#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-ddl.m/Z/ddl0m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;m<Z<ddl=m>Z>m?Z?dZ@Gdd�dejA�ZBGdd�dejCjD�ZEdS)�)�absolute_import�print_function)�Gtk)�Gdk�GdkX11)�Gio)�GLib)�GObjectN�ignorezAccessed deprecated property)�gettext)�
DBusGMainLoopT)�set_as_default�)�UnitySupport)
�DistUpgradeDialog�ErrorDialog�HWEUpgradeDialog�NeedRestartDialog�NoUpdatesDialog�NoUpgradeForYouDialog�PartialUpgradeDialog�StoppedUpdatesDialog�UnsupportedDialog�UpdateErrorDialog)�MetaRelease)�UpdatesAvailable)�AlertWatcher)�MyCache)�NetworkManagerHelper)�
UpdateList)�get_arch�get_dist�SoftwarePropertiesPage)�InstallBackend�get_backendz/var/run/reboot-requiredc@s�eZdZdZdd�Zd9dd�Zdd�Zd	d
�Zdd�Zd
d�Z	d:dd�Z
dd�Zdd�Ze
jfdd�Zdd�Zd;dd�Zd<dd�Zdd �Zd!d"�Zd#d$�Z		d=d%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�ZdS)>�
UpdateManagerz� This class is the main window and work flow controller. The main
        window will show panes, and it will morph between them. cs2tj���|�_|�_t��_d�_d�_g�_	d�_
d�_d�_t
��_g�_t��_��td����d���tjj����}|�d�fdd���_��d�j�����jr��jjr���d������ ���!d��j�"d���d	�j#��_$t%�jo��jj&�jo��jj'�jo��jj(��_dS)
NzSoftware Updaterzsystem-software-update�changedcs���S�N)�resize_to_standard_width)�ctx��self��=/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py�<lambda>j�z(UpdateManager.__init__.<locals>.<lambda>zdelete-eventFTzfocus-in-event))r�Window�__init__�datadir�optionsr�unity�
controller�cache�ua_security_packages�update_list�meta_release�hwe_replacement_packages�set�oem_metapackages�duplicate_packagesr �arch�	set_title�_�
set_icon_name�set_position�WindowPosition�CENTER�get_style_context�connect�
style_changed�	_on_close�_setup_dbus�no_focus_on_map�set_focus_on_map�iconify�stick�set_urgency_hint�set_urgency�on_initial_focus_in�initial_focus_idr�
devel_release�use_proposed�debug)r+r2r3r)r,r*r-r1QsH

�

�
�zUpdateManager.__init__rcs<��d��dkr�dkrt����fdd��dSdSdS)NTrcs�����Sr')�resizer,�r+�
stored_height�stored_widthr,r-r.�sz4UpdateManager.begin_user_resizable.<locals>.<lambda>)�
set_resizabler�idle_add)r+rXrWr,rVr-�begin_user_resizable�s
�z"UpdateManager.begin_user_resizablecCs|�d�dS�NF)rYr*r,r,r-�end_user_resizable�sz UpdateManager.end_user_resizablecCs||��rdSd}|����}|dkrd}|��}t�||j�|�dtj	j
�}|d||}|�|d�t�||j�dS)N�!r�`z	font-size�H���)
�
get_resizable�
get_screen�get_resolutionrEr	�signal_handler_blockrG�get_propertyr�
StateFlags�NORMAL�set_size_request�signal_handler_unblock)r+�num_em�dpir)�size�widthr,r,r-r(�sz&UpdateManager.resize_to_standard_widthcCs.|��|�d�|j�d�|�|j�dS)z6callback run on initial focus-in (if started unmapped)F)�unstickrNr4rO�
disconnectrQ)r+�widget�eventr,r,r-rP�s

z!UpdateManager.on_initial_focus_incCs�|jdur|j��t|jtj�r|j��||_|��|��|dur'dSt|tj�r<|�|�|�	�|�
�dS|�	�|��dSr')r5�stop�
isinstancer�Widget�destroy�_look_readyr]�add�start�show_all�hide)r+�paner,r,r-�_start_pane�s



zUpdateManager._start_paneNcCs|��Sr')�close)r+rq�datar,r,r-rH�r/zUpdateManager._on_closecCs0|��sdS|jr|j��}|r|S|��dS�NT)�
get_sensitiver5r~�exit)r+�controller_closer,r,r-r~�s
zUpdateManager.closecCs|�d�t�d�dS)z& exit the application, save the state Nr)r}�sysr�r*r,r,r-r��s
zUpdateManager.exitcCs�ddt|�g}dtjvr|dd|����g7}|��zCzt�|�}Wn	ty-Yn%w|�	�durYt
��r@t
��t
��s8t
�d�|�	�dus4W|��dSW|��dSW|��dS|��w)Nz /usr/bin/software-properties-gtkz
--open-tab�WAYLAND_DISPLAYz
--toplevelz%s皙�����?)�str�os�environ�
get_window�get_xid�
_look_busy�
subprocess�Popen�OSError�pollr�events_pending�main_iteration�time�sleep�start_available)r+�page_number�cmd�pr,r,r-�
show_settings�s,�
��
���zUpdateManager.show_settingscCs.|jjr
|��dSt|tj�}|�|�dSr')r3�	no_updater�r$r#�
ACTION_UPDATEr})r+�update_backendr,r,r-�start_update�s
zUpdateManager.start_updateFc	CsNt|tj�}|r |jD]}z	|j|��WqtyYqw|�|�dSr')r$r#�ACTION_PRE_INSTALLr:r6�mark_install�SystemErrorr})r+�hwe_upgrade�install_backend�pkgnamer,r,r-�
start_install�s
�zUpdateManager.start_installcCsP|��|��|jdurdS|�|jj|jjtj�t	�||�}|�
|�dSr')r��
refresh_cacher6�_make_available_pane�
install_count�	del_countr��path�exists�REBOOT_REQUIRED_FILEr})r+�cancelled_update�error_occurredr|r,r,r-r��s

�
�zUpdateManager.start_availablecCs�t��}t�}|�|�}|sdStj�t��d�}tj�	|�s!dSt
|d��}|jt|�
����O_Wd�n1s>wY|jD]}t�|jd�rX|jrX|j�|�qFdS)Nzubuntu-drivers-oem.package-list�rz
oem-*-meta)�distro_info�UbuntuDistroInfor!�is_ltsr�r��joinr�get_user_runtime_dirr��openr<r;�read�
splitlinesr6�fnmatch�name�	installedrx)r+�di�codename�lts�OEM_PATH�f�pkgr,r,r-�_check_oem_metapackages�s(
��
���z%UpdateManager._check_oem_metapackagesc
CsJz	t��j|_WdSty$}ztd|�g|_WYd}~dSd}~ww)Nz!Error running updates end-point: )�ua�updates�
ua_updates�	Exception�print)r+�er,r,r-�_fetch_ua_updatess
��zUpdateManager._fetch_ua_updatescCs�g|_g|_tj|jdd�}|��|��r+t��r"t�	�t��st
�d�|��s|jD]3}|jdks:|jdkr;q.|j
}|dksJ|dksJ|dkra|j}|j}|j}|dk}|j�||||f�q.|j�|j�dS)	NT)�target�daemonr�zstandard-securityzstandard-updates�pending_attach�pending_enable�upgrade_available)r7r��	threading�Threadr�ry�is_aliverr�r�r�r��provided_by�status�package�version�
download_size�appendr6�create_pro_cache)r+�tr�r�r�r�rm�downloadabler,r,r-�_get_ua_security_statuss6�
�



��z%UpdateManager._get_ua_security_statuscCs�|��|dkr,d}d}|rtd�}n|rtd�}td�}n|jr%t|�St||||�S|r2t|�S|��}|r:|S|r@t|�S|jrGt|�St||d�S)Nru0Some software couldn’t be checked for updates.z"You stopped the check for updates.z4Updated software is available from a previous check.)r�)	�_check_hwe_support_statusr@r:rrr�_check_meta_releaserr)r+r��need_rebootr�r��header�desc�dist_upgrader,r,r-r�7s,

z"UpdateManager._make_available_panecCs0|r
|�t|||��dS|�t|||��dSr')r}rr)r+�update_and_retryr�r�r,r,r-�start_errorUszUpdateManager.start_errorcCs8|�d�|��dur|���tj�tjj��dSdSr\)�
set_sensitiver��
set_cursorr�Cursor�new�
CursorType�WATCHr*r,r,r-r�[s
�zUpdateManager._look_busycCs>|�d�|��dur|���d�|���tjj�dSdSr�)r�r�r��
set_functionsr�
WMFunction�ALLr*r,r,r-rw`s

�zUpdateManager._look_readycCs�|jdurdS|jjrt�|j�t��|jj}|r|jr dS|jj	r*t
||j�Stj�
d�}|jjrP|jjs=|�d�rP|jdkrJt||j|j�St||j�SdS)Nzcom.ubuntu.update-managerzcheck-dist-upgrades�i386)r9�downloadingrrZ�_meta_release_wait_idler�main�
upgradable_to�upgrade_broken�no_longer_supportedrr�Settingsr��new_distr3�check_dist_upgrades�get_booleanr>rr)r+�next�settingsr,r,r-r�fs,

��
�z!UpdateManager._check_meta_releasecCs(|jjs
t��dS|j�dtj�dS)N�done_downloadingF)r9r�r�	main_quitrFr*r,r,r-r��s
�z%UpdateManager._meta_release_wait_idlecCsJt��}t�}|�|�}|sdSd}tj�|�sdS|dg}|�|�dS)Nz/usr/bin/hwe-support-statusz--show-replacements)r�r�r!r�r�r�r��_parse_hwe_support_status)r+r�r�r��HWEr�r,r,r-r��s
z'UpdateManager._check_hwe_support_statusc
Cs�zt�|�WdStjyM}z8|jdkr;|j����}g|_|D]}|�d�}||j	vr:|j	|j
s:|j�|�q"WYd}~dSWYd}~dSd}~ww)N�
zutf-8)r��check_output�CalledProcessError�
returncode�output�strip�splitr:�decoder6�is_installedr�)r+r�r��packagesr�r,r,r-r��s"



�����z'UpdateManager._parse_hwe_support_statusc
Cs�z|jdurtd�|_n|j�d�|j��WnEty8|�t|��td�}td�}|�d||�YdSt	y]}ztd�}td�t
|�}|�d||�WYd}~dSd}~wwdd�}|�|��|��|j
D]}z|j|js�|j|��Wqpt	y�Yqpwt|�|_z|jj|j||j|jd�Wn%t	y�}ztd	�}td
�t
|�}|�d||�WYd}~nd}~ww|jjdkr�|�t|��dSdS)
NzSoftware index is brokenz�It is impossible to install or remove any software. Please use the package manager "Synaptic" or run "sudo apt-get install -f" in a terminal to fix this issue at first.Fz,Could not initialize the package informationz�An unresolvable problem occurred while initializing the package information.

Please report this bug against the 'update-manager' package and include the following error message:
cSs t��rt��t��sdSdSr')rr�r�r,r,r,r-�iterate�s�z,UpdateManager.refresh_cache.<locals>.iterate)�eventloop_callbackr=r7zCould not calculate the upgradez�An unresolvable problem occurred while calculating the upgrade.

Please report this bug against the 'update-manager' package and include the following error message:
Tr)r6rr��
_initDepCache�AssertionErrorr}rr@r�r�r�r�r�r<rr�rr8�updater=r7�distUpgradeWouldDelete)r+r�r�r�rr�r,r,r-r��sf

����
��

����	�zUpdateManager.refresh_cachecCs�zt��}Wntytd�YdSwz|�dd�}t�|d�}|��t�d�WdStj	yEtj
�d|�}t||�|_
YdSw)z; this sets up a dbus listener if none is installed already z warning: could not initiate dbusNzorg.freedesktop.UpdateManager�$/org/freedesktop/UpdateManagerObject�"org.freedesktop.UpdateManagerIFacer)�dbus�
SessionBusr�r��
get_object�	Interface�bringToFrontr�r��
DBusException�service�BusName�UpdateManagerDbusController�dbusController)r+�bus�	proxy_obj�iface�bus_namer,r,r-rI�s*�����zUpdateManager._setup_dbus)rrr')F)FF)FFF) �__name__�
__module__�__qualname__�__doc__r1r[r]r(rPr}rHr~r�r"r�r�r�r�r�r�r�r�r�r�r�rwr�r�r�r�r�rIr,r,r,r-r%Ms<
1






�
Ar%c@sLeZdZdZ	d
dd�Zej�d�dd��Zej�d�dd	��Z	d
d�Z
dS)rz4 this is a helper to provide the UpdateManagerIFace rcCs:tjj�|||�||_t�|_|j�d|j�d|_	dS)Nz
network-alertF)
rr�Objectr1�parentr�
alert_watcherrF�_on_network_alert�	connected)r+r!r�object_pathr,r,r-r1s

z$UpdateManagerDbusController.__init__r
cCs|j��dSr�)r!�presentr*r,r,r-rs
z(UpdateManagerDbusController.bringToFrontcCs&z|j��WdStyYdSw�NTF)r!r�r�r*r,r,r-�upgrades
�z#UpdateManagerDbusController.upgradecCs|tjvr
d|_dSd|_dSr')r�NM_STATE_CONNECTED_LISTr$)r+�watcher�stater,r,r-r#s


z-UpdateManagerDbusController._on_network_alertN)r)rrrrr1rr�methodrr(r#r,r,r,r-rs
�



r)F�
__future__rr�
gi.repositoryrrrrrr	�&uaclient.api.u.pro.packages.updates.v1�api�u�prorr��v1r��warnings�filterwarnings�DeprecationWarningr�r�r�r�r�r�r�rr@r�dbus.service�dbus.mainloop.glibrr�Dialogsrrrrrrrrrr�MetaReleaseGObjectrr�Core.AlertWatcherr�Core.MyCacher�	Core.roamr�Core.UpdateListr�
Core.utilsr r!r"�backendr#r$r�r0r%rr rr,r,r,r-�<module>sP*�
0
;

Youez - 2016 - github.com/yon3zu
LinuXploit