On Friday 10 October 2003 03:52 pm, Andrew Gaffney wrote:
Due to a recent hack into my Slackware server, now my Gentoo server, I want to write a script that scans all binaries, or even all files, computes their MD5SUM, and compares it to what portage calculated it to be when it was installed. Does something already exist like this?
From man qpkg: -mc, --md5-check Verify package files md5 -c, --check Verify mtimes and md5.
I was looking for something that was a bit more verbose. If nothing exists that does what I want it to do, I'll just write a Perl script that grabs the MD5 from /var/db/pkg/*/*/CONTENTS and compares it to the actual file. I want to be able to see the name, mtime, old size, new size, etc. of the file that doesn't match. I'd run it as a cron job and have it email me. I run 'emerge sync > /dev/null; emerge -upDv world; emerge -uDf world' as a cron job once a day and have it email me the results.
-- Andrew Gaffney
-- [EMAIL PROTECTED] mailing list