Skip to content

Instantly share code, notes, and snippets.

@AbeEstrada
Forked from ericboehs/wpa_passphrase.rb
Created May 29, 2017 20:28
Show Gist options
  • Save AbeEstrada/e9e5783f990166b67cd3911c12fb58ef to your computer and use it in GitHub Desktop.
Save AbeEstrada/e9e5783f990166b67cd3911c12fb58ef to your computer and use it in GitHub Desktop.
Generating a WPA PSK hex key in Ruby
require 'openssl'
ssid = 'Delorean'
passphrase = 'hoverboardsdonotworkonwater'
puts OpenSSL::PKCS5.pbkdf2_hmac_sha1(passphrase, ssid, 4096, 32).unpack("H*").first
@AbeEstrada
Copy link
Author

wpa_supplicant.conf

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
  ssid="SSID"
  psk=longcharacterstringgoeshere
  key_mgmt=WPA-PSK
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment