Skip to content

The HTML is not always the same in EvilPortal (Flipper Zero) #976

@ismailnakkar

Description

@ismailnakkar

Describe the bug
The HTML that I use for the evilportal changes (some parts are truncated). Sometimes it works, sometimes it does not

To Reproduce
Steps to reproduce the behavior:
Add a long HTML and try doing it again and checking the page several times. You will notice that the page is not the same every single time

Expected behavior
The HTML should always be the same and exactly as it was uploaded

Screenshots

Marauder (please complete the following information if applicable):

  • Firmware version: 1.8.10
  • Hardware version: Flipper Zero latest Unleashed

Desktop (please complete the following information if applicable):

  • OS: Windows
  • Browser: Chrome
  • Version: 144

Smartphone (please complete the following information if applicable):

  • Device: iPhone 15 Pro
  • OS: IOS 26
  • Browser Safari
  • Version Latest

Additional context
I tried modifying the source code to check how many bytes are sent and it is different from time to time:

void EvilPortal::setHtmlFromSerial() {
  Serial.println("Setting HTML from serial...");

  // Read the entire HTML template from Serial
  html_template = Serial.readString();

  // Debug: print number of bytes received
  Serial.print("Bytes received: ");
  Serial.println(html_template.length());

  if (html_template.length() == 0) {
    Serial.println("No HTML read from serial");
    return;
  }

  // Debug: print first 80 chars as preview to avoid crashing Serial monitor
  int preview_len = html_template.length() > 80 ? 80 : html_template.length();
  Serial.print("Preview: ");
  Serial.println(html_template.substring(0, preview_len));

  // Legacy pointer for CaptiveRequestHandler
  index_html = const_cast<char*>(html_template.c_str());

  this->has_html          = true;
  this->using_serial_html = true;

  Serial.println("HTML set from serial successfully!");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions