wpa_passphrase with hex-encoded SSID

1

How can I generate a hex password based on a hex SSID?

Explanation

I use the following command to generate a hex value from a unicode string:

$ echo -n "→ MyUnicodeSSID ←" | tr -d "\n" | od -A n -t x1 | tr -d " " | tr -d "\n"
--> e28692204d79556e69636f64655353494420e28690

However, if I use the hex value for wpa_password I get the following output which uses the hex value as string input:

$ wpa_passphrase e28692204d79556e69636f64655353494420e28690 "MySecretPa$$word"

network={
    ssid="e28692204d79556e69636f64655353494420e28690"
    #psk="MySecretPa6100word"
    psk=b4c850a5c05769d9afb828cda94341f734f40aa4bd606a47844ca7f279b55378
}

lspcity

Posted 2015-11-29T19:44:09.543

Reputation: 471

Answers

0

Try using the SSID from the output of wpa_cli scan then wpa_cli scan_results. Be sure to use P in front of the SSID, i.e.

network={
    key_mgmt=NONE
    ssid=P"test\x00abc"
}

See:

http://lists.infradead.org/pipermail/hostap/2012-August/026461.html

dps

Posted 2015-11-29T19:44:09.543

Reputation: 101