Skip to content

Instantly share code, notes, and snippets.

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 stevenwilliamson/44f1d4554e530a129115 to your computer and use it in GitHub Desktop.
Save stevenwilliamson/44f1d4554e530a129115 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Quick and dirty script to find binaries that link to a specific lib
#
LIB=libcrypt
for f in $(find / -perm /111 -type f -print); do
file $f | grep -E "ELF.*dynamically" > /dev/null
if [ $? -eq "0" ]; then
ldd $f | grep $LIB > /dev/null
if [ $? -eq "0" ]; then
echo $f
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment