aboutsummaryrefslogtreecommitdiff
path: root/identify
diff options
context:
space:
mode:
authorn0p <0x90@n0p.cc>2018-02-12 18:15:36 +0100
committern0p <0x90@n0p.cc>2018-02-12 18:15:36 +0100
commit9e9c6d4bcfabadc1ad139ad5a81083485c2212d7 (patch)
tree492a41b8ced99e5f8bb62148267e2a23615cfe4c /identify
parenta608d88b12dc300584be4e36e6eb85f26e2c42b5 (diff)
downloadlibc-database-9e9c6d4bcfabadc1ad139ad5a81083485c2212d7.tar.gz
libc-database-9e9c6d4bcfabadc1ad139ad5a81083485c2212d7.zip
Added support for Debian and ARM (armel, armhf, arm64).HEADmaster
Removed the unused tmp/ directory. Output format of dump/find/identify has changed. The folder structure of the database has changed.
Diffstat (limited to 'identify')
-rwxr-xr-xidentify10
1 files changed, 7 insertions, 3 deletions
diff --git a/identify b/identify
index 2e96fd9..6d603cf 100755
--- a/identify
+++ b/identify
@@ -3,6 +3,10 @@ if [[ $# != 1 ]]; then
echo >&2 "Usage: $0 path/to/libc.so"
exit 2
fi
-libc=$1
-sha1=`sha1sum $libc | awk '{print $1}'`
-sha1sum db/*.so | grep "$sha1 " | perl -n -e '/db\/(.*)\.so/&&print "id $1\n"'
+
+. common/libc.sh
+
+[[ -e $1 ]] || exit
+sha256=`sha256sum $1`
+check_sha256 $sha256 || exit
+echo "No SHA-256 match found in the database"