You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
361 B

#!/bin/sh
find /sys -name modalias | xargs sort -u | xargs modprobe -a 2> /dev/null
for devfile in /sys/class/net/*; do
if [ $(echo $devfile | grep -E '^\/.+\/(eth|wlan)[0-9]+$') ]; then
if [ "$(cat $devfile/operstate)" = "down" ]; then
echo "Spoofing MAC address for: ${devfile##*/}"
/usr/bin/macchanger --bia --another ${devfile##*/}
fi
fi
done