⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.55
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
primordial
/
__pycache__
/
View File Name :
utils.cpython-39.pyc
a ���g' � @ sN d dl Z d dlmZmZ d dlmZ d dlmZmZm Z m Z mZmZm Z dZe �e�ZG dd� de�Ze e e e d�d d �Zeeef e e eeef d�dd �Zeeef e e eeef d�dd�Zd ed�eeed�dd�Zd dd�eeed�dd�Zefedddfeee df eee e egef e e egef d�dd�ZdS )� N)�partial�update_wrapper)�sleep)�Any�Dict�Iterable�Optional�Tuple�Type�Callable� c @ s e Zd ZdZdS )�RetriesExhaustedErrorz9A special type which signals the failure of a retry loop.N)�__name__� __module__�__qualname__�__doc__� r r �A/opt/nydus/tmp/pip-target-mke_irhy/lib/python/primordial/utils.pyr s r )�hostname�returnc C sF | du rdS | � � �d�r&| dd� } | �d�D ]}|r0| S q0| S )z�Abbreviate hostname for use on a Windows machine. :param hostname: the hostname :returns: the first non-empty domain in the hostname, excluding "www." Nzwww.� �.)�lower� startswith�split)r �domainr r r �abbreviate_hostname_for_windows s r )�dict_�keysr c s � fdd�| � � D �S )a Filter a dictionary to contain only a certain set of keys. :param dict_: The original dictionary to be filtered. :param keys: A list, or other iterable, containing the desired dictionary keys. :returns: A dictionary containing only the desired keys. c s i | ]\}}|� v r||�qS r r ��.0�k�v�r r r � <dictcomp>+ � zsubdict.<locals>.<dictcomp>��items�r r r r# r �subdict$ s r) c s � fdd�| � � D �S )z�Filter a dictionary to omit a set of keys. :param dict_: The original dictionary to be filtered. :param keys: An iterable containing the keys to omit. :returns: A dictionary with the desired keys omitted. c s i | ]\}}|� vr||�qS r r r r# r r r$ 5 r% z subdict_omit.<locals>.<dictcomp>r&