libtins
4.0
|
Decrypts WEP-encrypted traffic. More...
#include <crypto.h>
Public Types | |
typedef HWAddress< 6 > | address_type |
Public Member Functions | |
WEPDecrypter () | |
Constructs a WEPDecrypter object. | |
void | add_password (const address_type &addr, const std::string &password) |
Adds a decryption password. More... | |
void | remove_password (const address_type &addr) |
Removes a decryption password. More... | |
bool | decrypt (PDU &pdu) |
Decrypts the provided PDU. More... | |
Decrypts WEP-encrypted traffic.
void Tins::Crypto::WEPDecrypter::add_password | ( | const address_type & | addr, |
const std::string & | password | ||
) |
Adds a decryption password.
addr | The access point's BSSID. |
password | The password which will be used to decrypt packets sent from and to the AP identifier by the BSSID addr. |
bool Tins::Crypto::WEPDecrypter::decrypt | ( | PDU & | pdu | ) |
Decrypts the provided PDU.
A Dot11Data PDU is looked up inside the provided PDU chain. If no such PDU exists or there is no password associated with the Dot11 packet's BSSID, then the PDU is left intact.
Otherwise, the packet is decrypted using the given password. If the CRC found after decrypting is invalid, false is returned.
void Tins::Crypto::WEPDecrypter::remove_password | ( | const address_type & | addr | ) |
Removes a decryption password.
addr | The BSSID of the access point. |