diff options
author | makefu <github@syntax-fehler.de> | 2013-02-23 15:55:49 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-02-23 15:55:49 +0100 |
commit | 001bfd5f2b6890cafd209de4ea360927d4dd8a55 (patch) | |
tree | ff5805c808afc2fbe460f767f65ae1152fb32776 /minikrebs/profiles/heckenkrebs/customfiles/usr/bin/easybox_keygen | |
parent | 1ca9360f5a35d0c2ee5876bba85f2ead44e5a540 (diff) |
minikrebs is now a submodule
Diffstat (limited to 'minikrebs/profiles/heckenkrebs/customfiles/usr/bin/easybox_keygen')
m--------- | minikrebs | 0 | ||||
-rwxr-xr-x | minikrebs/profiles/heckenkrebs/customfiles/usr/bin/easybox_keygen | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/minikrebs b/minikrebs new file mode 160000 +Subproject 8fd46a7e3258bff753c42dc43fecfbbc853a685 diff --git a/minikrebs/profiles/heckenkrebs/customfiles/usr/bin/easybox_keygen b/minikrebs/profiles/heckenkrebs/customfiles/usr/bin/easybox_keygen deleted file mode 100755 index e9a9beca..00000000 --- a/minikrebs/profiles/heckenkrebs/customfiles/usr/bin/easybox_keygen +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# easybox_keygen.sh (c) 2012 GPLv3 -# -# www.wotan.cc -# - -MAC=$1 - -# Take the last 2 Bytes of the MAC-Address (0B:EC), and convert it to decimal. - -take5=${MAC:12} -last4=${take5/:/} - -# Fill up to 4 places with zeros, if necessary: -deci=$(printf "%04d" "0x$last4" | sed 's/.*\(....\)/\1/;s/./& /g') -#echo M4: ${deci[@]} -# -# The digits M9 to M12 are just the last digits (9.-12.) of the MAC: -hexi=$(echo ${MAC:12:5} | sed 's/://;s/./& /g') -#echo 'M4 (Hex): ' ${hexi[@]} -# K1 = last byte of (d0 + d1 + h2 + h3) -# K2 = last byte of (h0 + h1 + d2 + d3) -c1=$(printf "%d + %d + %d + %d" ${deci:0:1} ${deci:2:1} 0x${hexi:4:1} 0x${hexi:6:1}) -c2=$(printf "%d + %d + %d + %d" 0x${hexi:0:1} 0x${hexi:2:1} ${deci:4:1} ${deci:6:1}) -K1=$((($c1)%16)) -K2=$((($c2)%16)) -#printf "K1: %x\n" $K1 -#printf "K2: %x\n" $K2 -X1=$((K1^${deci:6:1})) -X2=$((K1^${deci:4:1})) -X3=$((K1^${deci:2:1})) -Y1=$((K2^0x${hexi:2:1})) -Y2=$((K2^0x${hexi:4:1})) -Y3=$((K2^0x${hexi:6:1})) -Z1=$((0x${hexi:4:1}^${deci:6:1})) -Z2=$((0x${hexi:6:1}^${deci:4:1})) -Z3=$((K1^K2)) -printf "%x%x%x%x%x%x%x%x%x\n" $X1 $Y1 $Z1 $X2 $Y2 $Z2 $X3 $Y3 $Z3 | tr a-f A-F - |