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

more easily parsable summary output #15

Closed
Zugschlus opened this issue Mar 29, 2019 · 2 comments
Closed

more easily parsable summary output #15

Zugschlus opened this issue Mar 29, 2019 · 2 comments
Labels
moreinfo This issue can't be addressed until more information is provided by the submitter

Comments

@Zugschlus
Copy link

Hi,

when I want to check the SHA512 checksum of the generated database in a script, I need some ugliness like:

< output.aide awk '/^\/var\/lib\/aide\/aide\.db\.new$/,/^$/' | sed -n '/^[[:space:]]\+SHA512[[:space:]]\+: \(.*\)/{s//\1/;N;N;s/[[:space:]]\+//g;p;}'

or

< output.aide awk '/^\/var\/lib\/aide\/aide\.db\.new/{lastrec=1}lastrec==1 && $1=="SHA512"{sha512=1}sha512==1{a=a+1; if(a==1){printf $3}else if(a<=3){printf $1}}'

since the output of the summary database is like:

/var/lib/aide/aide.db.new
  MD5      : ujh8SuEtmmNqHoYVamNRgQ==
  SHA1     : Uo1hMTdnvy7vj5wxbIXmbBzPqEc=
  RMD160   : HvPp9Lz+CTTqIgJvxTWGjQ3bqz0=
  TIGER    : FhCXXdhFR0i6D/mhWJ6vlreCm1vkXY9w
  SHA256   : IK7yUtHmx+UZbVZo9ofrxBdthp7iUh6K
             zpPf9aC1X50=
  SHA512   : rrgb/cJ5YsQebiO6QlV4eLj+2nFFIVMw
             lFlSAbYFQYaET4xKfs6R7vKr/wk0FCLL
             MNIaMRe+8fSANsUJJb8Dpw==
  CRC32    : aNaXDw==
  HAVAL    : f5Ug7AzAvydwIcu2ZGwBdw7GDWKTYEkl
             dbkS2AzTC+g=
  GOST     : hXHrVy8eoZzjl/XQKeXw+5o2yPKCcJnG
             8A+NbCuAdtM=
  WHIRLPOOL: h3WmJ+lW/A31Z2b/BozVzV4Eu1DTLKTY
             C0lXY33qA1piAz/Nvxovu3nt8k1M9D+I
             EBHY878xKRM9bm+xbfGA2Q==

how about a config option like

meta_database_out=/path/to/dbfile

which actually writes out a one-line aide database containing the checksums of the newly generated file? That's much more easily parseable.

Greetings
Marc

@hvhaugwitz hvhaugwitz transferred this issue from aide/aide.github.io Mar 30, 2019
@hvhaugwitz
Copy link
Member

hvhaugwitz commented Apr 9, 2019

I plan to rewrite log/report handling in the next AIDE release (see #18, #19, #21). You should be able then to specify a separate log file in JSON format containing the database attributes.

Please check if this would satisfy your future request. If so please consider to close this issue in favour of the referenced ones.

@hvhaugwitz hvhaugwitz added the moreinfo This issue can't be addressed until more information is provided by the submitter label Jun 9, 2019
@Zugschlus
Copy link
Author

I have gotten used to the ugliness and if necessary one can pull a JSON report from aide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moreinfo This issue can't be addressed until more information is provided by the submitter
Projects
None yet
Development

No branches or pull requests

2 participants