diff options
Diffstat (limited to 'usr/lib/autowifi/plugins/30default_wps')
-rwxr-xr-x | usr/lib/autowifi/plugins/30default_wps | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/lib/autowifi/plugins/30default_wps b/usr/lib/autowifi/plugins/30default_wps index 98be6a66..7f66d117 100755 --- a/usr/lib/autowifi/plugins/30default_wps +++ b/usr/lib/autowifi/plugins/30default_wps @@ -3,4 +3,15 @@ # http://www.wotan.cc/?p=75 cd $(dirname $(readlink -f $0)) . ../lib/wps -try_wps_pin "$@" 12345670 +. ../lib/plugin_core + +parse_plugin_args "$@" +DEFAULT_PIN="${DEFAULT_PIN:-12345670}" + +if has_wps "$ENC"; then + echo "trying PIN $DEFAULT_PIN against $ESSID" >&2 + try_wps_pin "$@" $DEFAULT_PIN +else + echo "Network $ESSID not WPS enabled" >&2 + exit 1 +fi |