diff --git a/artifacts/__init__.py b/artifacts/__init__.py index 9efee234..9fdadbd4 100644 --- a/artifacts/__init__.py +++ b/artifacts/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- """ForensicArtifacts.com Artifact Repository.""" -__version__ = '20240112' +__version__ = '20240114' diff --git a/artifacts/registry.py b/artifacts/registry.py index 86030bbf..59abd2eb 100644 --- a/artifacts/registry.py +++ b/artifacts/registry.py @@ -128,10 +128,10 @@ def GetDefinitionByName(self, name): def GetDefinitions(self): """Retrieves the artifact definitions. - Returns: - list[ArtifactDefinition]: artifact definitions. + Yields: + ArtifactDefinition: artifact definition. """ - return self._artifact_definitions_by_name.values() + yield from self._artifact_definitions_by_name.values() def GetUndefinedArtifacts(self): """Retrieves the names of undefined artifacts used by artifact groups. diff --git a/config/dpkg/changelog b/config/dpkg/changelog index 94cf0aa4..18a40d62 100644 --- a/config/dpkg/changelog +++ b/config/dpkg/changelog @@ -1,5 +1,5 @@ -artifacts (20240112-1) unstable; urgency=low +artifacts (20240114-1) unstable; urgency=low * Auto-generated - -- Forensic artifacts Fri, 12 Jan 2024 05:40:26 +0100 + -- Forensic artifacts Sun, 14 Jan 2024 05:32:14 +0100 diff --git a/docs/sources/background/Stats.md b/docs/sources/background/Stats.md index 4d50e54d..9b150ad0 100644 --- a/docs/sources/background/Stats.md +++ b/docs/sources/background/Stats.md @@ -4,7 +4,7 @@ The artifact definitions can be found in the [artifacts/data directory](https://github.com/ForensicArtifacts/artifacts/tree/main/artifacts/data) and the format is described in detail in the [Style Guide](https://artifacts.readthedocs.io/en/latest/sources/Format-specification.html). -Status of the repository as of 2024-01-12 +Status of the repository as of 2024-01-14 Description | Number --- | --- diff --git a/setup.cfg b/setup.cfg index 03c6c394..77098042 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = artifacts -version = 20240112 +version = 20240114 description = ForensicArtifacts.com Artifact Repository. long_description = A free, community-sourced, machine-readable knowledge base of forensic artifacts that the world can use both as an information source and within other tools. long_description_content_type = text/plain diff --git a/tests/registry_test.py b/tests/registry_test.py index 008ff57d..0d0735b8 100644 --- a/tests/registry_test.py +++ b/tests/registry_test.py @@ -59,7 +59,8 @@ def testArtifactDefinitionsRegistry(self): artifact_registry.RegisterDefinition(artifact_definition) # Make sure the test file got turned into artifacts. - self.assertEqual(len(artifact_registry.GetDefinitions()), 7) + definitions = list(artifact_registry.GetDefinitions()) + self.assertEqual(len(definitions), 7) artifact_definition = artifact_registry.GetDefinitionByName('EventLogs') self.assertIsNotNone(artifact_definition) @@ -75,7 +76,8 @@ def testArtifactDefinitionsRegistry(self): with self.assertRaises(KeyError): artifact_registry.DeregisterDefinition(artifact_definition) - self.assertEqual(len(artifact_registry.GetDefinitions()), 6) + definitions = list(artifact_registry.GetDefinitions()) + self.assertEqual(len(definitions), 6) test_artifact_definition = artifact_registry.GetDefinitionByName( 'SecurityEventLogEvtxFile')