관리-도구
편집 파일: infected_domain.cpython-311.pyc
� IMg� � � � d dl Z d dlZd dlZd dlmZmZmZmZ d dlm Z m Z ej e� � Z G d� de � � ZdS )� N)� CharField� FloatField�IntegerField� TextField)�instance�Modelc �� � e Zd ZdZ ed�� � Z ed�� � Z ed�� � Z ed�� � Z e � � Z ed�� � Z G d� d� � Zed d �� � Zed� � � ZdS )�InfectedDomainListzDDomains with bad reputation, used for Reputation Management feature.T)�primary_key)�nullFc � � e Zd Zej ZdZdS )�InfectedDomainList.Meta�infected_domain_listN)�__name__� __module__�__qualname__r �db�database�db_table� � �Z/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/model/infected_domain.py�Metar ! s � � � � � ��;��)���r r r �2 c �� �� | � � � � | j | j | j � � � � � }�fd�|� � � D � � }t j |d� �� � }d}g }t |� � D ]P\ } } |dz }t |� � |k r3| |k r-| \ }}|\ } }|� | |d� |D � � d�� � �Q||fS )Nc 3 �0 �K � | ]}|d �v �|V � �dS )�usernameNr )�.0�row�existing_userss �r � <genexpr>z1InfectedDomainList.get_by_user.<locals>.<genexpr>, s: �� � � � � ��C� �O�~�,M�,M�C�,M�,M�,M�,M� � r c �"