Skip to content

crit: parse data fields in files.img #144

@rst0git

Description

@rst0git

The Go version of CRIT currently outputs raw data decoded from files.img. However, it would be more user-friendly if we map constants used in certain fields to human readable strings and decode the value used for IP address. The following example shows a comparison between the output of the Go and Python versions of CRIT:

  • Go version of CRIT
        {
            "type": "INETSK",
            "id": 36,
            "isk": {
                "id": 36,
                "ino": 106886,
                "family": 2,
                "type": 1,
                "proto": 6,
                "state": 7,
                "srcPort": 0,
                "dstPort": 0,
                "flags": 2,
                "backlog": 0,
                "srcAddr": [
                    0
                ],
                "dstAddr": [
                    0 
                ],
                "fown": {
                    "uid": 0,
                    "euid": 0,
                    "signum": 0,
                    "pidType": 0,
                    "pid": 0
                },
  • Python version of CRIT
        {
            "type": "INETSK",
            "id": 36,
            "isk": {
                "id": 36,
                "ino": 106886,
                "family": "INET",
                "type": "STREAM",
                "proto": "TCP",
                "state": "CLOSE",
                "src_port": 0,
                "dst_port": 0,
                "flags": "0x2",
                "backlog": 0,
                "src_addr": [
                    "0.0.0.0"
                ],
                "dst_addr": [
                    "0.0.0.0"
                ],
                "fown": {
                    "uid": 0,
                    "euid": 0,
                    "signum": 0,
                    "pid_type": 0,
                    "pid": 0
                },

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