Code: Select all
wget http://www.xchris.net/download.php?file=files/md5check.tar.gz -O md5check.tar.gz
http://www.xchris.net/download.php?file ... eck.tar.gz
------------------
Cosa fa Md5Check?
Specificato un pacchetto (in realta' un pattern che matchera' alla meglio) riporta quali file sono cambiati e quali no ed eventualemte riporta l'md5 per ogni file.
OK..A cosa serve?
Penso che qualche esempio sia meglio:
-Quali file STANDARD ho cambiato nel mio firweall shorewall?
Code: Select all
root@lyra md5check # ./md5check shorewall
* net-firewall/shorewall-2.0.4
-Changed- /etc/shorewall/masq
--NOT FOUND /usr/share/doc/shorewall-2.0.4/releasenotes.txt.gz
-Changed- /etc/shorewall/zones
-Changed- /etc/shorewall/shorewall.conf
-Changed- /etc/shorewall/policy
-Changed- /etc/shorewall/interfaces
-Changed- /etc/shorewall/rules
supponiamo ora che vogliamo restringere il controllo su /etc
Code: Select all
root@lyra md5check # ./md5check shorewall /etc
* net-firewall/shorewall-2.0.4
-Changed- /etc/shorewall/masq
-Changed- /etc/shorewall/zones
-Changed- /etc/shorewall/shorewall.conf
-Changed- /etc/shorewall/policy
-Changed- /etc/shorewall/interfaces
-Changed- /etc/shorewall/rules
Avremo pero' + dettagli!
Code: Select all
* mail-filter/dspam-3.2.2
--NOT FOUND /usr/share/doc/dspam-3.2.2/README.qmail.gz
--NOT FOUND /usr/share/doc/dspam-3.2.2/CHANGELOG.gz
Unchanged /usr/bin/dspam_admin
Unchanged /usr/include/dspam/libdspam.h
Unchanged /usr/share/man/man1/dspam_merge.1.gz
Unchanged /usr/include/dspam/storage_driver.h
Unchanged /var/log/dspam/.keep
Unchanged /usr/share/man/man1/dspam_dump.1.gz
Unchanged /usr/share/man/man1/dspam_corpus.1.gz
Unchanged /usr/bin/dspam_corpus
Unchanged /usr/share/man/man1/dspam.1.gz
Unchanged /usr/share/man/man3/libdspam.3.gz
Unchanged /etc/logrotate.d/dspam
Unchanged /usr/bin/dspam_genaliases
Unchanged /usr/bin/dspam_merge
Unchanged /usr/include/dspam/libdspam_objects.h
Unchanged /usr/lib/libdspam.a
Unchanged /etc/mail/dspam/.keep
Unchanged /usr/lib/libdspam.so.6.0.0
Unchanged /usr/include/dspam/buffer.h
Unchanged /usr/include/dspam/decode.h
Unchanged /usr/lib/pkgconfig/dspam.pc
Unchanged /usr/include/dspam/config.h
--NOT FOUND /usr/share/doc/dspam-3.2.2/RELEASE.NOTES.gz
Unchanged /etc/env.d/40dspam
Unchanged /usr/bin/dspam_crc
Unchanged /usr/include/dspam/nodetree.h
--NOT FOUND /usr/share/doc/dspam-3.2.2/README.postfix.gz
Unchanged /etc/cron.daily/.keep
-Changed- /etc/mail/dspam/dspam.conf
Unchanged /var/spool/dspam/.keep
Unchanged /usr/share/man/man1/dspam_clean.1.gz
Unchanged /usr/include/dspam/lht.h
Unchanged /etc/logrotate.d/.keep
Unchanged /etc/cron.daily/dspam.cron
Unchanged /usr/include/dspam/tbt.h
Unchanged /usr/lib/libdspam.la
Unchanged /usr/bin/dspam_2sql
--NOT FOUND /usr/share/doc/dspam-3.2.2/LICENSE.gz
Unchanged /usr/bin/dspam
Unchanged /usr/include/dspam/error.h
Unchanged /usr/bin/dspam_clean
--NOT FOUND /usr/share/doc/dspam-3.2.2/README.gz
Unchanged /usr/bin/dspam_stats
Unchanged /usr/share/man/man1/dspam_stats.1.gz
Unchanged /usr/bin/dspam_dump
quali file dovrebbe contenere il pacchetto,quali mancano,quali sono stati modificati.
-Potrebbe essere anche visto come un tripwire dei poveri
-Puo essere utilizzato per vedere se un crash di sistema ha provocato problemi su pkg vitali!! (magari su glibc)
-puo' essere utilizzato come un etc-purger PRIMA di rimuovere un pacchetto con delle semplici regexp (sapendo eventualemente quali file salvare..)
-costituisce un ottima base per un etc-update avanzato (che magari implementero' presto...perche' mi sono un po' rotto di quello attuale)
Conclusioni:
Usatelo come preferite
Allo stato dei fatti Overlappa un po' con checkintegrity...magari in futuro li posso fondere. (anche perche' usano routine simili)
Se qc ha voglia e tempo di provarlo,riporti le impressioni
Grazie
ciao





