Files
entropy/misc/entropy_hwgen.sh
2014-05-05 18:35:48 +01:00

10 lines
335 B
Bash
Executable File

#!/bin/sh
# Entropy Hardware hash generator
[ -x "/usr/bin/awk" ] || exit 1
[ -x "/usr/sbin/lspci" ] || exit 1
ifconfig_output=$(ifconfig -a | grep HWaddr | awk '{ print $5 }' 2> /dev/null)
lspci_output=$(/usr/sbin/lspci -n | cut -d" " -f 3- 2> /dev/null)
echo $ifconfig_output$lspci_output | sha256sum | cut -d" " -f 1 2> /dev/null