summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hook/randommac15
-rw-r--r--install/randommac13
2 files changed, 28 insertions, 0 deletions
diff --git a/hook/randommac b/hook/randommac
new file mode 100644
index 0000000..b6bddc3
--- /dev/null
+++ b/hook/randommac
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+run_hook() {
+ if [[ "${randommac}" == "y" ]]; then
+ if [[ -n "${ip}" ]]; then
+ changemac="$(echo ${ip} | cut -d: -f6)"
+ fi
+ if [[ -z "${changemac}" ]]; then
+ changemac="eth0"
+ fi
+
+ msg ":: Initializing network interface ${changemac} with random mac address..."
+ macchanger -e ${changemac}
+ fi
+}
diff --git a/install/randommac b/install/randommac
new file mode 100644
index 0000000..98526d5
--- /dev/null
+++ b/install/randommac
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+build() {
+ add_runscript
+ add_binary macchanger
+ add_file /usr/share/macchanger/OUI.list
+ add_file /usr/share/macchanger/wireless.list
+}
+
+help() {
+ echo "This hook initilizes first network device with random mac"
+ echo "address from inside initramfs."
+}