Fixed macchanger setup

pull/5/head
xSmurf 9 years ago
parent d525c19c62
commit ee2073d315

@ -1,5 +0,0 @@
#!/bin/sh
if [ "$IFACE" != "lo" ]; then
/usr/bin/macchanger --bia -a "$IFACE"
fi

@ -1,3 +1,12 @@
#!/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

Loading…
Cancel
Save