- a tool to create 104bit WEP-Keys from a passphrase as supported by some WiFi routers
- a C++ tool
- a Linux tool
- based on the source of WepAttack
The reason, why I wrote WepPassphrase is that iwconfig eth1 key s:passphrase doesn’t work for me. It only takes the ASCII values of chracters of the passphrase and uses them as WEP key. Windows or my router for example, are using a conventional algorithm to create WEP passphrases. Unfortunately I haven’t found a corresponding tool in the Gentoo portage and a short internet inquiry wasn’t successful. Therefore I decided to write a small tool based on the source of WepAttack, because it must create WEP keys to perform a dictionary based attack.
The invocation is quite simple: WepPassphrase PASSPHRASE
There are two options to suppress the trailing newline and to suppress the separating ‘-‘:
Code of WepPassphrase
As I wrote above, WepPassphrase reuses code from WepAttack. A 64 byte buffer is filled by successively copying the passphrase into it. Then the MD5-hash of the buffer is computed and the first 13 characters form our 26byte (104bit) WEP-key.
Simply get the WepPassphrase.tar.bz2, extract the directory and install it. The binary is copied into /usr/bin/, so root privileges should be necessary.