Conversation
# Conflicts: # dissect/target/plugins/filesystem/ini.py # tests/plugins/filesystem/test_ini.py
There was a problem hiding this comment.
Pull request overview
This PR adds a new filesystem plugin (ini) that discovers .ini files under a target path and emits structured records for each section/key/value, with tests and fixture data to validate directory scanning, explicit file parsing, and UTF-16 parsing.
Changes:
- Added
IniPluginto scan for.inifiles and parse them intoIniRecordkey/value records. - Added pytest coverage for directory discovery, explicit file parsing, and UTF-16 encoded INI parsing.
- Added
.ini/fixture files undertests/_data/plugins/filesystem/ini(via Git LFS pointers).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
dissect/target/plugins/filesystem/ini.py |
New INI filesystem plugin, record descriptor, and UTF-16 fallback parsing logic. |
tests/plugins/filesystem/test_ini.py |
New tests validating discovery + parsing behavior (including UTF-16). |
tests/_data/plugins/filesystem/ini/startup.ini |
Test fixture INI content (Git LFS pointer). |
tests/_data/plugins/filesystem/ini/shutdown.ini |
Test fixture INI content (Git LFS pointer). |
tests/_data/plugins/filesystem/ini/utf16.ini |
UTF-16 test fixture INI content (Git LFS pointer). |
tests/_data/plugins/filesystem/ini/not_ini.txt |
Non-INI file fixture to validate filtering (Git LFS pointer). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from dissect.target.helpers.fsutil import TargetPath | ||
|
|
||
| IniRecord = TargetRecordDescriptor( | ||
| "filesystem/iniFileRecord", |
There was a problem hiding this comment.
The record name filesystem/iniFileRecord is inconsistent with the existing record naming convention in this repo (typically lowercase path segments, e.g. filesystem/entry, filesystem/yara/match). Consider renaming this to a lowercase, slash-delimited name to keep record type names consistent for downstream consumers.
| "filesystem/iniFileRecord", | |
| "filesystem/ini/entry", |
There was a problem hiding this comment.
dont agree as this name is too generic
|
@DanielErb thank you for your contribution! As this is your first code contribution, please read the following Contributor License Agreement (CLA). If you agree with the CLA, please reply with the following information:
Contributor License Agreement
Contribution License AgreementThis Contribution License Agreement ("Agreement") governs your Contribution(s) (as defined below) and conveys certain license rights to Fox-IT B.V. ("Fox-IT") for your Contribution(s) to Fox-IT"s open source Dissect project. This Agreement covers any and all Contributions that you ("You" or "Your"), now or in the future, Submit (as defined below) to this project. This Agreement is between Fox-IT B.V. and You and takes effect when you click an “I Accept” button, check box presented with these terms, otherwise accept these terms or, if earlier, when You Submit a Contribution.
|
|
@DissectBot agree [company=""] |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
his PR introduces the
iniplugin, a tool designed to scan target filesystems for.inifiles and parse them into structured records.