mirror of
https://github.com/mfontanini/libtins
synced 2026-01-28 20:44:26 +01:00
Both of WPA2Decrypter::add_supplicant_data overloads work.
This commit is contained in:
@@ -67,3 +67,20 @@ TEST_F(WPA2DecryptTest, DecryptUsingBeacon) {
|
||||
ASSERT_FALSE(decrypter.decrypt(radio));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(WPA2DecryptTest, DecryptWithoutUsingBeacon) {
|
||||
Crypto::WPA2Decrypter decrypter;
|
||||
decrypter.add_supplicant_data("Induction", "Coherer", "00:0c:41:82:b2:55");
|
||||
for(size_t i = 1; i < 7; ++i) {
|
||||
RadioTap radio(packets[i], packets_size[i]);
|
||||
if(i > 4) {
|
||||
ASSERT_TRUE(decrypter.decrypt(radio));
|
||||
if(i == 5)
|
||||
check_packet5(radio);
|
||||
else
|
||||
check_packet6(radio);
|
||||
}
|
||||
else
|
||||
ASSERT_FALSE(decrypter.decrypt(radio));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user