misp_event.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:tie2misp 作者: DCSO 项目源码 文件源码
def __init__(self, organisation_name, organisation_uuid, threat_level_id, published, info, date):
        dt = datetime.datetime.now()

        if not organisation_name or not organisation_uuid:
            raise ValueError('Organisation Name and UUID must be set')

        if not threat_level_id:
            raise ValueError('Threat Level must be set')

        if not info:
            raise ValueError('Info must be set')

        self.__Info = date.strftime("%Y%m%d ") + info
        self.__PublishTimestamp = dt.strftime("%s")
        self.__Timestamp = dt.strftime("%s")
        self.__Analysis = 2
        self.__Attribute = list()
        self.__Tags = list()
        self.__Published = published
        self.__Orgc = {'name': organisation_name, 'uuid': organisation_uuid}
        self.__Threat_Level_ID = threat_level_id
        self.__UUID = uuid.uuid1()
        self.__Date = dt.strftime("%Y-%m-%d")

    # Getter
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号