403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/apport/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/apport/__pycache__/hookutils.cpython-314.pyc
+
���i�����Rt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIt^RIt^RI
t
^RIHtHt^RIt^RIHt^RIHt]P0!R4tRsRtR<R	ltR=R
ltR<RltR>RltR
t Rt!Rt"Rt#RRlt$Rt%Rt&Rt'Rt(R]
PRRR3Rlt*Rt+Rt,Rt-R]
PRR3Rlt.RRlt/RRlt0R t1R?R!R/R"llt2R?R#lt3^t4^t5^t6^t7^t8^t9^t:^t;^	t<^
t=^t>^t?R$t@R%tAR?R&ltBR'tCR(tDR)tER@R*R+lltFR,tGR-R.ltHR/tIR0tJR?R1R2lltKR3tLR4tMR5tNRAR6ltOR7tPR8tQR9tRR?R:ltSR;tT]P�P�tV]P�P�tWR#)Bz/Convenience functions for use in package hooks.N)�Iterable�Mapping)�impl)�
ProblemReportz[^0-9a-zA-Z_.-]c��\V\4'dVPR4p\P	RVPRR44#)zsGenerate a valid report key name from a file path.

This will replace invalid punctuation symbols with valid ones.
�UTF-8�.� �_)�
isinstance�bytes�decode�_invalid_key_chars_re�sub�replace)�paths&�2/usr/lib/python3/dist-packages/apport/hookutils.py�path_to_keyr(s=��
�$�����{�{�7�#�� �$�$�S�$�,�,�s�C�*@�A�A�TFc��RV9dR#V'g\V4p\PPV4'd\	WW#V4R#R#)avAttach file contents if file exists.

If key is not specified, the key name will be derived from the file
name with path_to_key().

If overwrite is True, an existing key will be updated. If it is False, a
new key with '_' appended will be added instead.

If the contents is valid UTF-8, or force_unicode is True, then the value
will be a string, otherwise it will be bytes.
�../N)r�osr�exists�attach_file��reportr�key�	overwrite�
force_unicodes&&&&&r�attach_file_if_existsr2s?��
��}����$���	�w�w�~�~�d����F�#�-�@�rc��RV9dR#\P!V\P\P,\P,4p\P
!V4p\PPV4pVP\P!V4P8wgW8wd\P!V4R#\P!VP4'g\P!V4R#\P!VR4;_uu_4pVP4P4pRRR4T'dXP%RR	R
7#XP%R4# +'giL=;i \ dpR\#T42uRp?#Rp?ii;i \&dXu#i;i)z�Return the contents of the specified path.

If the contents is valid UTF-8, or force_unicode is True, then the value
will a string, otherwise it will be bytes.

Upon error, this will deliver a text representation of the error,
instead of failing.
rzError: invalid path.zError: path contained symlinks.z#Error: path was not a regular file.�rbN�Error: rr��errors)r�open�
O_NOFOLLOW�O_RDONLY�
O_NONBLOCK�fstatr�realpath�st_ino�stat�close�S_ISREG�st_mode�fdopen�read�strip�OSError�strr
�UnicodeDecodeError)rr�fd�st�	real_path�f�contents�errors&&      r�	read_filer<Ks;��&��D�=�)�
�W�W�T�2�=�=�2�;�;�6����F�
G��
�X�X�b�\���G�G�$�$�T�*�	�
�9�9����	�*�1�1�1�T�5F��H�H�R�L�4��|�|�B�J�J�'�'��H�H�R�L�8�
�Y�Y�r�4�
 �
 �A��v�v�x�~�~�'�H�!�
����w�y��9�9�����w�'�'�!�
 ���&���U���%�%��&�������se�F �CF �%F �F �F �9F
�F �<G�
F	�F �F � G�+
F>�8G�>G�
G�Gc�z�V'g\V4pV'gW 9dVR,
pK\WR7W&R#)akAttach a file to the report.

If key is not specified, the key name will be derived from the file
name with path_to_key().

If overwrite is True, an existing key will be updated. If it is False, a
new key with '_' appended will be added instead.

If the contents is valid UTF-8, or force_unicode is True, then the value
will a string, otherwise it will be bytes.
r
)rN)rr<rs&&&&&rrrps0����$�����m��3�J�C��D�>�F�Krc�2�\P!V4pVP4F�wrVV'd	WR9dKR\V42p\	V\
4'd%VR8XgVP
R4'dW`V&K]V'd(VPRVR24pV'dW`V&M	RW&MRW&\PP\P!V4P4p	V	P4VR\V42&K�	R#)	aAttach information about any modified or deleted conffiles.

If conffiles is given, only this subset will be attached. If ui is given,
ask whether the contents of the file may be added to the report; if this is
denied, or there is no UI, just mark it as "modified" in the report.
zmodified.conffile.z	[deleted]z
[inaccessiblez,It seems you have modified the contents of "z@".  Would you like to add the contents of it to your bug report?z
[modified]zmtime.conffile.N)�	packaging�get_modified_conffiles�itemsrrr4�
startswith�yesno�datetime�
fromtimestamprr,�st_mtime�	isoformat)
r�package�	conffiles�ui�modifiedrr:r�response�mtimes
&&&&      r�attach_conffilesrN�s����/�/��8�H�"�.�.�*�����.��"�;�t�#4�"5�6���h��$�$���#�x�':�':�?�'K�'K�"�3�K��
��x�x�>�t�f�EO�P��H��&�s��*���&�F�K��!�!�/�/�����
�0F�0F�G��8=���8I����T�!2� 3�4�5�1+rc�@�\P!R\^R7R#)z4Attach information about any Upstart override files.z`apport.hookutils.attach_upstart_overrides() is obsolete. Upstart is dead. Please drop this call.��
stacklevelN��warnings�warn�PendingDeprecationWarning�rrHs&&r�attach_upstart_overridesrW�����M�M�	3�!��	rc�@�\P!R\^R7R#)z:Attach information about a package's session upstart logs.z[apport.hookutils.attach_upstart_logs() is obsolete. Upstart is dead. Please drop this call.rPNrRrVs&&r�attach_upstart_logsrZ�rXrc�t�VPRR4P4'g\R.4VR&R#R#)zoAttach information from the kernel ring buffer (dmesg).

This will not overwrite already existing information.
�CurrentDmesg��dmesgN)�getr2�root_command_output�rs&r�attach_dmesgrb�s4��
�:�:�n�b�)�/�/�1�1�!4�g�Y�!?��~��2rc�f�Rp\PPV4'd�\P!V4F�pVR9dK\PP	VRV24p\P
!V4p\
P!VP4'dVP^,^8XdK�\V4pT'gK�YPRTPRR42&K�	RV9d$RV9dVR,RVR,2VR	&R
#R
#R
# \dK�i;i)zDAttach Desktop Management Interface (DMI) information to the report.z/sys/class/dmi/id�/zdmi.r
rzdmi.sys.vendorzdmi.product.namer	�MachineTypeN>�uevent�	subsystem)rr�isdir�listdirr*r,r.r/r<r3r)r�dmi_dirr9�pr7�values&     r�
attach_dmirm�s��!�G�	�w�w�}�}�W������G�$�A��+�+����� � �G�9�A�a�S�!1�2�A������B��<�<��
�
�+�+��
�
�Q��!�0C��
�!�!����u�7<��a�i�i��S�1�2�3�4�%�"�6�!�&8�F�&B��&�'�(��&�1C�*D�)E�F�	�}��'C�!��
�
��
�s�D!�!D0�/D0c�0�V^8�dQhR\R\/#)��udevdb�return)r4)�formats"r�__annotate__rs�s����c��c�rc��\P!RRV4p\P!RRV4p\P!RRV4pV#)zWTake the output of udevadm info -e and return a string with redacted
filesystem labels.zID_FS_LABEL=(.*)zID_FS_LABEL=<hidden>zID_FS_LABEL_ENC=(.*)zID_FS_LABEL_ENC=<hidden>zby-label/[^ /\n]*zby-label/<hidden>)�rer)rps&r�anonymized_udevdbrv�sG��
�V�V�'�)?��
H�F�
�V�V�+�-G��
P�F��V�V�(�*=�v�
F�F��Mrc���\V4\VRR4\VRR4\VRR4\PP	R4'd!\RR	.4VR
&\RR.4VR&\R
.4VR&\R
R.4VR&\R
R.4VR&\RR.4VR&\
\.R!O44VR&\R.4VR&\V4\R4'd\R.4VR&\R4'dS\RR.4P4pV'dWR&\RR.4P4pV'dWR&R #R #R #)"aBAttach a standard set of hardware-related data to the report, including:

- kernel dmesg (boot and current)
- /proc/interrupts
- /proc/cpuinfo
- /proc/cmdline
- /proc/modules
- lspci -vvnn
- lscpi -vt
- lsusb
- lsusb -v
- lsusb -t
- devices from udev
- DMI information from /sys
- prtconf (sparc)
- pccardctl status/ident
z/proc/interrupts�ProcInterrupts�
/proc/cpuinfo�ProcCpuinfo�
/proc/cmdline�ProcKernelCmdLinez/sys/bus/pci�lspci�-vvnn�Lspciz-vtzLspci-vt�lsusb�Lsusb�-vzLsusb-vz-tzLsusb-t�sort�
/proc/modules�ProcModules�UdevDbz%/usr/share/apport/dump_acpi_tables.py�acpidump�prtconf�Prtconf�	pccardctl�status�PccardctlStatus�ident�PccardctlIdentN)�udevadm�infoz--export-db)rbrrrr�command_outputrvr`rm�command_availabler2)r�outs& r�attach_hardwarer��se��$�����*�,<�=�����7����)<�=�	�w�w�~�~�n�%�%�(�'�7�);�<��w��+�W�e�,<�=��z��$�g�Y�/�F�7�O�&����7�F�9��&����7�F�9��*�F�O�+D�E�F�=��(��9�:��F�8��-�.U�-V�W�F�:���v����#�#�*�I�;�7��y����%�%��k�8�4�5�;�;�=���(+�$�%��k�7�3�4�:�:�<���'*�#�$��&rc���\V\PPR4R4\V\PPR4R4\VR4\VRR4\	VRR	4\.R!O4VR&\RR
.4VR
&\RR
.4VR&\
\4VR&.p\PPR4'dp\RRR7;_uu_4pVFKpRV9gKVP4P4pVP\V^,44KM	RRR4VEFupRVR2p\RR\V4R.4W&RVR2p\RR\V4.4W&\P!RVR24EFp\PP!V4'd@\PP#V4pRVR\%V42p\	WVR7Kh\PP'V4'gK�\PP#V4p\P(!V4FKp	\PP+Wy4p
RVR\%V4R \%V	42p\	W
V4KM	EK	EKx	R# +'giEL�;i)"z�(loosely based on http://www.alsa-project.org/alsa-info.sh)
for systems where alsa-info is not installed
(i e, *buntu 12.04 and earlier)
z~/.asoundrc�UserAsoundrcz~/.asoundrc.asoundconf�UserAsoundrcAsoundconfz/etc/asound.confz/proc/asound/version�AlsaVersionryrz�-l�AlsaDevices�aplay�AplayDevices�arecord�ArecordDevices�
PciMultimediaz/proc/asound/cards�utf-8��encodingz]:N�Cardz.Amixer.info�amixerz-cr�z.Amixer.valuesz/proc/asound/cardz/codec*z.Codecs.�rr)�lsr�z	/dev/snd/)rrr�
expanduserrr��pci_devices�PCI_MULTIMEDIArr%�lstrip�split�append�intr4�glob�isfile�basenamerrhri�join)r�cardsr6�line�fields�cardr�	codecpath�codec�namers&          r�attach_alsa_oldr�'sd��
�&�"�'�'�"4�"4�]�"C�^�T������"�"�#;�<�>V���&�"4�5��&�"8�-�H�����7�*�+D�E�F�=��+�W�d�O�<�F�>��-�y�$�.?�@�F���)�.�9�F�?���E�	�w�w�~�~�*�+�+�
�&��
9�
9�R����4�<�!�[�[�]�0�0�2�F��L�L��V�A�Y��0��:����T�F�,�'��$�h��c�$�i��%H�I����T�F�.�)��$�h��c�$�i�%@�A������%6�t�f�G�#D�E�I��w�w�~�~�i�(�(����(�(��3���T�F�(�;�u�+=�*>�?���F�3�7������y�)�)����(�(��3���J�J�y�1�D��7�7�<�<�	�8�D��t�f�%�'��.�/�q��T�1B�0C�E�� ��c�2�
2�F�
�
:�
9�
9�s�9
K�AK�K"	c��\PPR4'd\.RO4VR&MA\PPR4'd\.RO4VR&M\	V4\RR.\
P
!R4,\
P
!R4,\
P
!R4,4VR	&\PPR
4'd\RR.4VR
&\PPR4'd\R.4VR&\
V4\V4R#)z0Attach ALSA subsystem information to the report.�/usr/sbin/alsa-info�AlsaInfo�!/usr/share/alsa-base/alsa-info.sh�fuserr�z	/dev/dsp*z
/dev/snd/*z	/dev/seq*�AudioDevicesInUsez/usr/bin/pacmd�pacmd�list�	PulseListz/usr/bin/pa-info�PaInfoN)r��--stdout�--no-upload)r�r�r�)rrrr�r�r�rmrbras&r�attach_alsar�Xs��	�w�w�~�~�+�,�,�+�>�
��z��
�����;�	<�	<�+�L�
��z��	���"0�	�$��
�)�)�K�
 �	!�
�)�)�L�
!�	"��)�)�K�
 �	!�#�F���
�w�w�~�~�&�'�'�,�g�v�->�?��{��	�w�w�~�~�(�)�)�)�+=�*>�?��x���v����rc��R\P9dR#\PR,pVP\P4F�pV'gK
\PPW 4p\PP
V4'gKS\P!V\P4'gK�R#	R#)z/Is given command on the executable search path?�PATHFT)	r�environr��pathseprr�r��access�X_OK)�commandr�element�filenames&   rr�r�vs}��
�R�Z�Z���
�:�:�f��D��:�:�b�j�j�)�����7�7�<�<��1��
�7�7�>�>�(�#�#��	�	�(�B�G�G�(D�(D��*�rc	�Z�\PP4pV'gRVR&\P!VRV\P
VVR7pTP^8XdTPP4pMgR\T4P4,R,\TP4P4,R	,TP,pT'dTPR
RR7pT# \dpR\T42uRp?#Rp?ii;i)
a'Try to execute given command (list) and return its stdout.

In case of failure, a textual error gets returned. This function forces
LC_MESSAGES to C, to avoid translated output in bug reports.

If decode_utf8 is True (default), the output will be converted to a string,
otherwise left as bytes.
�C�LC_MESSAGESF)�check�input�stdout�stderr�envr"NsError: command s failed with exit code s: rrr#)
rr��copy�
subprocess�run�PIPEr3r4�
returncoder�r2�encoder
)	r�r�r��keep_locale�decode_utf8r��spr;�ress	&&&&&    rr�r��s��
�*�*�/�/�
�C�� ��M��
&�
�^�^�����?�?���

��
�}�}����i�i�o�o���
��'�l�!�!�#�
$�(�
)��"�-�-� �'�'�)�
*��	
�
�i�i�
�	���j�j���j�3���J��#�&���U���%�%��&�s�*D�D*�
D%�D*�%D*c�L�\eR#\P!4^8XdR#\PP4'gR#\PPR4'gR#\P!^4wr\P!RR\T4R.R\P\PR7s\P!T4\P !4;_uu_4pTP#T\P$4TP'4pTFCwrET\P(,'gK$\P!T4RRR4R#	K| \dR#i;i +'giR#;i)Nz/usr/bin/pkttyagent�
pkttyagentz--notify-fdz
--fallbackF)�	close_fds�stdinr�)�_AGENTr�geteuid�sysr��isattyrr�pipe2r3r��Popenr4r�r-�select�epoll�register�EPOLLIN�poll�EPOLLHUP)�r�wr��eventsr
�
event_types      r�_spawn_pkttyagentr��s�����	�z�z�|�q����9�9������
�7�7�>�>�/�0�0����x�x��{���
�
�
�	�}�c�!�f�l�;���o�o����	�F��H�H�Q�K�	�����5���N�N�1�f�n�n�-��Z�Z�\�F�!'�
������/�/��H�H�Q�K��
��"(��#�����
���s+�5F�AF�F�<F�F�F�F#	c�n�\fR#\P4\P4RsR#)z=Kill pkttyagent (from PolicyKit) if it was started by Apport.N)r��	terminate�wait�rr�kill_pkttyagentr��s&���~��
����
�K�K�M�
�Frc��\P!4^8Xd.#\PPR4'd\	4R.#.#)�z/usr/bin/pkexec�pkexec)r�getuidrrr�r�rr�_root_command_prefixr�s<��	�y�y�{�a���	�	�w�w�~�~�'�(�(����z��
�Irc�~�\V\4'gQR4h\\4V,VVRVR7pV#)a)Try to execute given command (list) as root and return its stdout.

This passes the command through pkexec, unless the caller is already root.

In case of failure, a textual error gets returned.

If decode_utf8 is True (default), the output will be converted to a string,
otherwise left as bytes.
zcommand must be a listT)r�r�)rr�r�r)r�r�r�r��outputs&&&& rr`r`�sE���g�t�$�$�>�&>�>�$�
����(�
�����F��Mrc��V^8�dQhR\\\3,R\\\\,3,/#)ro�command_maprq)rr4�dictr)rrs"rrsrss3��;�;���c��"�;�	�#�s�U�{�
��;rc��V'g/#/p\PP\PP\PPRR44R4p\P!4p\PPVR4p\VRRR7;_uu_4pVP4FRwrg\VR4'gQR	4hVPVR
\PPW64R24KT	RRR4\P!\4W$.,R
R7VFzp\\PPW64R4;_uu_4pVP4P!4p	RRR4X	'gKfT	P%R4Y&K|	V\(P*!V4# +'giL�;i +'giL];i \"dK�i;i \&d	Y�T&K�i;i \(P*!T4i;i)aExecute multiple commands as root and return their respective outputs.

command_map is a keyname -> 'shell command' dictionary with the commands to
run. They are all run through /bin/sh, so you need to take care of shell
escaping yourself. To include stderr output of a command, end it with
"2>&1".

Just like root_command_output, this passes the command through pkexec,
unless the caller is already root.

This is preferable to using root_command_output() multiple times, as that
will ask for the password every time.
�APPORT_DATA_DIRz/usr/share/apport�root_info_wrapperz:script:r�r�r�r2z(command must be a string (shell command)z	 | cat > �
NF)r�r!r)rrr��abspathr�r_�tempfile�mkdtempr%rA�hasattr�writer�r�rr1r2r3r
r5�shutil�rmtree)
rr�wrapper_path�workdir�script_path�script�keynamer�r9�bufs
&         r�execute_multiple_root_commandsrs��� ��	�%'�F��7�7�<�<�
������
�
���'8�:M�N�O���L���� �G�"��g�g�l�l�7�J�7��
�+�s�W�
5�
5��$/�$5�$5�$7� ����W���>�=�>��
����y�	�"�'�'�,�,�w�2P�1Q�QS�T�U�
%8�6�	��� �"�l�%@�@��	
�
#�G�
��"�'�'�,�,�w�8�$�?�?�1��&�&�(�.�.�*�C�@��s�*�&)�j�j��&9�F�O�#���
�
�g��?6�
5��"@�?���
��
��*�*�&)�7�O�*��	�
�
�g��s��>6H1�4A'G#�5H1�1H	�G6�!H	�)H1�4H�H1�#G3	�.H1�6H�H	�H1�H	�	H�H1�H�H1�H.�*H1�-H.�.H1�1I	c�V�V^8�dQhR\R\\\3,RR/#)rorrrqN)rrr4)rrs"rrsrsCs-������(/��S��(9��	�rc�R�\V4P4F	wr#W0V&K	R#)aExecute multiple commands as root and put their outputs into report.

command_map is a keyname -> 'shell command' dictionary with the commands to
run. They are all run through /bin/sh, so you need to take care of shell
escaping yourself. To include stderr output of a command, end it with
"2>&1".

Just like root_command_output, this passes the command through pkexec,
unless the caller is already root.

This is preferable to using root_command_output() multiple times, as that
will ask for the password every time.
N)rrA)rr�k�vs&&  r�attach_root_command_outputsrCs&�� /�{�;�A�A�C����q�	�Drc���RpVP4fJVPF7pVPRRR7pVPV4'gK/W#,
pK9	K[VPF7pVPRRR7pVPV4'gK/W#,
pK9	VPP	4VP4VP^8XdV#R#)r]rrr#)r�r�r
�searchr-r�r�)�pattern�process�linesr�s&&  r�__filter_re_processr"Ws����E�
�,�,�.�
 ��N�N�D��;�;�w�y�;�9�D��~�~�d�#�#��
��#�
�����{�{�7�9�{�5���>�>�$����M�E���N�N�����L�L�N����Q����
r�journald_only_systemc��V'dRRRV.pMu\PPR4'd.R
OpV'dVPR4M2\P!R\P
4'd.ROpMR#\P!V\PR7;_uu_4p\W4uuR	R	R	4# +'giR	#;i)a�Extract recent system messages which match a regex.

pattern should be a "re" object. By default, messages are read from
the systemd journal, or /var/log/syslog; but when giving "path", messages
are read from there instead.
The journald_only_system parameter controls the scope of messages that are
extracted when reading from the systemd journal. If set to True (the
default), only messages from the system services are extracted. If set to
False, all messages that the current user can see are extracted.
�tail�-n�10000�/run/systemd/systemz--system�/var/log/syslogr]�r�N)�
journalctlz--quiet�-bz-a)r%r&r'r))
rrrr�r��R_OKr�r�r�r")rrr#r�r s&&$  r�
recent_syslogr.ks�����4��$�/��	�����-�	.�	.�7����N�N�:�&��	���$�b�g�g�	.�	.�<���	�	�	�'�*�/�/�	:�	:�g�"�7�4�
;�	:�	:�	:�s�3C	�	C	c��\PPR4p\PPV4'd,\P!V\P
4'gR#V'g\P!R4pRp\VR4;_uu_4pVF7pVPRRR7pVPV4'gK/W$,
pK9	RRR4V# +'giT#;i)	aTExtract messages from ~/.xsession-errors.

By default this parses out glib-style warnings, errors, criticals etc. and
X window errors.  You can specify a "re" object as pattern to customize the
filtering.

Please note that you should avoid attaching the whole file to reports, as
it can, and often does, contain sensitive and private data.
z~/.xsession-errorsr]z�^(\(.*:\d+\): \w+-(WARNING|CRITICAL|ERROR))|(Error: .*No Symbols named)|([^ ]+\[\d+\]: ([A-Z]+):)|([^ ]-[A-Z]+ \*\*:)|(received an X Window System error)|(^The error was \')|(^  \(Details: serial \d+ error_code)r!rrr#N)rrr�rr�r-ru�compiler%r
r)rrr!r9r�s&    r�xsession_errorsr1�s����7�7���2�3�D�
�7�7�>�>�$���r�y�y��r�w�w�'?�'?����*�*�
6�
��
�E�	
�d�D�	�	�Q��D��;�;�w�y�;�9�D��~�~�d�#�#��
���
�
�L�
�	�
�L�s�&-C.�C.�.C?	c�J�V'g\RR.4#Rp\RR.4pVPR4F�pRpRpVPR4FkpVPR^4wrxTP4pTP4pTR	8Xd"\	TR
R^4p	T	R
,^,	pK`TR8XgKiTpKm	V'gK�V'gK�W@9gK�V'd
VR,
pV\RRV.4P4,
pK�	V# \dK�i;i)z9Return a text dump of PCI devices attached to the system.r}r~r]z-vvmmnnz

Nr	�:�Classi��Slotz-vvnns������)r�r��
ValueErrorr2r�)
�pci_classes�resultr�	paragraph�	pci_class�slotr�rrl�ns
*         rr�r��s����w��0�1�1�
�F�
�W�i�0�
1�F��\�\�&�)�	��	����O�O�D�)�D�
�!�Z�Z��Q�/�
���K�K�M�E��)�)�+�C��g�~���b���b�)����Z�A�-�	������*��9���)�":���&� ���n�g�x��%>�?�E�E�G�G�F�)*�,�M���
��
�s�D�D"�!D"c��\RR.4#)z9Return a text dump of USB devices attached to the system.r�r�)r�r�rr�usb_devicesr@�s���7�D�/�*�*rc���\P!V4pV'd;VUu.uF,p\PPW14'gK*VNK.	ppV#TpV#uupi)zGRetrieve a list of files owned by package, optionally matching
globpat.)r?�	get_filesr��fnmatch)rH�globpat�filesr9r:s&&   r�files_in_packagerF�sW��
����(�E��"�G�U��d�l�l�&:�&:�1�&F�!�!�U��G��M����M��Hs�'A�Ac��R#)z	Obsolete.Nr�rVs&&r�attach_gconfrH�s�rc
���VPRR4p/p\PP4pRVR&\P
!RRV.V\PR7;_uu_4pVPfQhVPF=pVPR^4wrxp	V	P4p	Y�PT/4T&K?	RRR4\P
!RRV.\PR	7;_uu_4pVPfQhVPFrpVPR^4wrxp	V	P4p	Y�PT/4PTR48wgKQTR
8Xd
TR9dRp	Y'RTRT	R
2,
pKt	RRR4W R&R# \dEK*i;i +'giL�;i \dK�i;i +'giLN;i)z0Attach user-modified gsettings keys of a schema.�GsettingsChangesr]z/nonexisting�XDG_CONFIG_HOME�	gsettingszlist-recursively)r�r�Nr*sorg.gnome.shellzredacted by apportr	r	>�
favorite-apps�command-history)r_rr�r�r�r�r�r�r��rstripr8�
setdefault)
r�schema�	cur_value�defaultsr�rLr��schema_namerrls
&&        r�attach_gsettings_schemarU�s����
�
�-�r�2�I��H�
�*�*�/�/�
�C�+�C���	�	�	�	�(�&�1�s�:�?�?�
�
�	����+�+�+��$�$�D�
�*.�*�*�T�1�*=�'��%������9>����R�0��5�
%�	
�
�	�	�	�(�&�1�*�/�/�
�
�	����+�+�+��$�$�D�
�*.�*�*�T�1�*=�'��%���������[�"�5�9�9�#�r�B�B��"4�4��A�:�1�E��}�A�c�U�!�E�7�"�=�=�	�%�	
�&"+����/�
��
��
�
��(�
��
��
�
�sf�* F5�%F"�0F5� G�"%G�#G�/%G�"F2	�-F5�1F2	�2F5�5G	�G	�G�G	�G�G*	c��\VR4F0p\PPV4RRp\	W4K2	R#)z@Attach user-modified gsettings keys of all schemas in a package.z)/usr/share/glib-2.0/schemas/*.gschema.xmlNi�)rFrrr�rU)rrH�schema_filerQs&&  r�attach_gsettings_packagerXs<��'��<������!�!�+�.�t��4����/�	rc�4�V^8�dQhR\R\RR/#)ror�time_windowrqN)rr�)rrs"rrsrss!����-��c��4�rc���\PPR4'gR#VP4pV'dW!,
pW!,pRV2RV2.pMRR.p\	RR.V,4VR	&R#)
z�Attach journal warnings and errors.

If the report contains a date, get the journal logs around that
date (plus/minus the time_window in seconds). Otherwise attach the
latest 1000 journal logs since the last boot.
r(Nz	--since=@z	--until=@r,z--lines=1000r+z--priority=warning�
JournalErrors)rrr�
get_timestampr�)rrZ�crash_timestamp�before_crash�after_crash�argss&&    r�attach_journal_errorsrbs{���7�7�>�>�/�0�0���*�*�,�O��&�4��%�3���L�>�*�i��}�,E�F���n�%��,�	�+�,�t�3��F�?�rc��\RR.4VR&\RR.4VR&\\4VR&\VRRR	7RF3pV\P
9gK\P
V,W&K5	R
#)z5Attach generic network-related information to report.�ip�route�IpRoute�addr�IpAddr�
PciNetworkz/etc/network/interfaces�IfupdownConfigr�N)�
http_proxy�	ftp_proxy�no_proxy)r�r��PCI_NETWORKrrr�)r�vars& r�attach_networkrp2sj��&��g��7�F�9��%�t�V�n�5�F�8��&�{�3�F�<���&�";�AQ�R�6���"�*�*���*�*�S�/�F�K�7rc�:�V^8�dQhR\\,/#)rorq)r�r4)rrs"rrsrs>s��M�M�t�C�y�Mrc��\P!R4Uu.uFqPR4^,NK	up#uupi)z.Return list of wireless devices on the system.z/sys/class/net/*/wirelessrd)r�r�)rks r�_get_wireless_devicesrs>s2��%)�Y�Y�/J�%K�L�%K��G�G�C�L��O�O�%K�L�L��Ls� <c��\\P!R44VR&\RR.4VR&\P
P
R4'dp\4FSp\P!RR\P!R	R
\RRVR
.444VRVP4R2&KU	\.RO4pMRpW R&\VRRR7R#)z5Attach wireless (WiFi) network information to report.zH(NetworkManager|modem-manager|dhclient|kernel|wpa_supplicant)(\[\d+\])?:�
WifiSyslog�rfkillr��RfKillz/sbin/iwz([0-9a-f]{2}:){5}[0-9a-f]{2}z<hidden-mac>z
SSID: (.*)zSSID: <hidden>�iw�dev�link�IwDev�Link�N/A�CRDAz/var/log/wpa_supplicant.log�WpaSupplicantLogr�N)rx�regr_)r.rur0r�rrrrsr�
capitalizer)r�wireless_device�	iw_outputs&  r�attach_wifir�Cs���(�
�
�
�
�	
��F�<��&�x��&8�9�F�8��	�w�w�~�~�j�!�!�4�6�O�AC���.����� �$�"�D�%��&�#I�J��B�F�U�?�5�5�7�8��=�>� 7�#�#7�8�	��	��6�N��&�"?�EW�Xrc�*�\VRR4\VRR4\R.4VR&\RR.4VR	&\P!R
4pV'd0\.ROV,4p\P!RRV4VR
&\R!VR&R#)zcAttach printing information to the report.

Based on http://wiki.ubuntu.com/PrintingBugInfoScript.
z/etc/papersize�	Papersizez/var/log/cups/error_log�CupsErrorLog�locale�Locale�lpstatr��Lpstatz/etc/cups/ppd/*.ppdz*/etc/cups/ppd/(.*).ppd:\*NickName: *"(.*)"z\g<1>: \g<2>�PpdFiles�PrintingPackagesN)�fgrepz-Hz	*NickName) �foo2zjszfoomatic-dbzfoomatic-db-engine�foomatic-db-gutenprintzfoomatic-db-hpijszfoomatic-filterszfoomatic-gui�hpijs�hplip�m2300w�min12xxw�c2050�hpoj�pxljr�pnm2ppa�splixzhp-ppdz
hpijs-ppdszlinuxprinting.org-ppdszopenprinting-ppdszopenprinting-ppds-extra�ghostscript�cupszcups-driver-gutenprintr��
ijsgutenprintzcupsys-driver-gutenprintzgimp-gutenprintzgutenprint-doczgutenprint-localeszsystem-config-printer-common�kdeprint)rr�r�rur�package_versions)r�ppds�	nicknamess&  r�attach_printingr�_s���
�&�"2�K�@��&�";�^�L�%�x�j�1�F�8��%�x��&6�7�F�8���9�9�*�+�D��"�#?�$�#F�G�	��V�V�9�?�I�
��z��"2�!"�F��rc�n�V^8�dQhR\R\\,\,R,RR/#)ror�profilesNrq)rrr4)rrs"rrsrs�s2��4�4��4�%-�c�]�S�%8�4�%?�4�	�4rc
�h�\V\4'dV.pRp\P!V\P4pRp\P!V\P4p/pRV9dRVR&RV9d/\
PPR4'd
RVR2VR&\V4pRV9dJVR,p\V\4'gQhR	P\P!W844VR&RV9d
VR,VR&\VR
R4\VRR
4\P!VR	PVPRR4VPRR4344F�p	V'gVPR.4R#V	^,R8XdV	^Rp
M'\P!V	4P#RRR7p
VF9p\P(!RVR2V
4'gK&VPR.4K�	K�	R# \$\&3dK�i;i)z0Attach MAC information and events to the report.z'(?:audit\(|apparmor|selinux|security).*z'apparmor="DENIED".+?profile=([^ ]+?)[ ]�KernLogr^�AuditLogz/var/run/auditd.pidzegrep "z" /var/log/audit/audit.logr	z/proc/version_signature�ProcVersionSignaturer{�ProcCmdliner]�apparmor�"rrr#�^�$Nr7)rr4rur0�
IGNORECASErrrrr��findallrrr_�add_tagsr�fromhexr
�
IndexErrorr8�match)rr��	mac_regex�mac_re�aa_regex�aa_re�privileged_commands�privileged_outputsrr��profile�search_profiles&&          r�attach_mac_eventsr��s���
�(�C� � ��:��:�I�
�Z�Z�	�2�=�=�
1�F�8�H��J�J�x����/�E������'.��G�$����B�G�G�N�N�3H�$I�$I��i�[� :�;�	�J�'�8�8K�L���$�$�#�G�,���&�#�&�&�&�&� �I�I�b�j�j��&@�A��y���'�'�/�
�;��z���&�";�=S�T�����7����
�t�y�y�&�*�*�Y��3�V�Z�Z�
�B�5O�P�Q�����O�O�Z�L�)��	��Q�x�3����"�+���-�-��.�5�5�g�i�5�P��'�N��x�x�!�N�+�1�-�w�7�7������-��'����J�'�	��	�s�H�0&H�H1�0H1c��\V!VR&R#)zbAttach version information for related packages.

In the future, this might also run their hooks.
�RelatedPackageVersionsN)r�)r�packagess&&r�attach_related_packagesr��s��
(8��'B�F�#�$rc
���V'gR#.pVFpV'gK
\P!V4pV'gVPVR34\V4F2p\P!V4pVfRpVPWE34K4	K�	\
RV44pRPVUUu.uFwrxVRVR2
RV2NK	upp4# \
dRpLpi;iuuppi)zlReturn a text listing of package names and versions.

Arguments may be package names or globs, e. g. "foo*"
r]r}c3�F"�TFp\V^,4x�K	R#5i)r�N)�len)�.0�versions& r�	<genexpr>�#package_versions.<locals>.<genexpr>�s���@�x�G��G�A�J���x�s�!r	�<�sr	)r?�package_name_globr��sorted�get_versionr8�maxr�)	r��versions�package_pattern�matching_packagesrHr��
package_widthrkrs	*        rr�r��s���
���H�#����%�7�7��H�� ��O�O�_�e�4�5��/�0�G�
 �#�/�/��8�������O�O�W�.�/�1�$�$�@�x�@�@�M��9�9��J��v���1�]�O�1�,�-�Q�q�c�2��J�K�K���
 ���
 ��Ks�C�4C&
�
C#�"C#c��\P!RV.R\P\PR7pVP^8wdR#TP
P
R4P4FNpTPR^4p\T4^8dK'T^,R8XgK7T^,P4u#	R# \dR#i;i)	z-Return the license for a given kernel module.z
/sbin/modinfoF)r�r�r��invalidNrr3�license)r�r�r�r�r3r�r
�
splitlinesr�r�r2)�module�modinfor�r�s&   r�_get_module_licenser��s���
��.�.�
�f�%���?�?��?�?�	
������"��#����%�%�g�.�9�9�;�����C��#���v�;��?���!�9�	�!��!�9�?�?�$�$�<�������s�A	C�C�Cc��\VRR7;_uu_4pVUu.uFq"P4^,NK	ppRRR4.pXFMp\T4pT'gKRT9dK!RT9dK*RT9dK3RT9dK<TP	T4KO	T#uupi +'giLl;i \d.u#i;i)zCCheck loaded modules and return a list of those which are not free.r�r�N�GPL�BSD�MPL�MIT)r%r�r3r�r�)�module_listr9r��mods�nonfree�mr�s&      r�nonfree_kernel_modulesr�
s����
�+��
0�
0�A�01�2���J�J�L��O�O��D�2�1�
�G�
����"���1�e�q�j�E�Q�J�%�1�*���
��N�N�1���
�N��3�1�
0�����	��s=�B4�B!�B�B!�B4�B!�!B1	�,B4�1B4�4
C�Cc	�6�Rp\P!V4F�p\PPW4pVR8Xg&\PP	V4'gKP\VR4;_uu_4pVP
4P4pRRR4VR8XdXPRR4pVR8Xd \P!X4pVR,
pWR	XPR
RR7R
2,
pK�	V# +'giLt;i)r]rfr!N�modes�
� �edidz-base64z: rrr#r	)rrirr�r�r%r1r2r�base64�	b64encoder
)�conr�r9r�
con_info_file�vals&     r�__drm_con_infor�s���
�D�
�Z�Z��_���w�w�|�|�C�#����=������t� 4� 4��
�$��
�
���$�$�&�,�,�.�C��
��<��+�+�e�T�*�C���;��"�"�3�'�C�
��N�A��#�R��
�
�7�9�
�=�>�b�A�A����K��
�s�=D�Dc��Rp\PPV4'gR#\P!V4F�p\PP	W4p\PP\PP	VR44'gKg\
V4VR\V42&K�	R#)zOAdd information about DRM hardware.

Collect information from /sys/class/drm/.
z/sys/class/drmN�enabledzDRM.)rrrhrir�rr�r)r�drm_dirr9r�s&   r�attach_drm_infor�-s���
�G�
�7�7�=�=��!�!��
�Z�Z��
 ���g�g�l�l�7�&��
�7�7�>�>�"�'�'�,�,�s�I�6�7�7�.<�S�.A�F�T�+�a�.�)�*�+�	!rc�P�\PPR4pV'g�\RRR7;_uu_4pVFZpVP	4pRV9gKVPR4'gK5RV9gK>VP
R^4^,RR
pM
	RRR4R#RRR4VP4pTfR#\P!R	T24PpYT8*# +'giLO;i \dR#i;i \dR#i;i)z�Check if the problem happened in the currently running XDG session.

This can be used to determine if e. g. ~/.xsession-errors is relevant and
should be attached.

Return None if this cannot be determined.
�XDG_SESSION_IDz/proc/self/cgroupr�r�z
name=systemd:z.scopez	/session-Nz/run/systemd/sessions/i����)rr�r_r%r2�endswithr�r]�AttributeErrorr,rFr3)r�
session_idr9r��report_time�session_start_times&     r�in_session_of_problemr�<s������� 0�1�J��
�%��
8�
8�A����z�z�|��#�t�+��
�
�h�/�/�#�t�+�!%���K��!;�A�!>�s��!C�J����9�
8��9���*�*�,�������W�W�'=�j�\�%J�K�T�T���,�,�59�
8�����������sA�C1�C1�5C1�>!C1�3D�
#D�1D	�D�D�D%�$D%c��RpV'g\V4p\PPV4'dm\	VRRR7;_uu_4pVP4Uu.uFpVP
R4'gTMRNK 	ppRPV4W&RRR4R#R#uupi +'giR#;i)	z<Attach /etc/default/grub after filtering out password lines.z/etc/default/grubr�r�r��passwordz### PASSWORD LINE REMOVED ###r]N)rrrrr%�	readlinesrBr�)rrrr9r��filtereds&&    r�attach_default_grubr�ds����D���$���	�w�w�~�~�d���
�$��g�
.�
.�!��K�K�M�
�*�D� �?�?�:�6�6��8�9�*�

���'�'�(�+�F�K�/�
.����/�
.�
.�s$�B.�$B)�B)�B.�)B.�.B?	c�^�Rp.p\PPV4'dR\VRRVR2/4RV9d9\P
!VR,4pVR,pVP
R.4pW R&V'dRPV4VR	&VPRR
4R
#)z;Attach the results of the casper md5check of install media.�unknown�
CasperMD5jsonzcat '�'r:�checksum_missmatch�CasperMD5CheckResultr	�CasperMD5CheckMismatchesN)	rrrr�json�loadsr_r��pop)r�locationr:�
mismatchesr�s&&   r�attach_casper_md5checkr
ws���
�F��J�	�w�w�~�~�h���#�F�_��h�Z�q�>Q�,R�S��f�$��J�J�v�o�6�7�E��8�_�F����#7��<�J�%+�!�"��-0�X�X�j�-A��)�*�
�J�J���%r)NTF)F)NN)N)�
)r�)X�__doc__r�rDr�rrrur�rr,r�r�rrS�collections.abcrr�apport.fileutils�apport�apport.packaging_implrr?�problem_reportrr0rr�rrr<rrNrWrZrbrmrvr�r�r�r��STDOUTr�r�r�rr`rrr"r.r1�PCI_MASS_STORAGErn�PCI_DISPLAYr��
PCI_MEMORY�
PCI_BRIDGE�PCI_SIMPLE_COMMUNICATIONS�PCI_BASE_SYSTEM_PERIPHERALS�PCI_INPUT_DEVICES�PCI_DOCKING_STATIONS�PCI_PROCESSORS�PCI_SERIAL_BUSr�r@rFrHrUrXrbrprsr�r�r�r�r�r�r�r�r�r�r�r
�	fileutils�shared_libraries�links_with_shared_libraryr�rr�<module>r s���5� ����	�	�
�
���
���-��3�(��
�
�#5�6��	
��B�A�2"�J?�,!J�J��@�
�6�"/+�d.3�b�<� ������,�^"�J	���
� 1� 1�t��.;�|�(�(5�d�5�2�D��������
�
�
�
� ��"�����������@+���
&+�R0��,	*�M�
Y�82�n4�nC�L�<�.�"�$B�%-�P,�&&�$�#�#�4�4��"�,�,�F�F�r

Youez - 2016 - github.com/yon3zu
LinuXploit