Skip to content

Commit

Permalink
fix InstallDate regf parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
JSCU-CNI committed Oct 23, 2024
1 parent 3a3a769 commit ae15c0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dissect/target/plugins/os/windows/regf/applications.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import datetime
from typing import Iterator

from dissect.target.exceptions import UnsupportedPluginError
Expand Down Expand Up @@ -45,10 +46,14 @@ def applications(self) -> Iterator[WindowsApplicationRecord]:
for uninstall in self.keys:
for app in uninstall.subkeys():
values = {value.name: value.value for value in app.values()}
install_date = None

if install_date := values.get("InstallDate"):
install_date = datetime.strptime(install_date, "%Y%m%d")

yield WindowsApplicationRecord(
ts_modified=app.ts,
ts_installed=values.get("InstallDate"),
ts_installed=install_date,
name=values.get("DisplayName") or app.name,
version=values.get("DisplayVersion"),
author=values.get("Publisher"),
Expand Down

0 comments on commit ae15c0a

Please sign in to comment.