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


Python Address.from_obj方法代码示例

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


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

示例1: from_obj

# 需要导入模块: from cybox.objects.address_object import Address [as 别名]
# 或者: from cybox.objects.address_object.Address import from_obj [as 别名]
    def from_obj(header_obj):
        header = EmailHeader()

        header.to = EmailRecipients.from_obj(header_obj.get_To())
        header.cc = EmailRecipients.from_obj(header_obj.get_CC())
        header.bcc = EmailRecipients.from_obj(header_obj.get_BCC())
        header.from_ = Address.from_obj(header_obj.get_From())
        header.subject = String.from_obj(header_obj.get_Subject())
        header.in_reply_to = String.from_obj(header_obj.get_In_Reply_To())
        header.date = DateTime.from_obj(header_obj.get_Date())
        header.message_id = String.from_obj(header_obj.get_Message_ID())
        header.sender = Address.from_obj(header_obj.get_Sender())
        header.reply_to = Address.from_obj(header_obj.get_Reply_To())
        header.errors_to = String.from_obj(header_obj.get_Errors_To())

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

示例2: from_obj

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

        socket_address_ = SocketAddress()
        socket_address_.ip_address = Address.from_obj(socket_address_obj.get_IP_Address())
        socket_address_.port = Port.from_obj(socket_address_obj.get_Port())

        return socket_address_
开发者ID:maurakilleen,项目名称:crits_dependencies,代码行数:11,代码来源:socket_address_object.py

示例3: from_obj

# 需要导入模块: from cybox.objects.address_object import Address [as 别名]
# 或者: from cybox.objects.address_object.Address import from_obj [as 别名]
    def from_obj(contact_obj, contact=None):
        if not contact_obj:
            return None

        if contact is None:
            contact = WhoisContact()

        contact.contact_type = contact_obj.get_contact_type()
        contact.contact_id = String.from_obj(contact_obj.get_Contact_ID())
        contact.name = String.from_obj(contact_obj.get_Name())
        contact.email_address = Address.from_obj(contact_obj.get_Email_Address())
        contact.phone_number = String.from_obj(contact_obj.get_Phone_Number())
        contact.address = String.from_obj(contact_obj.get_Address())

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

示例4: from_obj

# 需要导入模块: from cybox.objects.address_object import Address [as 别名]
# 或者: from cybox.objects.address_object.Address 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


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