summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2013-06-26 13:11:59 +0200
committermakefu <root@pigstarter.de>2013-06-26 13:11:59 +0200
commitb72b8a29dcfaf22554ebcf7d5e19bc7f28f49862 (patch)
tree6965f6066f82846e2bf2b97e06e5e905a168b23b /usr
parent11d994c0a822f83b311ce9a63d1f3dc3c29c7039 (diff)
add alicebox default wpa key generator
Diffstat (limited to 'usr')
-rwxr-xr-xusr/lib/autowifi/plugins/02alice20
1 files changed, 20 insertions, 0 deletions
diff --git a/usr/lib/autowifi/plugins/02alice b/usr/lib/autowifi/plugins/02alice
new file mode 100755
index 00000000..1b4533a4
--- /dev/null
+++ b/usr/lib/autowifi/plugins/02alice
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Implementation of Alicebox 1121 /Siemens S1621-Z220-A Default Password Algorithm:
+# Based on Poc from
+# http://www.wardriving-forum.de/forum/f275/standard-wlanpassw%F6rter-von-alice-boxen-70287.html
+#
+#
+# ESSID MAC CHANNEL ENCRYPTION
+
+cd $(dirname $(readlink -f $0))
+. ../lib/plugin_core
+
+parse_plugin_args "$@"
+
+! check_vendor_mac $VENDOR_MAC "00255E" && echo "$VENDOR_MAC not affected" && exit 1
+
+# printf always makes string to lower, need that for correct md5sum
+ETHMAC=$( printf "%012x" $((0x${MAC}-1)) )
+TMP=$(printf $ETHMAC | md5sum)
+printf ${TMP:0:12} | base64
+exit 0