예제 #1
0
 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
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