Skip to content

Instantly share code, notes, and snippets.

@rdeavila
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdeavila/10649656 to your computer and use it in GitHub Desktop.
Save rdeavila/10649656 to your computer and use it in GitHub Desktop.
Heartbleed: ver quais programas usam a biblioteca OpenSSL, e a sua versão.
#!/bin/bash
# Lê os arquivos abertos, e procura por programas que estejam usando
# a biblioteca do OpenSSL.
sudo lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | grep libssl | sort -u
# Depois de atualizar, o comando abaixo mostra os serviços que precisam ser
# reiniciados. Enquanto não reiniciar, eles ainda usarão a versão antiga:
sudo find /proc -maxdepth 2 -name maps -exec grep -HE '/libssl\.so.* \(deleted\)' {} \; | cut -d/ -f3 | sort -u | xargs --no-run-if-empty ps uwwp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment