Add random-SSID option to wifi spam. Hundreds of unique SSID per minute
This commit is contained in:
parent
ff255750e1
commit
44ec850037
|
@ -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;
|
||||
|
|
27
wifispam.h
27
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 <WiFi.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue