Advertisement
Guest User

jgaliana

a guest
Apr 20th, 2010
3,519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #basado en procy.pl www.securitybydefault.com  - http://pastebin.com/f6bc170c
  2. #adaptado a Debian GNU/Linux por Juan Galiana Lara - @jgaliana - http://juangaliana.blogspot.com
  3.  
  4. for i in `ps ax -o pid --no-headers`; do
  5.         if [[ ! -e /proc/$i/exe ]]; then continue; fi
  6.         binary=`ls -l /proc/$i/exe|awk -F "-> |-> " '{print \$2}'|cut -d ' ' -f1`
  7.         pkg=`dpkg -S $binary 2>/dev/null|cut -d ':' -f1`
  8.         if [ $pkg ]; then
  9.  
  10.                 debverify=`debsums -s $pkg 2>&1`
  11.                 if [[ $? -ne 0 ]];  then
  12.                         echo -n "El proceso [ $i $binary ] ha sufrido modificaciones en su paquete base ($pkg): "
  13.                         echo -e "`debsums $pkg|grep -v OK$`\n"
  14.                 fi
  15.         else
  16.                 echo -e "El proceso [ $i $binary ] no pertenece a ningún paquete\n"
  17.         fi
  18. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement