Code Monkey home page Code Monkey logo

Comments (8)

dj1ch avatar dj1ch commented on July 28, 2024 4

@ATOMNFT and I just recently solved the issue, if you want to try compiling from the development branch for the ESP32.

from minigotchi-esp32.

dj1ch avatar dj1ch commented on July 28, 2024

I know the issue is being worked on, but I haven't found much off of exception decoders. The known workaround is to just set it to false.

from minigotchi-esp32.

19Bender83 avatar 19Bender83 commented on July 28, 2024

Sorry for opening up this issue, did not read the the comment on minigotchi.

from minigotchi-esp32.

dj1ch avatar dj1ch commented on July 28, 2024

nah it's all good. I'm in the progress of fixing it but I haven't really close to fixing the exception

from minigotchi-esp32.

ATOMNFT avatar ATOMNFT commented on July 28, 2024

I think this is one problematic area. Instead of appending each byte from Frame::beaconFrame, it should be appending data from Frame::payload.
The pack() function constructs the entire beacon frame by first initializing it (init()), appending ESSID data (essid()), and then chunking the data into packets using chunkSize. There's a logical error in how the payload is being copied

from minigotchi-esp32.

ATOMNFT avatar ATOMNFT commented on July 28, 2024

I think this is one problematic area. Instead of appending each byte from Frame::beaconFrame, it should be appending data from Frame::payload.
The pack() function constructs the entire beacon frame by first initializing it (init()), appending ESSID data (essid()), and then chunking the data into packets using chunkSize. There's a logical error in how the payload is being copied

I could be totally wrong though...

from minigotchi-esp32.

dj1ch avatar dj1ch commented on July 28, 2024

I think this is one problematic area. Instead of appending each byte from Frame::beaconFrame, it should be appending data from Frame::payload. The pack() function constructs the entire beacon frame by first initializing it (init()), appending ESSID data (essid()), and then chunking the data into packets using chunkSize. There's a logical error in how the payload is being copied

Frame::payload doesn't exist. there's Frame::payloadSize which is used to measure the length of the essid + header without the chunking.

/**
 * frame.cpp
 */

void Frame::pack() {
  // clear frame before constructing
  Frame::beaconFrame.clear();

  // add the header and essid
  init();
  essid();

  // payload size
  Frame::payloadSize = Frame::beaconFrame.size();

  // store for later
  std::vector<uint8_t> originalBeaconFrame = Frame::beaconFrame;

  for (size_t i = 0; i < payloadSize; i += Frame::chunkSize) {
    Frame::beaconFrame.push_back(Frame::IDWhisperPayload);

    size_t chunkEnd = std::min(i + Frame::chunkSize, Frame::payloadSize);
    Frame::beaconFrame.push_back(chunkEnd - i);

    for (size_t j = i; j < chunkEnd; ++j) {
      Frame::beaconFrame.push_back(originalBeaconFrame[j]);
    }
  }

  // save some memory
  originalBeaconFrame.clear();
  originalBeaconFrame.shrink_to_fit();

  // update size since we changed the frame
  Frame::frameSize = Frame::beaconFrame.size();

}

When constructing the frame there are a couple of steps that need to be done

  1. Header (appended to Frame::beaconFrame)
  2. JSON Data (appended to Frame::beaconFrame)
  3. For every 255 bytes we will need to chunk the payload and throw in something called Frame::IDWhisperPayload to indicate this is from a Pwnagotchi

Something I've noticed with ESP32 development is that the compiler is a lot more strict when it comes to declaring objects, function signatures, etc. I'll probably need to adjust accordingly. I'll read up more on pack.go from pwngrid if needed

from minigotchi-esp32.

dj1ch avatar dj1ch commented on July 28, 2024

Going to close this as advertising works now.

from minigotchi-esp32.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.