コード例 #1
0
ファイル: misp2stix.py プロジェクト: luannguyen81/MISP
 def resolve_pattern_observable(indicator, attribute):
     if attribute.type == "pattern-in-file":
         byte_run = ByteRun()
         byte_run.byte_run_data = attribute.value
         new_object = File()
         new_object.byte_runs = ByteRuns(byte_run)
         return new_object
     return None
コード例 #2
0
ファイル: misp2cybox.py プロジェクト: mzje/MISP
def resolvePatternObservable(indicator, attribute):
    new_object = None
    if attribute["type"] == "pattern-in-file":
        byte_run = ByteRun()
        byte_run.byte_run_data = attribute["value"]
        new_object = File()
        new_object.byte_runs = ByteRuns(byte_run)
    # custom properties are not implemented in the API yet
    # elif attribute["type"] == "pattern-in-memory":
    # elif attribute["type"] == "pattern-in-traffic":
    return new_object
コード例 #3
0
ファイル: misp2cybox.py プロジェクト: cnbird1999/MISP
def resolvePatternObservable(attribute):
    new_object = None
    if attribute["type"] == "pattern-in-file":
        byte_run = ByteRun()
        byte_run.byte_run_data = attribute["value"]
        new_object = File()
        new_object.byte_runs = ByteRuns(byte_run)
    # custom properties are not implemented in the API yet
    # elif attribute["type"] == "pattern-in-memory":
    # elif attribute["type"] == "pattern-in-traffic":
    return new_object