Skip to content

Instantly share code, notes, and snippets.

@hkoba
Last active August 29, 2015 13:58
Show Gist options
  • Save hkoba/10211938 to your computer and use it in GitHub Desktop.
Save hkoba/10211938 to your computer and use it in GitHub Desktop.
List all processes still using deleted libssl, in Zsh. (To fight against heartbleed and future vulnerability...)
#!/bin/zsh
typeset -A dup; dup=()
grep libssl /proc/*/maps|grep deleted|while read fn rest; do
pid=${${fn#/proc/}//\/*/}
((dup[$pid]++)) && continue
echo -n $pid " "; readlink /proc/$pid/exe
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment