slimm609 / checksec

Checksec
https://slimm609.github.io/checksec
Other
2.05k stars 306 forks source link

Return separated output option #186

Closed huornlmj closed 5 months ago

huornlmj commented 3 years ago

It would be useful to have a return separated output / format option like so:

RELRO: Partial RELRO STACK CANARY: Canary found NX: NX enabled PIE: No PIE RPATH: No RPATH RUNPATH: No RUNPATH FILE: /bin/ls

One might want to simply share the output in a text field, email or IM but the default tab separated format clobbers coherency. The only other options are token separated and difficult for non-tech people to understand quickly.

tommyme commented 3 years ago

totally agree.

slimm609 commented 3 years ago

I would have to see that level of effort to implement that. under the current structure not sure it would be easy. Have you tried the json format? json shares well and can be easily expanded with tools like jq

Artoria2e5 commented 1 year ago

I mean, we could call ${CHK_FUNCTION} | ${FORMATTER} at the end instead to do the jq job, but it feels a bit too contrieved...

slimm609 commented 5 months ago

You need some type of structure to support more than 1 file, otherwise the separated output breaks down. In the upcoming 3.0 release, it will switch to golang and include yaml output which will be the closest thing to what you are looking for.

- checks:
    canary: Canary Found
    fortified: "0"
    fortify_source: N/A
    fortifyable: "0"
    nx: NX enabled
    pie: PIE Enabled
    relro: Partial RELRO
    rpath: No RPATH
    runpath: No RUNPATH
    symbols: No Symbols
  name: tests/binaries/output/all