Spoof airtags

This commit is contained in:
Just Call Me Koko
2024-11-20 19:26:42 -05:00
parent a96af37524
commit 07ecb68665
5 changed files with 144 additions and 4 deletions
+63
View File
@@ -592,6 +592,7 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
(wifi_scan_obj.currentScanMode == BT_ATTACK_FLIPPER_SPAM) ||
(wifi_scan_obj.currentScanMode == BT_SPOOF_AIRTAG) ||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS))
@@ -658,6 +659,7 @@ void MenuFunctions::main(uint32_t currentTime)
(wifi_scan_obj.currentScanMode == BT_ATTACK_SAMSUNG_SPAM) ||
(wifi_scan_obj.currentScanMode == BT_ATTACK_GOOGLE_SPAM) ||
(wifi_scan_obj.currentScanMode == BT_ATTACK_FLIPPER_SPAM) ||
(wifi_scan_obj.currentScanMode == BT_SPOOF_AIRTAG) ||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE) ||
(wifi_scan_obj.currentScanMode == BT_SCAN_WAR_DRIVE_CONT) ||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
@@ -1227,6 +1229,7 @@ void MenuFunctions::RunSetup()
{
extern LinkedList<AccessPoint>* access_points;
extern LinkedList<Station>* stations;
extern LinkedList<AirTag>* airtags;
this->disable_touch = false;
@@ -1265,6 +1268,9 @@ void MenuFunctions::RunSetup()
#endif
wifiGeneralMenu.list = new LinkedList<MenuNode>();
wifiAPMenu.list = new LinkedList<MenuNode>();
#ifdef HAS_BT
airtagMenu.list = new LinkedList<MenuNode>();
#endif
#ifndef HAS_ILI9341
wifiStationMenu.list = new LinkedList<MenuNode>();
#endif
@@ -1323,6 +1329,9 @@ void MenuFunctions::RunSetup()
clearSSIDsMenu.name = text_table1[28];
clearAPsMenu.name = text_table1[29];
wifiAPMenu.name = "Access Points";
#ifdef HAS_BT
airtagMenu.name = "Select Airtag";
#endif
#ifndef HAS_ILI9341
wifiStationMenu.name = "Select Stations";
#endif
@@ -1663,6 +1672,7 @@ void MenuFunctions::RunSetup()
this->changeMenu(wifiAPMenu.parentMenu);
});
// Select Stations on Mini v1
/*
this->addNodes(&wifiGeneralMenu, "Select Stations", TFT_CYAN, NULL, KEYBOARD_ICO, [this](){
@@ -1914,6 +1924,59 @@ void MenuFunctions::RunSetup()
wifi_scan_obj.StartScan(BT_ATTACK_SPAM_ALL, TFT_MAGENTA);
});
#ifndef HAS_ILI9341
// Select Airtag on Mini
this->addNodes(&bluetoothAttackMenu, "Spoof Airtag", TFT_WHITE, NULL, ATTACKS, [this](){
// Clear nodes and add back button
airtagMenu.list->clear();
this->addNodes(&airtagMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(airtagMenu.parentMenu);
});
// Add buttons for all airtags
// Find out how big our menu is going to be
int menu_limit;
if (airtags->size() <= BUTTON_ARRAY_LEN)
menu_limit = airtags->size();
else
menu_limit = BUTTON_ARRAY_LEN;
Serial.println("Found " + (String)airtags->size() + " airtag(s)");
// Create the menu nodes for all of the list items
for (int i = 0; i < menu_limit; i++) {
this->addNodes(&airtagMenu, airtags->get(i).mac, TFT_WHITE, NULL, BLUETOOTH, [this, i](){
AirTag new_at = airtags->get(i);
new_at.selected = true;
airtags->set(i, new_at);
// Set all other airtags to "Not Selected"
for (int x = 0; x < airtags->size(); x++) {
if (x != i) {
AirTag new_atx = airtags->get(x);
new_atx.selected = false;
airtags->set(x, new_atx);
}
}
// Start the spoof
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(BT_SPOOF_AIRTAG, TFT_WHITE);
});
}
this->changeMenu(&airtagMenu);
});
airtagMenu.parentMenu = &bluetoothAttackMenu;
this->addNodes(&airtagMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(airtagMenu.parentMenu);
});
#endif
// Device menu
deviceMenu.parentMenu = &mainMenu;
this->addNodes(&deviceMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {