Skip to content

Commit

Permalink
Merge pull request #33 from dj1ch/development
Browse files Browse the repository at this point in the history
additional parasite mode fixes
  • Loading branch information
dj1ch authored Jun 23, 2024
2 parents 257b358 + afff02d commit 7f8e1b9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
3 changes: 2 additions & 1 deletion minigotchi-ESP32/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ void Frame::advertise() {
Serial.println("(>-<) Starting advertisment...");
Serial.println(" ");
Display::updateDisplay("(>-<)", "Starting advertisment...");
delay(250);
Parasite::sendAdvertising();
delay(Config::shortDelay);
for (int i = 0; i < 150; ++i) {
if (Frame::send()) {
packets++;
Expand Down
22 changes: 18 additions & 4 deletions minigotchi-ESP32/minigotchi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ int Minigotchi::addEpoch() {

void Minigotchi::epoch() {
Minigotchi::addEpoch();
Parasite::readData();
Serial.print("('-') Current Epoch: ");
Serial.println(Minigotchi::currentEpoch);
Serial.println(" ");
Expand Down Expand Up @@ -72,6 +73,7 @@ void Minigotchi::boot() {
Deauth::list();
Channel::init(Config::channel);
Minigotchi::info();
Parasite::sendName();
Minigotchi::finish();
}

Expand Down Expand Up @@ -176,13 +178,25 @@ void Minigotchi::monStop() {
*/

// channel cycling
void Minigotchi::cycle() { Channel::cycle(); }
void Minigotchi::cycle() {
Parasite::readData();
Channel::cycle();
}

// pwnagotchi detection
void Minigotchi::detect() { Pwnagotchi::detect(); }
void Minigotchi::detect() {
Parasite::readData();
Pwnagotchi::detect();
}

// deauthing
void Minigotchi::deauth() { Deauth::deauth(); }
void Minigotchi::deauth() {
Parasite::readData();
Deauth::deauth();
}

// advertising
void Minigotchi::advertise() { Frame::advertise(); }
void Minigotchi::advertise() {
Parasite::readData();
Frame::advertise();
}
3 changes: 3 additions & 0 deletions minigotchi-ESP32/pwnagotchi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,17 @@ void Pwnagotchi::detect() {
Serial.println("(;-;) No Pwnagotchi found");
Display::updateDisplay("(;-;)", "No Pwnagotchi found.");
Serial.println(" ");
Parasite::sendPwnagotchiStatus(NO_FRIEND_FOUND);
} else if (pwnagotchiDetected) {
Minigotchi::monStop();
Pwnagotchi::stopCallback();
Parasite::sendPwnagotchiStatus(FRIEND_SCAN_ERROR);
} else {
Minigotchi::monStop();
Pwnagotchi::stopCallback();
Serial.println("(X-X) How did this happen?");
Display::updateDisplay("(X-X)", "How did this happen?");
Parasite::sendPwnagotchiStatus(FRIEND_FOUND, name.c_str());
}
}

Expand Down

0 comments on commit 7f8e1b9

Please sign in to comment.