slimm609 / checksec.sh

Checksec.sh

Home Page:https://slimm609.github.io/checksec.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return separated output option

huornlmj opened this issue · comments

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.

totally agree.

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

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

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