Skip to content

Commit

Permalink
EP fix, clock adjust stack fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorcelli committed Oct 5, 2024
1 parent abe5acc commit 8bd129c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 84 deletions.
89 changes: 7 additions & 82 deletions src/core/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,7 @@ void setClock() {

if (!returnToMenu) {
if (auto_mode) {
if(!wifiConnected) {
//Previous implementation was triggering Stack Canary error.
//NTP Adjust is made autommatically everytime you connect to wifi.
displayWarning("Connect to WiFi");
return;
}
if(!wifiConnected) wifiConnectMenu();
if(!returnToMenu) {
options = {
{"Brasilia", [&]() { timeClient.setTimeOffset(-3 * 3600); tmz=0; }, tmz==0 ? true:false},
Expand Down Expand Up @@ -412,85 +407,15 @@ void setClock() {
}
else {
int hr, mn, am;
options = {
{"00", [&]() { hr=0; }},
{"01", [&]() { hr=1; }},
{"02", [&]() { hr=2; }},
{"03", [&]() { hr=3; }},
{"04", [&]() { hr=4; }},
{"05", [&]() { hr=5; }},
{"06", [&]() { hr=6; }},
{"07", [&]() { hr=7; }},
{"08", [&]() { hr=8; }},
{"09", [&]() { hr=9; }},
{"10", [&]() { hr=10; }},
{"11", [&]() { hr=11; }},
};
options = { };
for(int i=0; i<12;i++) options.push_back({String(i<10?"0":"" + String(i)).c_str(), [&]() { mn=i; }});

delay(200);
loopOptions(options,false,true,"Set Hour");
delay(200);
options = {
{"00", [&]() { mn=0; }},
{"01", [&]() { mn=1; }},
{"02", [&]() { mn=2; }},
{"03", [&]() { mn=3; }},
{"04", [&]() { mn=4; }},
{"05", [&]() { mn=5; }},
{"06", [&]() { mn=6; }},
{"07", [&]() { mn=7; }},
{"08", [&]() { mn=8; }},
{"09", [&]() { mn=9; }},
{"10", [&]() { mn=10; }},
{"11", [&]() { mn=11; }},
{"12", [&]() { mn=12; }},
{"13", [&]() { mn=13; }},
{"14", [&]() { mn=14; }},
{"15", [&]() { mn=15; }},
{"16", [&]() { mn=16; }},
{"17", [&]() { mn=17; }},
{"18", [&]() { mn=18; }},
{"19", [&]() { mn=19; }},
{"20", [&]() { mn=20; }},
{"21", [&]() { mn=21; }},
{"22", [&]() { mn=22; }},
{"23", [&]() { mn=23; }},
{"24", [&]() { mn=24; }},
{"25", [&]() { mn=25; }},
{"26", [&]() { mn=26; }},
{"27", [&]() { mn=27; }},
{"28", [&]() { mn=28; }},
{"29", [&]() { mn=29; }},
{"30", [&]() { mn=30; }},
{"31", [&]() { mn=31; }},
{"32", [&]() { mn=32; }},
{"33", [&]() { mn=33; }},
{"34", [&]() { mn=34; }},
{"35", [&]() { mn=35; }},
{"36", [&]() { mn=36; }},
{"37", [&]() { mn=37; }},
{"38", [&]() { mn=38; }},
{"39", [&]() { mn=39; }},
{"40", [&]() { mn=40; }},
{"41", [&]() { mn=41; }},
{"42", [&]() { mn=42; }},
{"43", [&]() { mn=43; }},
{"44", [&]() { mn=44; }},
{"45", [&]() { mn=45; }},
{"46", [&]() { mn=46; }},
{"47", [&]() { mn=47; }},
{"48", [&]() { mn=48; }},
{"49", [&]() { mn=49; }},
{"50", [&]() { mn=50; }},
{"51", [&]() { mn=51; }},
{"52", [&]() { mn=52; }},
{"53", [&]() { mn=53; }},
{"54", [&]() { mn=54; }},
{"55", [&]() { mn=55; }},
{"56", [&]() { mn=56; }},
{"57", [&]() { mn=57; }},
{"58", [&]() { mn=58; }},
{"59", [&]() { mn=59; }},
};
options = { };
for(int i=0; i<60;i++) options.push_back({String(i<10?"0":"" + String(i)).c_str(), [&]() { mn=i; }});

delay(200);
loopOptions(options,false,true,"Set Minute");
delay(200);
Expand Down
4 changes: 2 additions & 2 deletions src/modules/others/webInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ function runJsFile(filePath) {
var fs = document.getElementById("actualFS").value;
const ajax5 = new XMLHttpRequest();
const formdata5 = new FormData();
formdata5.append("cmnd", "js " + filePath);
formdata5.append("cmnd", "js " + filePath);
ajax5.open("POST", "/cm", false);
ajax5.send(formdata5);
document.getElementById("status").innerHTML = ajax5.responseText;
Expand All @@ -511,7 +511,7 @@ function runBadusbFile(filePath) {
var fs = document.getElementById("actualFS").value;
const ajax5 = new XMLHttpRequest();
const formdata5 = new FormData();
formdata5.append("cmnd", "badusb tx_from_file " + filePath);
formdata5.append("cmnd", "badusb tx_from_file " + filePath);
ajax5.open("POST", "/cm", false);
ajax5.send(formdata5);
document.getElementById("status").innerHTML = ajax5.responseText;
Expand Down
1 change: 1 addition & 0 deletions src/modules/wifi/evil_portal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void startEvilPortal(String tssid, uint8_t channel, bool deauth) {
};
delay(200);
loopOptions(options);
memcpy(deauth_frame, deauth_frame_default, sizeof(deauth_frame_default));
wsl_bypasser_send_raw_frame(&ap_record,channel); //writes the buffer with the information
while(checkNextPress()){ yield(); } // debounce

Expand Down

0 comments on commit 8bd129c

Please sign in to comment.