resecure was created out of the need for a program to re-chmod and chflag literally hundreds of files after system upgrades. This program was created on OpenBSD and NetBSD, your mileage may (and will) vary on other operating systems.
cf268a40cda3c253f74847e77badba0f59b3062ca9c016564d1266b4e2b47c2f