From 44ec850037cd804ff885bb0bedb2a1823851f6fd Mon Sep 17 00:00:00 2001 From: Noah Axon Date: Wed, 27 Sep 2023 11:15:37 -0500 Subject: [PATCH] Add random-SSID option to wifi spam. Hundreds of unique SSID per minute --- m5stick-nemo.ino | 22 +++++++++++++++++++++- wifispam.h | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/m5stick-nemo.ino b/m5stick-nemo.ino index 6f1dad3..04527d3 100644 --- a/m5stick-nemo.ino +++ b/m5stick-nemo.ino @@ -720,6 +720,11 @@ void wifispam_setup() { M5.Lcd.printf(" - %d SSIDs:\n", ct); M5.Lcd.print(rickrollssids); break; + case 3: + for(str = randoms; *str; ++str) ct += *str == '\n'; + M5.Lcd.printf(" - %d SSIDs:\n", ct); + M5.Lcd.print(randoms); + break; } M5.Lcd.setTextSize(2); current_proc = 11; @@ -749,6 +754,14 @@ void wifispam_loop() { } beaconSpam(rickrollssids); break; + case 3: + randoms = randomSSID(); + len = sizeof(randoms); + while(i < len){ + i++; + } + beaconSpam(randoms); + break; } } } @@ -757,7 +770,8 @@ void wifispam_loop() { MENU wsmenu[] = { { "Funny", 0}, { "Rickroll", 1}, - { "back", 2}, + { "Random", 2}, + { "back", 3}, }; void wsmenu_drawmenu() { @@ -803,6 +817,12 @@ void wsmenu_loop() { current_proc = 11; break; case 2: + spamtype = 3; + rstOverride = false; + isSwitching = true; + current_proc = 11; + break; + case 3: rstOverride = false; isSwitching = true; current_proc = 1; diff --git a/wifispam.h b/wifispam.h index c824c6e..29fbfd4 100644 --- a/wifispam.h +++ b/wifispam.h @@ -75,6 +75,33 @@ const char rickrollssids[] PROGMEM = { "08 and hurt you\n" }; +const char foobar[] PROGMEM = { + "abh\nfoooo\nbarrr\nbaz\nbat\ngarply\nquux\nheyfuckface\n" +}; + +#define SSIDLEN 375 /* Change to whatever length you need */ + +const char* randomSSID(){ + /* Change to allowable characters */ + const char possible[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -.!)(,?%"; + static char ssid[SSIDLEN + 1]; + for(int p = 0, i = 0; i < SSIDLEN; i++){ + int r = random(0, strlen(possible)); + if(r % 7 == 0){ + ssid[p++] = '\n'; // inject newlines occasionally :D + } + ssid[p++] = possible[r]; + } + ssid[SSIDLEN] = '\n'; M5.Lcd.setTextSize(1); + M5.Lcd.fillScreen(BLACK); + M5.Lcd.setCursor(0, 0, 1); + M5.Lcd.println("Spamming Random SSIDs:"); + // Maximum broadcast SSID length is 32, but the strings might show longer in the output. Sorry. + M5.Lcd.print(ssid); + return ssid; +} + +const char* randoms = randomSSID(); #include