Skip to content

Add CASE 1.4.0 release #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions case_utils/case_file/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
NS_UCO_CORE,
NS_UCO_OBSERVABLE,
NS_UCO_TYPES,
NS_UCO_VOCABULARY,
NS_XSD,
)

Expand Down Expand Up @@ -228,14 +227,9 @@ def create_file_node(

l_hash_method: rdflib.Literal
if key in ("sha3_256", "sha3_512"):
l_hash_method = rdflib.Literal(
key.replace("_", "-").upper(),
datatype=NS_UCO_VOCABULARY.HashNameVocab,
)
l_hash_method = rdflib.Literal(key.replace("_", "-").upper())
else:
l_hash_method = rdflib.Literal(
key.upper(), datatype=NS_UCO_VOCABULARY.HashNameVocab
)
l_hash_method = rdflib.Literal(key.upper())

hash_value: str = getattr(successful_hashdict, key)
l_hash_value = rdflib.Literal(hash_value.upper(), datatype=NS_XSD.hexBinary)
Expand Down Expand Up @@ -300,7 +294,6 @@ def main() -> None:
graph.namespace_manager.bind("uco-core", NS_UCO_CORE)
graph.namespace_manager.bind("uco-observable", NS_UCO_OBSERVABLE)
graph.namespace_manager.bind("uco-types", NS_UCO_TYPES)
graph.namespace_manager.bind("uco-vocabulary", NS_UCO_VOCABULARY)
graph.namespace_manager.bind("xsd", NS_XSD)

output_format = None
Expand Down
20 changes: 10 additions & 10 deletions case_utils/inherent_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@

from rdflib import Literal, Namespace, URIRef

from case_utils.namespace import NS_UCO_CORE, NS_UCO_VOCABULARY, NS_XSD

L_MD5 = Literal("MD5", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SHA1 = Literal("SHA1", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SHA256 = Literal("SHA256", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SHA3_256 = Literal("SHA3-256", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SHA3_512 = Literal("SHA3-512", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SHA384 = Literal("SHA384", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SHA512 = Literal("SHA512", datatype=NS_UCO_VOCABULARY.HashNameVocab)
L_SSDEEP = Literal("SSDEEP", datatype=NS_UCO_VOCABULARY.HashNameVocab)
from case_utils.namespace import NS_UCO_CORE, NS_XSD

L_MD5 = Literal("MD5")
L_SHA1 = Literal("SHA1")
L_SHA256 = Literal("SHA256")
L_SHA3_256 = Literal("SHA3-256")
L_SHA3_512 = Literal("SHA3-512")
L_SHA384 = Literal("SHA384")
L_SHA512 = Literal("SHA512")
L_SSDEEP = Literal("SSDEEP")

# Key: hashMethod literal.
# Value: Tuple.
Expand Down
Loading