Skip to content

Commit

Permalink
Change some call for some ontology classes with mandatory parameter: …
Browse files Browse the repository at this point in the history
…Bundle/core_objects, EXIFFacet/exif_key_value_pairs, emailaccountfacet /email_address
  • Loading branch information
fabrizio-turchi committed Dec 4, 2024
1 parent 0acd673 commit a8e3e8e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions UFEDtoJSON.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import os
import re
import sys
#from UFED_case_generator import *
from dependencies.CASE_Mapping_Python.case_mapping import base, case, drafting, uco
from dependencies.case_mapping import base, case, drafting, uco
from datetime import datetime, date
from typing import Dict, List, Optional, Union

Expand Down Expand Up @@ -843,7 +842,7 @@ def __generateTraceEmailAccount(self, address):
email_address_object = self.__generateTraceEmailAddress(address)

email_account_object = uco.observable.ObservableObject()
facet_email_account = uco.observable.EmailAccountFacet(email_address_object)
facet_email_account = uco.observable.EmailAccountFacet(email_address=email_address_object)
facet_account = uco.observable.AccountFacet(identifier="-")
email_account_object.append_facets(facet_account, facet_email_account)

Expand Down Expand Up @@ -929,7 +928,7 @@ def __generateTraceFile(self, FILEpath, FILEsize, FILEhashType,
"Model":FILEexifModel, "LatitudeRef":FILEexifLatitudeRef,
"Latitude":FILEexifLatitude, "LongitudeRef":FILEexifLongitudeRef,
"Longitude":FILEexifLongitude, "Altitude":FILEexifAltitude}
facet_exif = uco.observable.EXIFFacet(**exif_data)
facet_exif = uco.observable.EXIFFacet(exif_key_value_pairs = exif_data)
file_object.append_facets(facet_exif)
facet_ext_inode = uco.observable.ExtInodeFacet(inode_change_time=FILEiNodeTimeM,
inode_id=FILEiNode, sgid=FILEgid, suid=FILEuid)
Expand Down Expand Up @@ -1474,12 +1473,14 @@ def write_header(
'''
c_time = datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
bundle_created_time = datetime.strptime(c_time, "%Y-%m-%dT%H:%M:%S")
uco_object = base.UcoObject()
self.bundle = uco.core.Bundle(
description="A Cellebrite XML report generated by UFED PA",
name=" ".join(["JSON","LD", "representation", "of", os.path.basename(xml_report)]),
specVersion="UCO/CASE 1.3",
tag="Artifacts extracted from a mobile device",
object_created_time=bundle_created_time
object_created_time=bundle_created_time,
core_objects=[uco_object]
)

def writeLastLine(self):
Expand Down

0 comments on commit a8e3e8e

Please sign in to comment.