Skip to content

Invalid JSON produced when combining extraction and Matryoshka on 3.1.0 #867

@danielskowronski

Description

@danielskowronski

On latest released version (3.1.0), when combining extraction (-e) and Matryoshka (-M) the log output is invalid JSON.

The issue seems to be only present when -eM is combined alone or with other flags. Omitting any of -e and -M makes the issue go away.

This issue was fixed in current unreleased master (most likely in f10e5a4), so this is more FYI for other users until newer version is released and request to maintainers to actually release 6 months old patch.

Example log produced from binwalk -eM 7z.bin -l 7z.bin.log. Source file comes from this repo and was tested against all other example files on macOS and Linux.

[
{
  "Analysis": {
    "file_path": "/Users/daniel/tmp/binwalk/inputs/extractions/7z.bin",
    "file_map": [
      {
        "offset": 0,
        "id": "06134db0-8400-445f-9ed9-e55b427d32de",
        "size": 218,
        "name": "7zip",
        "confidence": 250,
        "description": "7-zip archive data, version 0.4, total size: 218 bytes",
        "always_display": false,
        "extraction_declined": false
      }
    ],
    "extractions": {
      "06134db0-8400-445f-9ed9-e55b427d32de": {
        "size": null,
        "success": true,
        "extractor": "7z",
        "do_not_recurse": false,
        "output_directory": "/Users/daniel/tmp/binwalk/inputs/extractions/7z.bin.extracted/0"
      }
    }
  }
}
],
{
  "Analysis": {
    "file_path": "/Users/daniel/tmp/binwalk/inputs/extractions/7z.bin.extracted/0/lsb-release",
    "file_map": [],
    "extractions": {}
  }
}
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions