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


Python HashList.from_list方法代码示例

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


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

示例1: from_dict

# 需要导入模块: from cybox.common import HashList [as 别名]
# 或者: from cybox.common.HashList import from_list [as 别名]
    def from_dict(file_dict, file_class=None):
        if not file_dict:
            return None
        if not file_class:
            file_ = File()
        else:
            file_ = file_class
        ObjectProperties.from_dict(file_dict, file_)

        file_.is_packed = file_dict.get('is_packed')
        file_.file_name = String.from_dict(file_dict.get('file_name'))
        file_.file_path = FilePath.from_dict(file_dict.get('file_path'))
        file_.device_path = String.from_dict(file_dict.get('device_path'))
        file_.full_path = String.from_dict(file_dict.get('full_path'))
        file_.file_extension = String.from_dict(file_dict.get('file_extension'))
        file_.size_in_bytes = UnsignedLong.from_dict(file_dict.get('size_in_bytes'))
        file_.magic_number = HexBinary.from_dict(file_dict.get('magic_number'))
        file_.file_format = String.from_dict(file_dict.get('file_format'))
        file_.hashes = HashList.from_list(file_dict.get('hashes'))
        file_.extracted_features = ExtractedFeatures.from_dict(file_dict.get('extracted_features'))
        file_.modified_time = String.from_dict(file_dict.get('modified_time'))
        file_.accessed_time = String.from_dict(file_dict.get('accessed_time'))
        file_.created_time = DateTime.from_dict(file_dict.get('created_time'))

        return file_
开发者ID:maurakilleen,项目名称:crits_dependencies,代码行数:27,代码来源:file_object.py

示例2: from_dict

# 需要导入模块: from cybox.common import HashList [as 别名]
# 或者: from cybox.common.HashList import from_list [as 别名]
    def from_dict(memory_dict):
        if not memory_dict:
            return None

        memory_ = Memory()
        memory_.is_injected = memory_dict.get('is_injected')
        memory_.is_mapped = memory_dict.get('is_mapped')
        memory_.is_protected = memory_dict.get('is_protected')
        memory_.hashes = HashList.from_list(memory_dict.get('hashes'))
        memory_.name = String.from_dict(memory_dict.get('name'))
        memory_.region_size = UnsignedLong.from_dict(memory_dict.get('region_size'))
        memory_.region_start_address = HexBinary.from_dict(memory_dict.get('region_start_address'))
        memory_.extracted_features = None

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

示例3: from_dict

# 需要导入模块: from cybox.common import HashList [as 别名]
# 或者: from cybox.common.HashList import from_list [as 别名]
    def from_dict(extracted_string_dict):
        if not extracted_string_dict:
            return None

        extracted_string_ = ExtractedString()
        extracted_string_.encoding = VocabString.from_dict(extracted_string_dict.get('encoding'))
        extracted_string_.string_value = String.from_dict(extracted_string_dict.get('string_value'))
        extracted_string_.byte_string_value = HexBinary.from_dict(extracted_string_dict.get('byte_string_value'))
        extracted_string_.hashes = HashList.from_list(extracted_string_dict.get('hashes'))
        extracted_string_.address = HexBinary.from_dict(extracted_string_dict.get('address'))
        extracted_string_.length = PositiveInteger.from_dict(extracted_string_dict.get('length'))
        extracted_string_.language = String.from_dict(extracted_string_dict.get('language'))
        extracted_string_.english_translation = String.from_dict(extracted_string_dict.get('english_translation'))

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

示例4: from_dict

# 需要导入模块: from cybox.common import HashList [as 别名]
# 或者: from cybox.common.HashList import from_list [as 别名]
    def from_dict(toolinfo_dict, toolinfo=None):
        if not toolinfo_dict:
            return None

        if not toolinfo:
            toolinfo = ToolInformation()

        toolinfo.id_ = toolinfo_dict.get('id')
        toolinfo.idref = toolinfo_dict.get('idref')
        toolinfo.name = toolinfo_dict.get('name')
        toolinfo.type_ = [VocabString.from_dict(x) for x in toolinfo_dict.get('type', [])]
        toolinfo.description = StructuredText.from_dict(toolinfo_dict.get('description'))

        toolinfo.vendor = toolinfo_dict.get('vendor')
        toolinfo.version = toolinfo_dict.get('version')
        toolinfo.service_pack = toolinfo_dict.get('service_pack')

        toolinfo.tool_hashes = HashList.from_list(toolinfo_dict.get('tool_hashes'))

        return toolinfo
开发者ID:pallav17,项目名称:python-cybox,代码行数:22,代码来源:tools.py

示例5: from_dict

# 需要导入模块: from cybox.common import HashList [as 别名]
# 或者: from cybox.common.HashList import from_list [as 别名]
    def from_dict(win_service_dict):
        if not win_service_dict:
            return None

        win_service_ = WinProcess.from_dict(win_service_dict, WinService())
        win_service_.service_dll_signature_exists = win_service_dict.get('service_dll_signature_exists')
        win_service_.service_dll_signature_verified = win_service_dict.get('service_dll_signature_verified')
        win_service_.description_list = [String.from_dict(x) for x in win_service_dict.get('description_list', [])]
        win_service_.display_name = String.from_dict(win_service_dict.get('display_name'))
        win_service_.group_name = String.from_dict(win_service_dict.get('group_name'))
        win_service_.service_name = String.from_dict(win_service_dict.get('service_name'))
        win_service_.service_dll = String.from_dict(win_service_dict.get('service_dll'))
        win_service_.service_dll_certificate_issuer = String.from_dict(win_service_dict.get('service_dll_certificate_issuer'))
        win_service_.service_dll_certificate_subject = String.from_dict(win_service_dict.get('service_dll_certificate_subject'))
        win_service_.service_dll_hashes = HashList.from_list(win_service_dict.get('service_dll_hashes'))
        win_service_.service_dll_signature_description = String.from_dict(win_service_dict.get('service_dll_signature_description'))
        win_service_.startup_command_line = String.from_dict(win_service_dict.get('startup_command_line'))
        win_service_.startup_type = String.from_dict(win_service_dict.get('startup_type'))
        win_service_.service_status = String.from_dict(win_service_dict.get('service_status'))
        win_service_.service_type = String.from_dict(win_service_dict.get('service_type'))
        win_service_.started_as = String.from_dict(win_service_dict.get('started_as'))

        return win_service_
开发者ID:maurakilleen,项目名称:crits_dependencies,代码行数:25,代码来源:win_service_object.py


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