Skip to content

Instantly share code, notes, and snippets.

@hyakuhei
Created January 28, 2015 11:30
Show Gist options
  • Save hyakuhei/a5898fa0299f1eb5f902 to your computer and use it in GitHub Desktop.
Save hyakuhei/a5898fa0299f1eb5f902 to your computer and use it in GitHub Desktop.
Simple script to find all statically compiled binaries that appear to use glibc
#!/bin/bash
find / -type f -executable -exec file {} \; | grep statically | cut -d ':' -f 1 > search.txt
for fn in `cat search.txt`; do
if grep --quiet 'glibc' $fn; then
echo $fn is statically linked and uses GLibc
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment