working on it ...

Filters

Explore Public Snippets

Sort by

Found 62 snippets matching: wpa_supplicant

    public by emsity  1898  2  6  0

    wpa_supplicant configuration

    Raspberry Pi wpa_supplicant.conf file
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    
    
    network={
    	ssid="*********"
    	psk="**********"
    	proto=RSN
    	key_mgmt=WPA-PSK
    	pairwise=TKIP
    	auth_alg=OPEN
    }

    external by Alex Ignatov  68  0  1  0

    Easily connect to WiFi network with just wpa_supplicant and Gentoo.

    Easily connect to WiFi network with just wpa_supplicant and Gentoo.: wifi_select.sh
    #!/bin/bash
    iface='wlan0'
    conf='/etc/wpa_supplicant/wpa_supplicant.conf'
    
    fail() {
    	echo "Fuck you! $@"
    	exit 1
    }
    
    declare -a a
    declare -A keytype
    while read s; do
    	eval "$s"
    	[ -n "$ESSID" ] && {
    		keytype[$ESSID]="$key"	# TODO: key type - wep/wpa/wpa2/wtfelse
    		comment="$qual, key: $key"
    		grep "^\s*ssid=\"$ESSID\"" "$conf" 2>&1 >/dev/null && comment="$comment *"
    		a[${#a[@]}]="$ESSID"
    		a[${#a[@]}]="$comment"
    		unset ESSID
    	}
    done < <( iwlist $iface scan | sed -rn 's#^[^#]*(ESSID|key):"?([^"]*)"?.*$#\1="\2"#p; s#^\s*Quality=(\S*).*#qual=\1#p' )
    exec 3>&1
    ESSID=$(dialog --menu "Choose network" 20 80 15 "${a[@]}" 2>&1 1>&3) || fail
    [ -n "$ESSID" ] || fail
    if [[ "${keytype[$ESSID]}" == "on" ]]; then
    	passphrase=$(dialog --passwordbox "Enter password for $ESSID" 20 80 2>&1 1>&3)
    	res=$(wpa_passphrase "$ESSID" "$passphrase") || fail "$res"
    else
    	res="
    network={
    	ssid=\"$ESSID\"
    	key_mgmt=NONE
    }
    "
    fi
    echo "$res"
    echo "$res" >> "$conf"
    killall -HUP wpa_supplicant || /etc/init.d/net.$iface restart
    
    
    

    external by bogdanr  22  0  1  0

    wpa_supplicant corporate cfgs

    wpa_supplicant corporate cfgs: gistfile1.txt
    ctrl_interface=/var/run/wpa_supplicant
    update_config=1
    
    network={
       ssid="Corporate_wifi"
       key_mgmt=WPA-EAP
       eap=TLS
       identity="bogdan.radulescu"
       ca_cert="/home/bogdan/stuff/ca.pem"
       client_cert="/home/bogdan/stuff/client.pem"
       private_key="/home/bogdan/stuff/key_encrypted.pem"
       private_key_passwd="654321"
    }
    
    ____________________________________________-
    
    
    ap_scan=0
    ctrl_interface=/var/run/wpa_supplicant
    eapol_version=1
    fast_reauth=0
    network={
           key_mgmt=IEEE8021X
           eap=PEAP
           phase1="peaplabel=1"
           phase2="auth=MSCHAPV2"
           identity="bogdan.radulescu"
           password="654321"
    }
    
    

    external by Brendon-Egolf  22  0  1  0

    simple bash script to connect to wifi through wpa_supplicant, wpa_passphrase must be run beforehand

    simple bash script to connect to wifi through wpa_supplicant, wpa_passphrase must be run beforehand: wifi.sh
    #!/bin/bash
    kill $(ps -e |grep wpa |grep -oP '\d{3,}')
    wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
    dhclient wlan0 -v
    ping 8.8.8.8 -c 3
    
    

    external by DigitalBrains1  605  0  3  0

    Sailfish wpa_supplicant revert commit 51e3eaf: specfile patch

    Sailfish wpa_supplicant revert commit 51e3eaf: specfile patch: wpa_supplicant.spec.patch
    --- wpa_supplicant.spec.orig    2014-04-09 02:27:47.000000000 +0200
    +++ wpa_supplicant.spec 2014-04-11 22:17:01.073543498 +0200
    @@ -20,6 +20,7 @@
     Patch4:     wpa_supplicant-openssl-more-algs.patch
     Patch5:     wpa_supplicant-gui-qt4.patch
     Patch6:     libnl3-includes.patch
    +Patch7:     wpa_supplicant-dont-fail-client-cert.patch
     BuildRequires:  pkgconfig(libnl-3.0)
     BuildRequires:  pkgconfig(dbus-1)
     BuildRequires:  pkgconfig(openssl)
    @@ -73,6 +74,8 @@
     %patch5 -p1
     # libnl3-includes.patch
     %patch6 -p1
    +# wpa_supplicant-dont-fail-client-cert.patch
    +%patch7 -p2
     
     %build
     pushd wpa_supplicant
    @@ -179,6 +182,8 @@
     %{_libdir}/libeap.so.0*
     
     %changelog
    +* Fri Apr 11 2014 Peter Lebbing <peter@digitalbrains.com> - 2.1
    +- Fix server certificates not getting accepted if they have client EKU set
     * Thu Mar 13 2014 Marko Saukko <marko.saukko@gmail.com> - 2.1
     - [packaging] Update to version 2.1 of wpa_supplicant.
     * Sun Oct  6 2013 Marko Saukko <marko.saukko@gmail.com> - 2.0-2
    
    
    

    external by DigitalBrains1  264  3  3  0

    Sailfish wpa_supplicant revert commit 51e3eaf: patch

    Sailfish wpa_supplicant revert commit 51e3eaf: patch: wpa_supplicant-dont-fail-client-cert.patch
    diff -Npru wpa_supplicant-2.1.orig/hostap/src/crypto/tls.h wpa_supplicant-2.1/hostap/src/crypto/tls.h
    --- wpa_supplicant-2.1.orig/hostap/src/crypto/tls.h     2014-03-13 08:53:26.000000000 +0100
    +++ wpa_supplicant-2.1/hostap/src/crypto/tls.h  2014-04-11 21:50:52.159397490 +0200
    @@ -41,8 +41,7 @@ enum tls_fail_reason {
            TLS_FAIL_ALTSUBJECT_MISMATCH = 6,
            TLS_FAIL_BAD_CERTIFICATE = 7,
            TLS_FAIL_SERVER_CHAIN_PROBE = 8,
    -       TLS_FAIL_DOMAIN_SUFFIX_MISMATCH = 9,
    -       TLS_FAIL_SERVER_USED_CLIENT_CERT = 10
    +       TLS_FAIL_DOMAIN_SUFFIX_MISMATCH = 9
     };
     
     union tls_event_data {
    diff -Npru wpa_supplicant-2.1.orig/hostap/src/crypto/tls_openssl.c wpa_supplicant-2.1/hostap/src/crypto/tls_openssl.c
    --- wpa_supplicant-2.1.orig/hostap/src/crypto/tls_openssl.c     2014-04-11 21:44:13.163639000 +0200
    +++ wpa_supplicant-2.1/hostap/src/crypto/tls_openssl.c  2014-04-11 21:50:52.179418854 +0200
    @@ -105,7 +105,6 @@ struct tls_connection {
            unsigned int ca_cert_verify:1;
            unsigned int cert_probe:1;
            unsigned int server_cert_only:1;
    -       unsigned int server:1;
     
            u8 srv_cert_hash[32];
     
    @@ -1482,16 +1481,6 @@ static int tls_verify_cb(int preverify_o
                                           TLS_FAIL_SERVER_CHAIN_PROBE);
            }
     
    -       if (!conn->server && err_cert && preverify_ok && depth == 0 &&
    -           (err_cert->ex_flags & EXFLAG_XKUSAGE) &&
    -           (err_cert->ex_xkusage & XKU_SSL_CLIENT)) {
    -               wpa_printf(MSG_WARNING, "TLS: Server used client certificate");
    -               openssl_tls_fail_event(conn, err_cert, err, depth, buf,
    -                                      "Server used client certificate",
    -                                      TLS_FAIL_SERVER_USED_CLIENT_CERT);
    -               preverify_ok = 0;
    -       }
    -
            if (preverify_ok && context->event_cb != NULL)
                    context->event_cb(context->cb_ctx,
                                      TLS_CERT_CHAIN_SUCCESS, NULL);
    @@ -2543,8 +2532,6 @@ openssl_handshake(struct tls_connection 
            int res;
            struct wpabuf *out_data;
     
    -       conn->server = !!server;
    -
            /*
             * Give TLS handshake data from the server (if available) to OpenSSL
             * for processing.
    
    
    

    external by Christer Jonassen  538  0  3  0

    UiA eduroam wpa_supplicant cfg

    UiA eduroam wpa_supplicant cfg: wpa_supplicant cfg
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=root
    
    network={
    ssid="eduroam"
    scan_ssid=1
    key_mgmt=WPA-EAP
    eap=TTLS
    identity="username@uia.no"
    password="password"
    phase1="peaplabel=0"
    phase2="auth=MSCHAPV2"
    }
    
    ctrl_interface=/var/run/wpa_supplicant
    
    

    external by Kyle Morgan  320  0  3  0

    Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. I used this to connect to my university's wireless network.

    Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. I used this to connect to my university's wireless network.: wpa_supplicant.conf
    # Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file.
    # I used this to connect to my university's wireless network on Arch linux.
    # Here's the command I used:
    #
    #   wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf
    # 
    
    network={
      ssid="YOUR_SSID"
      scan_ssid=1
      key_mgmt=WPA-EAP
      identity="YOUR_USERNAME"
      password="YOUR_PASSWORD"
      eap=PEAP
      phase1="peaplabel=0"
      phase2="auth=MSCHAPV2"
    }
    
    

    external by James Heller  293  0  3  0

    Base wpa_supplicant file.

    Base wpa_supplicant file.: wpa_supplicant.conf.tmp
    network={
      ssid="network_name"
      psk="network_password"
    }
    
    
    

    external by zer0ptr  188  0  2  0

    King's College London wpa_supplicant config file

    King's College London wpa_supplicant config file: AccessKings.conf
    network={
    	key_mgmt=WPA-EAP
    
    	ssid="AccessKings"
    	identity="k_number"
    	password="passwd"
    }
    
    
    • Public Snippets
    • Channels Snippets