summaryrefslogtreecommitdiffstats
path: root/usr/lib/autowifi/plugins/11belkin_wps
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2013-06-26 13:09:44 +0200
committermakefu <root@pigstarter.de>2013-06-26 13:09:44 +0200
commit11d994c0a822f83b311ce9a63d1f3dc3c29c7039 (patch)
treeb39cd8edbec59e637a97c2a7ef5b8daf9fed88e5 /usr/lib/autowifi/plugins/11belkin_wps
parenta77e5646569584ab6953c6683e1490791acc32a4 (diff)
refactor vendor matcher
Diffstat (limited to 'usr/lib/autowifi/plugins/11belkin_wps')
-rwxr-xr-xusr/lib/autowifi/plugins/11belkin_wps9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr/lib/autowifi/plugins/11belkin_wps b/usr/lib/autowifi/plugins/11belkin_wps
index 82140523..65e08624 100755
--- a/usr/lib/autowifi/plugins/11belkin_wps
+++ b/usr/lib/autowifi/plugins/11belkin_wps
@@ -15,13 +15,8 @@ cd $(dirname $(readlink -f $0))
. ../lib/wps
parse_plugin_args "$@"
-MAC=$(printf "%s" $MAC| sed 's/://g')
-VENDOR_MAC=${MAC:0:6}
-PRIVATE_MAC=${MAC:6:12}
-if ! [ $VENDOR_MAC == "002275" -o $VENDOR_MAC == "001CDF" -o $VENDOR_MAC == "09863B" ] ;then
- echo "VENDOR MAC $VENDOR_MAC not affected"
- exit 1
-fi
+
+! check_vendor_mac "$VENDOR_MAC" 002275 001CDF 09863B && echo "VENDOR MAC $VENDOR_MAC not affected" && exit 1
calc_belkin(){
PRIVATE_MAC=${1}