Skip to content
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

Exiftool Output Modification (Remove Key Inclusion Requirements) #407

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

phutelmyer
Copy link
Contributor

@phutelmyer phutelmyer commented Oct 25, 2023

Describe the change

  • Refactored the ScanExiftool class in the Strelka scanner:
    • Removed the keys option as metadata filtering is no longer necessary.
    • Formatted metadata keys for searchability by converting spaces and slashes to underscores and converting to lowercase.
    • Enhanced error handling for subprocess and JSON decoding errors.
    • Converted array metadata values to comma-separated strings for uniformity in reporting.
    • Removing Keys from backend.yml as no longer needed (for now)

Describe testing procedures
Tested pytest locally. Built Strelka with all tests enabled.

Sample output

  "scan": {
    "exiftool": {
      "appversion": 16,
      "author": "Dream",
      "codepage": "Windows Cyrillic",
      "createdate": "2015:06:05 18:19:34",
      "directory": "/dev/shm",
      "elapsed": 0.187043,
      "exiftoolversion": 12.52,
      "fileaccessdate": "2023:08:16 17:25:07+00:00",
      "fileinodechangedate": "2023:08:16 17:25:07+00:00",
      "filemodifydate": "2023:08:16 17:25:07+00:00",
      "filename": "tmp3l7wya13",
      "filepermissions": "-rw-------",
      "filesize": "87 kB",
      "filetype": "XLS",
      "filetypeextension": "xls",
      "headingpairs": "Листы, 4, Макросы Excel 4.0, 1, Именованные диапазоны, 2",
      "hyperlinkschanged": "No",
      "lastmodifiedby": "Dream",
      "linksuptodate": "No",
      "mimetype": "application/vnd.ms-excel",
      "modifydate": "2022:05:18 16:43:45",
      "scalecrop": "No",
      "security": "None",
      "shareddoc": "No",
      "software": "Microsoft Excel",
      "sourcefile": "/dev/shm/tmp3l7wya13",
      "titleofparts": "Sheet, VVBR1, VVBR2, VVBR3, OEOGAJPGJPAG, FHJ64, OI89"
    },

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer merged commit dd02a69 into master Oct 25, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant