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


Python Observable.title方法代码示例

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


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

示例1: create_ipv4_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
def create_ipv4_observable(ipv4_address):
    ipv4_object = Address.from_dict({"address_value": ipv4_address, "category": Address.CAT_IPV4})
    ipv4_observable = Observable(ipv4_object)
    ipv4_observable.title = "Malware Artifact - IP"
    ipv4_observable.description = "IP derived from sandboxed malware sample."
    ipv4_observable.short_description = "IP from malware."
    return ipv4_observable
开发者ID:BechtelCIRT,项目名称:fe2stix,代码行数:9,代码来源:app.py

示例2: create_url_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
def create_url_observable(url):
    url_object = URI.from_dict({"value": url, "type": URI.TYPE_URL})
    url_observable = Observable(url_object)
    url_observable.title = "Malware Artifact - URL"
    url_observable.description = "URL derived from sandboxed malware sample."
    url_observable.short_description = "URL from malware."
    return url_observable
开发者ID:BechtelCIRT,项目名称:fe2stix,代码行数:9,代码来源:app.py

示例3: create_domain_name_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
def create_domain_name_observable(domain_name):
    domain_name_object = URI.from_dict({"value": domain_name, "type": URI.TYPE_DOMAIN})
    domain_name_observable = Observable(domain_name_object)
    domain_name_observable.title = "Malware Artifact - Domain"
    domain_name_observable.description = "Domain derived from sandboxed malware sample."
    domain_name_observable.short_description = "Domain from malware."
    return domain_name_observable
开发者ID:BechtelCIRT,项目名称:fe2stix,代码行数:9,代码来源:app.py

示例4: add_domain_name_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
 def add_domain_name_observable(self, domain_name):
     if domain_name in self.__domains:
         return
     self.__domains.add(domain_name)
     domain_name_object = URI.from_dict({'value': domain_name, 'type': URI.TYPE_DOMAIN})
     domain_name_observable = Observable(domain_name_object)
     domain_name_observable.title = "Malware Artifact - Domain"
     domain_name_observable.description = "Domain derived from sandboxed malware sample."
     domain_name_observable.short_description = "Domain from malware."
     self.domain_indicator.add_observable(domain_name_observable)
开发者ID:trolldbois,项目名称:fexml2stix,代码行数:12,代码来源:fexml2stix.py

示例5: add_ipv4_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
 def add_ipv4_observable(self, ipv4_address):
     if ipv4_address in self.__ipv4:
         return
     self.__ipv4.add(ipv4_address)
     ipv4_object = Address.from_dict({'address_value': ipv4_address, 'category': Address.CAT_IPV4})
     ipv4_observable = Observable(ipv4_object)
     ipv4_observable.title = "Malware Artifact - IP"
     ipv4_observable.description = "IP derived from sandboxed malware sample."
     ipv4_observable.short_description = "IP from malware."
     self.ip_indicator.add_observable(ipv4_observable)
开发者ID:trolldbois,项目名称:fexml2stix,代码行数:12,代码来源:fexml2stix.py

示例6: add_url_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
 def add_url_observable(self, url):
     if url in self.__urls:
         return
     self.__urls.add(url)
     url_object = URI.from_dict({'value': url, 'type': URI.TYPE_URL})
     url_observable = Observable(url_object)
     url_observable.title = "Malware Artifact - URL"
     url_observable.description = "URL derived from sandboxed malware sample."
     url_observable.short_description = "URL from malware."
     self.url_indicator.add_observable(url_observable)
开发者ID:trolldbois,项目名称:fexml2stix,代码行数:12,代码来源:fexml2stix.py

示例7: create_file_hash_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
def create_file_hash_observable(filename, hash_value):
    hash_ = Hash(hash_value)
    file_ = File()
    file_.file_name = filename
    file_.add_hash(hash_)
    file_observable = Observable(file_)
    file_observable.title = "Malware Artifact - File Hash"
    file_observable.description = "File hash derived from sandboxed malware sample."
    file_observable.short_description = "File hash from malware."
    return file_observable
开发者ID:BechtelCIRT,项目名称:fe2stix,代码行数:12,代码来源:app.py

示例8: test_round_trip

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
    def test_round_trip(self):
        o = Observable()
        o.title = "An observable"
        o.description = "some text"
        o.description.structuring_format = "plain"
        o.id_ = "abc123"
        o.object_ = Object()

        o2 = cybox.test.round_trip(o)
        self.assertEqual(o.to_dict(), o2.to_dict())
开发者ID:bauer1j,项目名称:python-cybox,代码行数:12,代码来源:observable_test.py

示例9: test_keywords

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
    def test_keywords(self):
        o = Observable()
        o.title = "Test"

        self.assertTrue("eyword" not in o.to_xml())
        o.add_keyword("Foo")
        print(o.to_xml())
        self.assertTrue("<cybox:Keyword>Foo</cybox:Keyword>" in o.to_xml())

        o2 = round_trip(o)
        self.assertEqual(1, len(o2.keywords))
开发者ID:luisgf,项目名称:watsondt,代码行数:13,代码来源:observable_test.py

示例10: add_file_hash_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
 def add_file_hash_observable(self, filename, md5_value, sha1_value):
     if (filename, md5_value, sha1_value) in self.__hashes:
         return
     self.__hashes.add((filename, md5_value, sha1_value))
     file_ = File()
     file_.file_name = filename
     file_.add_hash(Hash(md5_value))
     file_.add_hash(Hash(sha1_value))
     file_observable = Observable(file_)
     file_observable.title = "Malware Artifact - File Hash"
     file_observable.description = "File hash derived from sandboxed malware sample."
     file_observable.short_description = "File hash from malware."
     self.hash_indicator.add_observable(file_observable)
开发者ID:trolldbois,项目名称:fexml2stix,代码行数:15,代码来源:fexml2stix.py

示例11: add_registry_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
 def add_registry_observable(self, mode, value):
     if (mode, value) in self.__regkeys:
         return
     self.__regkeys.add((mode, value))
     # FIXME value is not parse properly
     _key = '\\'.join(value.split('\\')[3:])
     hive = value.split('\\')[2]
     reg_object = WinRegistryKey.from_dict({'key': _key, 'hive': hive})
     reg_observable = Observable(reg_object)
     reg_observable.title = "Malware Artifact - Registry"
     reg_observable.description = "Registry access derived from sandboxed malware sample."
     reg_observable.short_description = "Registry access from malware."
     self.reg_indicator.add_observable(reg_observable)
开发者ID:trolldbois,项目名称:fexml2stix,代码行数:15,代码来源:fexml2stix.py

示例12: add_file_dropped_observable

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
 def add_file_dropped_observable(self, filename):
     if filename in self.__files:
         return
     self.__files.add(filename)
     #hash_ = Hash(hash_value)
     file_ = File()
     file_.file_name = filename
     #file_.add_hash(hash_)
     file_observable = Observable(file_)
     file_observable.title = "Malware Artifact - File Dropped"
     file_observable.description = "File Dropped derived from sandboxed malware sample."
     file_observable.short_description = "File Dropped from malware."
     self.hash_indicator.add_observable(file_observable)
开发者ID:trolldbois,项目名称:fexml2stix,代码行数:15,代码来源:fexml2stix.py

示例13: cybox_http

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
def cybox_http(observable, observable_type, objects):
    nsname, nsurl = observable.namespace.split(':', 1)
    NS = cybox.utils.Namespace(nsurl, nsname)
    cybox.utils.set_id_namespace(NS)
    observables = Observables()
    for obj in objects:
        h = cybox_object_http(obj)
        # get related objects
        related_objects_list = get_related_objects_for_object(obj.id, observable_type)

        o = Observable(h)
        o.title = observable.name
        o.description = observable.description
        observables.add(o)
    return observables
开发者ID:gregtampa,项目名称:kraut_salad,代码行数:17,代码来源:utils.py

示例14: _affectsoft

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
def _affectsoft(data):
    affect_soft = AffectedSoftware()
    for software in data['vulnerable_configuration']:
        id_list = software['id'].split(':')
        prod_obj = Product()
        prod_obj.product = software['title']
        prod_obj.Device_Details = software['id']
        prod_obj.vendor = id_list[3].title()
        if len(id_list) > 6:
            prod_obj.version = id_list[5] + " " + id_list[6]
        elif len(id_list) == 6:
            prod_obj.version = id_list[5]
        prod_obs = Observable(prod_obj)
        prod_obs.title = "Product: " + software['title']
        affect_soft.append(prod_obs)
    return affect_soft
开发者ID:certuk,项目名称:cve-builder,代码行数:18,代码来源:cvebuilder.py

示例15: test_round_trip

# 需要导入模块: from cybox.core import Observable [as 别名]
# 或者: from cybox.core.Observable import title [as 别名]
    def test_round_trip(self):
        o = Observable()
        o.title = "An observable"
        o.description = "some text"
        o.description.structuring_format = "plain"
        o.id_ = "abc123"
        o.object_ = Object()

        pf = PatternFidelity()
        ot = ObfuscationTechnique()
        ot.description = "X0Rz"
        pf.evasion_techniques = ObfuscationTechniques()
        pf.evasion_techniques.append(ot)
        o.pattern_fidelity = pf

        o2 = round_trip(o)
        self.assertEqual(o.to_dict(), o2.to_dict())
开发者ID:luisgf,项目名称:watsondt,代码行数:19,代码来源:observable_test.py


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