当前位置: 首页>>代码示例>>Python>>正文


Python URI.from_obj方法代码示例

本文整理汇总了Python中cybox.objects.uri_object.URI.from_obj方法的典型用法代码示例。如果您正苦于以下问题:Python URI.from_obj方法的具体用法?Python URI.from_obj怎么用?Python URI.from_obj使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cybox.objects.uri_object.URI的用法示例。


在下文中一共展示了URI.from_obj方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: from_obj

# 需要导入模块: from cybox.objects.uri_object import URI [as 别名]
# 或者: from cybox.objects.uri_object.URI import from_obj [as 别名]
    def from_obj(registrar_obj):
        if not registrar_obj:
            return None

        registrar = WhoisRegistrar()

        registrar.registrar_id = String.from_obj(registrar_obj.get_Registrar_ID())
        registrar.registrar_guid = String.from_obj(registrar_obj.get_Registrar_GUID())
        registrar.name = String.from_obj(registrar_obj.get_Name())
        registrar.address = String.from_obj(registrar_obj.get_Address())
        registrar.email_address = Address.from_obj(registrar_obj.get_Email_Address())
        registrar.phone_number = String.from_obj(registrar_obj.get_Phone_Number())
        registrar.whois_server = URI.from_obj(registrar_obj.get_Whois_Server())
        registrar.referral_url = URI.from_obj(registrar_obj.get_Referral_URL())
        registrar.contacts = WhoisContacts.from_obj(registrar_obj.get_Contacts())

        return registrar
开发者ID:maurakilleen,项目名称:crits_dependencies,代码行数:19,代码来源:whois_object.py

示例2: from_obj

# 需要导入模块: from cybox.objects.uri_object import URI [as 别名]
# 或者: from cybox.objects.uri_object.URI import from_obj [as 别名]
 def from_obj(mal_conf_storage_obj):
     if not mal_conf_storage_obj:
         return None
     mal_conf_storage_ = MalwareConfigurationStorageDetails()
     mal_conf_storage_.malware_binary = MalwareBinaryConfigurationStorageDetails.from_obj(mal_conf_storage_obj.get_Malware_Binary())
     mal_conf_storage_.file = File.from_obj(mal_conf_storage_obj.get_File())
     if mal_conf_storage_obj.get_URL():
         mal_conf_storage_.url = [URI.from_obj(x) for x in mal_conf_obj.get_URL()]
     return mal_conf_storage_
开发者ID:geliefan,项目名称:python-maec,代码行数:11,代码来源:malware_subject.py

示例3: from_obj

# 需要导入模块: from cybox.objects.uri_object import URI [as 别名]
# 或者: from cybox.objects.uri_object.URI import from_obj [as 别名]
    def from_obj(dns_record_obj):
        if not dns_record_obj:
            return None

        dns_record_ = DNSRecord()
        dns_record_.description = StructuredText.from_obj(dns_record_obj.get_Description())
        dns_record_.domain_name = URI.from_obj(dns_record_obj.get_Domain_Name())
        dns_record_.ip_address = Address.from_obj(dns_record_obj.get_IP_Address())
        dns_record_.address_class = String.from_obj(dns_record_obj.get_Address_Class())
        dns_record_.entry_type = String.from_obj(dns_record_obj.get_Entry_Type())
        dns_record_.record_name = String.from_obj(dns_record_obj.get_Record_Name())
        dns_record_.record_type = String.from_obj(dns_record_obj.get_Record_Type())
        dns_record_.ttl = Integer.from_obj(dns_record_obj.get_TTL())
        dns_record_.flags = HexBinary.from_obj(dns_record_obj.get_Flags())
        dns_record_.data_length = Integer.from_obj(dns_record_obj.get_Length())
        dns_record_.record_data = dns_record_obj.get_Record_Data()

        return dns_record_
开发者ID:maurakilleen,项目名称:crits_dependencies,代码行数:20,代码来源:dns_record_object.py

示例4: from_obj

# 需要导入模块: from cybox.objects.uri_object import URI [as 别名]
# 或者: from cybox.objects.uri_object.URI import from_obj [as 别名]
    def from_obj(message_obj):
        message = EmailMessage()

        attachments = message_obj.get_Attachments()
        if attachments:
            for attachment in attachments.get_File():
                message.attachments.append(File.from_obj(attachment))

        links = message_obj.get_Links()
        if links:
            for link in links.get_Link():
                message.links.append(URI.from_obj(link))

        message.header = EmailHeader.from_obj(message_obj.get_Header())
        message.optional_header = OptionalHeader.from_obj(message_obj.get_Optional_Header())
        message.email_server = String.from_obj(message_obj.get_Email_Server())
        message.raw_body = String.from_obj(message_obj.get_Raw_Body())
        message.raw_header = String.from_obj(message_obj.get_Raw_Header())

        return message
开发者ID:2xyo,项目名称:python-cybox,代码行数:22,代码来源:email_message_object.py


注:本文中的cybox.objects.uri_object.URI.from_obj方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。