Skip to content

Commit

Permalink
modified: .DS_Store
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartek Pokrywka committed Dec 21, 2024
1 parent 4136886 commit 64842cd
Show file tree
Hide file tree
Showing 120 changed files with 1,436 additions and 271 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified esp32_marauder/.DS_Store
Binary file not shown.
Empty file modified esp32_marauder/AXP192.cpp
100644 → 100755
Empty file.
Empty file modified esp32_marauder/AXP192.h
100644 → 100755
Empty file.
8 changes: 7 additions & 1 deletion esp32_marauder/Assets.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@ PROGMEM static const unsigned char menu_icons[][66] = {
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
{0xFF, 0xFF, 0xFD, 0xBF, 0x0B, 0xD0, 0xE7, 0xE7, 0xEF, 0xF7, 0xCF, 0xF3, // DISABLED TOUCH: 34
0xAF, 0xF5, 0x6F, 0xF6, 0x6F, 0xF6, 0xAF, 0xF5, 0xCF, 0xF3, 0x0F, 0xF0,
0xE7, 0xE7, 0x0B, 0xD0, 0xFD, 0xBF, 0xFF, 0xFF}
0xE7, 0xE7, 0x0B, 0xD0, 0xFD, 0xBF, 0xFF, 0xFF},
{0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, 0x0F, 0xFE, 0x3F, 0xF3, 0xF9, 0x3F, // FLIPPER: 35
0x8D, 0xF7, 0x3F, 0x7D, 0xEE, 0x3F, 0xC6, 0x2D, 0x38, 0xBB, 0x9D, 0x3B,
0xBB, 0x63, 0x38, 0x87, 0x3C, 0x3E, 0xFB, 0x0F, 0x3F, 0xFF, 0x81, 0x3F,
0xFF, 0x3F, 0x38, 0xFF, 0xFF, 0x3C, 0xFF, 0x07, 0x3E, 0xFF, 0xEB, 0x3F,
0xFF, 0xEF, 0x3F, 0xFF, 0xEF, 0x3F, 0xFF, 0xDF, 0x3F, 0xFF, 0xFF, 0x3F,
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}
};

/*#ifndef MARAUDER_MINI
Expand Down
102 changes: 87 additions & 15 deletions esp32_marauder/BatteryInterface.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,102 @@ void BatteryInterface::main(uint32_t currentTime) {
if (this->battery_level != new_level) {
Serial.println(text00 + (String)new_level);
this->battery_level = new_level;
Serial.println("Battery Level: " + (String)this->battery_level);
}
}
}
}

void BatteryInterface::RunSetup() {
Wire.begin(I2C_SDA, I2C_SCL);
this->initTime = millis();
byte error;
byte addr;

#ifdef HAS_BATTERY

Wire.begin(I2C_SDA, I2C_SCL);

Serial.println("Checking for battery monitors...");

Wire.beginTransmission(IP5306_ADDR);
error = Wire.endTransmission();

if (error == 0) {
Serial.println("Detected IP5306");
this->has_ip5306 = true;
this->i2c_supported = true;
}

Wire.beginTransmission(MAX17048_ADDR);
error = Wire.endTransmission();

if (error == 0) {
if (maxlipo.begin()) {
Serial.println("Detected MAX17048");
this->has_max17048 = true;
this->i2c_supported = true;
}
}

/*for(addr = 1; addr < 127; addr++ ) {
Wire.beginTransmission(addr);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (addr<16)
Serial.print("0");
Serial.println(addr,HEX);
if (addr == IP5306_ADDR) {
this->has_ip5306 = true;
this->i2c_supported = true;
}
if (addr == MAX17048_ADDR) {
if (maxlipo.begin()) {
Serial.println("Detected MAX17048");
this->has_max17048 = true;
this->i2c_supported = true;
}
}
}
}*/

/*if (this->maxlipo.begin()) {
Serial.println("Detected MAX17048");
this->has_max17048 = true;
this->i2c_supported = true;
}*/

this->initTime = millis();
#endif
}

int8_t BatteryInterface::getBatteryLevel() {
Wire.beginTransmission(IP5306_ADDR);
Wire.write(0x78);
if (Wire.endTransmission(false) == 0 &&
Wire.requestFrom(0x75, 1)) {
this->i2c_supported = true;
switch (Wire.read() & 0xF0) {
case 0xE0: return 25;
case 0xC0: return 50;
case 0x80: return 75;
case 0x00: return 100;
default: return 0;

if (this->has_ip5306) {
Wire.beginTransmission(IP5306_ADDR);
Wire.write(0x78);
if (Wire.endTransmission(false) == 0 &&
Wire.requestFrom(IP5306_ADDR, 1)) {
this->i2c_supported = true;
switch (Wire.read() & 0xF0) {
case 0xE0: return 25;
case 0xC0: return 50;
case 0x80: return 75;
case 0x00: return 100;
default: return 0;
}
}
this->i2c_supported = false;
return -1;
}


if (this->has_max17048) {
return this->maxlipo.cellPercent();
}
this->i2c_supported = false;
return -1;
}
7 changes: 5 additions & 2 deletions esp32_marauder/BatteryInterface.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@
#include <Arduino.h>

#include "configs.h"
#include "Adafruit_MAX1704X.h"

#include <Wire.h>

#define I2C_SDA 33
#define I2C_SCL 22
#define IP5306_ADDR 0x75
#define MAX17048_ADDR 0x36

class BatteryInterface {
private:
uint32_t initTime = 0;
Adafruit_MAX17048 maxlipo;

public:
int8_t battery_level = 0;
int8_t old_level = 0;
bool i2c_supported = false;
bool has_max17048 = false;
bool has_ip5306 = false;

BatteryInterface();

Expand Down
Empty file modified esp32_marauder/Buffer.cpp
100644 → 100755
Empty file.
Empty file modified esp32_marauder/Buffer.h
100644 → 100755
Empty file.
90 changes: 84 additions & 6 deletions esp32_marauder/CommandLine.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ void CommandLine::runCommand(String input) {
Serial.println(HELP_LIST_AP_CMD_A);
Serial.println(HELP_LIST_AP_CMD_B);
Serial.println(HELP_LIST_AP_CMD_C);
Serial.println(HELP_LIST_AP_CMD_D);
Serial.println(HELP_SEL_CMD_A);
Serial.println(HELP_SSID_CMD_A);
Serial.println(HELP_SSID_CMD_B);
Expand All @@ -252,6 +253,7 @@ void CommandLine::runCommand(String input) {
#ifdef HAS_BT
Serial.println(HELP_BT_SNIFF_CMD);
Serial.println(HELP_BT_SPAM_CMD);
Serial.println(HELP_BT_SPOOFAT_CMD);
//Serial.println(HELP_BT_SWIFTPAIR_SPAM_CMD);
//Serial.println(HELP_BT_SAMSUNG_SPAM_CMD);
//Serial.println(HELP_BT_SPAM_ALL_CMD);
Expand Down Expand Up @@ -846,16 +848,73 @@ void CommandLine::runCommand(String input) {
// Bluetooth scan
if (cmd_args.get(0) == BT_SNIFF_CMD) {
#ifdef HAS_BT
Serial.println("Starting Bluetooth scan. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);
int bt_type_sw = this->argSearch(&cmd_args, "-t");

// Specifying type of bluetooth sniff
if (bt_type_sw != -1) {
String bt_type = cmd_args.get(bt_type_sw + 1);

bt_type.toLowerCase();

// Airtag sniff
if (bt_type == "airtag") {
Serial.println("Starting Airtag sniff. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_AIRTAG, TFT_WHITE);
}
else if (bt_type == "flipper") {
Serial.println("Starting Flipper sniff. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_FLIPPER, TFT_ORANGE);
}
}
// General bluetooth sniff
else {
Serial.println("Starting Bluetooth scan. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_ALL, TFT_GREEN);
}
#else
Serial.println("Bluetooth not supported");
#endif
}
else if (cmd_args.get(0) == BT_SPOOFAT_CMD) {
int at_sw = this->argSearch(&cmd_args, "-t");
if (at_sw != -1) {
#ifdef HAS_BT
int target_mac = cmd_args.get(at_sw + 1).toInt();
if (target_mac < airtags->size()) {
for (int i = 0; i < airtags->size(); i++) {
AirTag at = airtags->get(i);
if (i == target_mac)
at.selected = true;
else
at.selected = false;
airtags->set(i, at);
}
Serial.println("Spoofing Airtag: " + airtags->get(target_mac).mac);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SPOOF_AIRTAG, TFT_WHITE);
}
else {
Serial.println("Provided index is out of range: " + (String)target_mac);
return;
}
#endif
}
}
else if (cmd_args.get(0) == BT_SPAM_CMD) {
int bt_type_sw = this->argSearch(&cmd_args, "-t");
if (bt_type_sw != -1) {
Expand Down Expand Up @@ -909,6 +968,18 @@ void CommandLine::runCommand(String input) {
Serial.println("Bluetooth not supported");
#endif
}
else if (bt_type == "flipper") {
#ifdef HAS_BT
Serial.println("Starting Flipper Spam attack. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_ATTACK_FLIPPER_SPAM, TFT_ORANGE);
#else
Serial.println("Bluetooth not supported");
#endif
}
else if (bt_type == "all") {
#ifdef HAS_BT
Serial.println("Starting BT Spam All attack. Stop with " + (String)STOPSCAN_CMD);
Expand Down Expand Up @@ -1060,6 +1131,7 @@ void CommandLine::runCommand(String input) {
int ap_sw = this->argSearch(&cmd_args, "-a");
int ss_sw = this->argSearch(&cmd_args, "-s");
int cl_sw = this->argSearch(&cmd_args, "-c");
int at_sw = this->argSearch(&cmd_args, "-t");

// List APs
if (ap_sw != -1) {
Expand Down Expand Up @@ -1106,6 +1178,12 @@ void CommandLine::runCommand(String input) {
}
this->showCounts(count_selected);
}
// List airtags
else if (at_sw != -1) {
for (int i = 0; i < airtags->size(); i++) {
Serial.println("[" + (String)i + "]MAC: " + airtags->get(i).mac);
}
}
else {
Serial.println("You did not specify which list to show");
return;
Expand Down
8 changes: 6 additions & 2 deletions esp32_marauder/CommandLine.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extern WiFiScan wifi_scan_obj;
extern Settings settings_obj;
extern LedInterface led_obj;
extern LinkedList<AccessPoint>* access_points;
extern LinkedList<AirTag>* airtags;
extern LinkedList<ssid>* ssids;
extern LinkedList<Station>* stations;
extern const String PROGMEM version_number;
Expand Down Expand Up @@ -83,6 +84,7 @@ const char PROGMEM LOAD_CMD[] = "load";
// Bluetooth sniff/scan
const char PROGMEM BT_SPAM_CMD[] = "blespam";
const char PROGMEM BT_SNIFF_CMD[] = "sniffbt";
const char PROGMEM BT_SPOOFAT_CMD[] = "spoofat";
//const char PROGMEM BT_SOUR_APPLE_CMD[] = "sourapple";
//const char PROGMEM BT_SWIFTPAIR_SPAM_CMD[] = "swiftpair";
//const char PROGMEM BT_SAMSUNG_SPAM_CMD[] = "samsungblespam";
Expand Down Expand Up @@ -127,15 +129,17 @@ const char PROGMEM HELP_ATTACK_CMD[] = "attack -t <beacon [-l/-r/-a]/deauth [-c]
const char PROGMEM HELP_LIST_AP_CMD_A[] = "list -s";
const char PROGMEM HELP_LIST_AP_CMD_B[] = "list -a";
const char PROGMEM HELP_LIST_AP_CMD_C[] = "list -c";
const char PROGMEM HELP_LIST_AP_CMD_D[] = "list -t";
const char PROGMEM HELP_SEL_CMD_A[] = "select -a/-s/-c <index (comma separated)>/-f \"equals <String> or contains <String>\"";
const char PROGMEM HELP_SSID_CMD_A[] = "ssid -a [-g <count>/-n <name>]";
const char PROGMEM HELP_SSID_CMD_B[] = "ssid -r <index>";
const char PROGMEM HELP_SAVE_CMD[] = "save -a/-s";
const char PROGMEM HELP_LOAD_CMD[] = "load -a/-s";

// Bluetooth sniff/scan
const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt";
const char PROGMEM HELP_BT_SPAM_CMD[] = "blespam -t <apple/google/samsung/windows/all>";
const char PROGMEM HELP_BT_SNIFF_CMD[] = "sniffbt [-t] <airtag/flipper>";
const char PROGMEM HELP_BT_SPAM_CMD[] = "blespam -t <apple/google/samsung/windows/flipper/all>";
const char PROGMEM HELP_BT_SPOOFAT_CMD[] = "spoofat -t <index>";
//const char PROGMEM HELP_BT_SOUR_APPLE_CMD[] = "sourapple";
//const char PROGMEM HELP_BT_SWIFTPAIR_SPAM_CMD[] = "swiftpair";
//const char PROGMEM HELP_BT_SAMSUNG_SPAM_CMD[] = "samsungblespam";
Expand Down
Empty file modified esp32_marauder/Display.cpp
100644 → 100755
Empty file.
Empty file modified esp32_marauder/Display.h
100644 → 100755
Empty file.
Empty file modified esp32_marauder/EvilPortal.cpp
100644 → 100755
Empty file.
4 changes: 1 addition & 3 deletions esp32_marauder/EvilPortal.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#include "lang_var.h"

extern Settings settings_obj;
#ifdef HAS_SD
extern SDInterface sd_obj;
#endif
extern SDInterface sd_obj;
#ifdef HAS_SCREEN
extern Display display_obj;
#endif
Expand Down
2 changes: 1 addition & 1 deletion esp32_marauder/GpsInterface.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void GpsInterface::begin() {

MicroNMEA::sendSentence(Serial2, "$PSTMSRR");

delay(3900);
delay(1000);

if (Serial2.available()) {
Serial.println("GPS Attached Successfully");
Expand Down
Empty file modified esp32_marauder/GpsInterface.h
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion esp32_marauder/LedInterface.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void LedInterface::RunSetup() {
strip.begin();
strip.setPixelColor(0, strip.Color(0, 0, 0));
strip.show();
delay(100);
//delay(100);
strip.setBrightness(50);
strip.setPixelColor(0, strip.Color(0, 0, 0));
strip.show();
Expand Down
Empty file modified esp32_marauder/LedInterface.h
100644 → 100755
Empty file.
Loading

0 comments on commit 64842cd

Please sign in to comment.