Save evil portal logs

This commit is contained in:
Just Call Me Koko
2023-07-18 18:15:23 -04:00
parent 2685de86d1
commit 6f1db9176a
10 changed files with 131 additions and 49 deletions

View File

@@ -106,9 +106,9 @@ void SDInterface::listDir(String str_dir){
}
}
void SDInterface::addPacket(uint8_t* buf, uint32_t len) {
void SDInterface::addPacket(uint8_t* buf, uint32_t len, bool log) {
if ((this->supported) && (this->do_save)) {
buffer_obj.addPacket(buf, len);
buffer_obj.addPacket(buf, len, log);
}
}
@@ -120,6 +120,14 @@ void SDInterface::openCapture(String file_name) {
}
}
void SDInterface::openLog(String file_name) {
bool save_pcap = settings_obj.loadSetting<bool>("SavePCAP");
if ((this->supported) && (save_pcap)) {
buffer_obj.createPcapFile(&SD, file_name, true);
buffer_obj.open(true);
}
}
void SDInterface::runUpdate() {
#ifdef HAS_SCREEN
display_obj.tft.setTextWrap(false);