From 3378f2fc636559df340b1efb55701ed945d850be Mon Sep 17 00:00:00 2001 From: Stefan Kremser Date: Fri, 31 Mar 2017 20:25:26 +0200 Subject: [PATCH] fixed settings timeout bug and improved deauth attack --- README.md | 5 ++-- esp8266_deauther/Attack.cpp | 16 ++++++++++--- esp8266_deauther/ClientScan.cpp | 2 ++ esp8266_deauther/ClientScan.h | 1 + esp8266_deauther/Settings.cpp | 33 +++++++++++++++++++++++---- esp8266_deauther/Settings.h | 8 ++++++- esp8266_deauther/data.h | 5 +++- esp8266_deauther/esp8266_deauther.ino | 2 +- 8 files changed, 59 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e6068b2..06cc656 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ You have 2 choices here. Uploading the bin files is easier but not as good for d ### Uploading the bin files **Note:** the 512kb version won't have the full MAC vendor list. +The NodeMCU and every other board which uses the ESP-12 has 4mb flash on it. **0** Download the current release from [here](https://github.com/spacehuhn/esp8266_deauther/releases) @@ -187,9 +188,9 @@ Try out switching the browser or open the website with another device. If you see 0 pkts/s on the website you've made a mistake. Check if you have followed the the installation steps correctly and that the right SDK installed, it must be version 2.0.0! If it can send packets but your target don't loose its connection then the Wi-Fi router uses [802.11w](#how-to-protect-against-it) and it's protected against such attacks or they communicate via 5 GHz Wi-Fi, which the ESP8266 doesn't support. +**Some users reported that it can help setting the packetrate to 100 in the settings (but be carefull with this setting)** - -###If you have other questions or problems with the ESP8266 you can also check out the official [community forum](http://www.esp8266.com/). +### If you have other questions or problems with the ESP8266 you can also check out the official [community forum](http://www.esp8266.com/). ## License diff --git a/esp8266_deauther/Attack.cpp b/esp8266_deauther/Attack.cpp index 91cb960..f38470e 100644 --- a/esp8266_deauther/Attack.cpp +++ b/esp8266_deauther/Attack.cpp @@ -147,10 +147,20 @@ void Attack::run(){ } }else{ buildDeauth(_ap, clientScan.getClientMac(i), 0xc0, settings.deauthReason ); - for(int h=0;h +#include +#include #include "Mac.h" #include "MacList.h" #include "NameList.h" +extern void sendBuffer(); +extern void sendToBuffer(String str); +extern void sendHeader(int code, String type, size_t _size); + extern const bool debug; extern String data_getVendor(uint8_t first,uint8_t second,uint8_t third); extern void eepromWriteInt(int adr, int val); @@ -34,7 +40,7 @@ class Settings void load(); void reset(); void save(); - String get(); + void send(); void info(); int ssidLen; diff --git a/esp8266_deauther/data.h b/esp8266_deauther/data.h index c4c99be..1f7fa18 100644 --- a/esp8266_deauther/data.h +++ b/esp8266_deauther/data.h @@ -34,7 +34,10 @@ const static uint8_t data_settingsJS[] PROGMEM = {0x76,0x61,0x72,0x20,0x6e,0x61, const static uint8_t data_styleCSS[] PROGMEM = {0x2f,0x2a,0x20,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x2a,0x2f,0x20,0x2a,0x2c,0x20,0x62,0x6f,0x64,0x79,0x20,0x7b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x30,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x3b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x66,0x61,0x6d,0x69,0x6c,0x79,0x3a,0x20,0x61,0x72,0x69,0x61,0x6c,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x34,0x33,0x32,0x39,0x32,0x39,0x3b,0x20,0x7d,0x20,0x68,0x31,0x20,0x7b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x32,0x32,0x70,0x78,0x3b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x30,0x2e,0x36,0x65,0x6d,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x30,0x30,0x42,0x30,0x46,0x46,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x66,0x66,0x66,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x32,0x65,0x6d,0x3b,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a,0x20,0x34,0x70,0x78,0x3b,0x20,0x7d,0x20,0x62,0x75,0x74,0x74,0x6f,0x6e,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x30,0x30,0x42,0x30,0x46,0x46,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x66,0x66,0x66,0x3b,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x31,0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64,0x20,0x23,0x38,0x46,0x38,0x46,0x38,0x46,0x3b,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a,0x20,0x31,0x34,0x70,0x78,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x33,0x34,0x65,0x6d,0x20,0x30,0x2e,0x33,0x65,0x6d,0x3b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,0x30,0x2e,0x36,0x65,0x6d,0x3b,0x20,0x7d,0x20,0x62,0x75,0x74,0x74,0x6f,0x6e,0x3a,0x68,0x6f,0x76,0x65,0x72,0x20,0x7b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x30,0x30,0x30,0x3b,0x20,0x7d,0x20,0x6c,0x61,0x62,0x65,0x6c,0x20,0x7b,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x62,0x6c,0x6f,0x63,0x6b,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x33,0x35,0x70,0x78,0x3b,0x20,0x7d,0x20,0x69,0x6e,0x70,0x75,0x74,0x20,0x7b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x32,0x32,0x70,0x78,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x32,0x30,0x70,0x78,0x3b,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x3a,0x20,0x31,0x70,0x78,0x20,0x73,0x6f,0x6c,0x69,0x64,0x20,0x23,0x41,0x39,0x39,0x44,0x39,0x44,0x3b,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x72,0x61,0x64,0x69,0x75,0x73,0x3a,0x20,0x35,0x70,0x78,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x32,0x65,0x6d,0x3b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x32,0x70,0x78,0x3b,0x20,0x7d,0x20,0x69,0x6e,0x70,0x75,0x74,0x5b,0x74,0x79,0x70,0x65,0x3d,0x22,0x63,0x68,0x65,0x63,0x6b,0x62,0x6f,0x78,0x22,0x5d,0x20,0x7b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x35,0x70,0x78,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x61,0x75,0x74,0x6f,0x3b,0x20,0x7d,0x20,0x2e,0x77,0x61,0x72,0x6e,0x20,0x7b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x63,0x32,0x30,0x30,0x30,0x30,0x3b,0x20,0x7d,0x20,0x2e,0x77,0x61,0x72,0x6e,0x42,0x74,0x6e,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x63,0x32,0x30,0x30,0x30,0x30,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x66,0x66,0x66,0x3b,0x20,0x7d,0x20,0x2e,0x77,0x61,0x72,0x6e,0x42,0x74,0x6e,0x3a,0x68,0x6f,0x76,0x65,0x72,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x66,0x30,0x30,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x30,0x30,0x30,0x3b,0x20,0x7d,0x20,0x2e,0x73,0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x42,0x74,0x6e,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x66,0x66,0x66,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x30,0x30,0x30,0x3b,0x20,0x7d,0x20,0x2e,0x73,0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x42,0x74,0x6e,0x3a,0x68,0x6f,0x76,0x65,0x72,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x30,0x30,0x42,0x30,0x46,0x46,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x66,0x66,0x66,0x3b,0x20,0x7d,0x20,0x2e,0x72,0x69,0x67,0x68,0x74,0x20,0x7b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3a,0x20,0x72,0x69,0x67,0x68,0x74,0x3b,0x20,0x7d,0x20,0x2e,0x62,0x6f,0x6c,0x64,0x20,0x7b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x77,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x62,0x6f,0x6c,0x64,0x3b,0x20,0x7d,0x20,0x2e,0x62,0x6c,0x6f,0x63,0x6b,0x20,0x7b,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x3b,0x20,0x7d,0x20,0x2e,0x6d,0x61,0x72,0x67,0x69,0x6e,0x4e,0x75,0x6c,0x6c,0x20,0x7b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x30,0x20,0x7d,0x20,0x2e,0x62,0x6c,0x75,0x65,0x20,0x7b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x30,0x30,0x42,0x30,0x46,0x46,0x20,0x7d,0x20,0x2e,0x73,0x6d,0x61,0x6c,0x6c,0x20,0x7b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x34,0x70,0x78,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x37,0x32,0x37,0x32,0x37,0x32,0x20,0x7d,0x20,0x2f,0x2a,0x20,0x4e,0x61,0x76,0x69,0x67,0x61,0x74,0x69,0x6f,0x6e,0x20,0x2a,0x2f,0x20,0x6e,0x61,0x76,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x32,0x32,0x32,0x3b,0x20,0x7d,0x20,0x6e,0x61,0x76,0x20,0x61,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x32,0x32,0x32,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x39,0x39,0x39,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x35,0x65,0x6d,0x3b,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x2d,0x62,0x6c,0x6f,0x63,0x6b,0x3b,0x20,0x74,0x65,0x78,0x74,0x2d,0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x6e,0x6f,0x6e,0x65,0x3b,0x20,0x7d,0x20,0x6e,0x61,0x76,0x20,0x61,0x3a,0x68,0x6f,0x76,0x65,0x72,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x30,0x30,0x30,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x66,0x30,0x66,0x30,0x66,0x30,0x3b,0x20,0x7d,0x20,0x2f,0x2a,0x20,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x20,0x2a,0x2f,0x20,0x23,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x20,0x7b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x33,0x34,0x65,0x6d,0x3b,0x20,0x7d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x7b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x3b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x30,0x30,0x25,0x3b,0x20,0x6d,0x61,0x78,0x2d,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x39,0x36,0x30,0x70,0x78,0x3b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x30,0x20,0x61,0x75,0x74,0x6f,0x3b,0x20,0x62,0x6f,0x72,0x64,0x65,0x72,0x2d,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x3a,0x20,0x30,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x32,0x32,0x32,0x32,0x32,0x32,0x3b,0x20,0x7d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x68,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x32,0x32,0x32,0x32,0x32,0x32,0x3b,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x23,0x66,0x30,0x66,0x30,0x66,0x30,0x3b,0x20,0x7d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x64,0x20,0x7b,0x20,0x66,0x6f,0x6e,0x74,0x2d,0x73,0x69,0x7a,0x65,0x3a,0x20,0x31,0x34,0x70,0x78,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x66,0x30,0x66,0x30,0x66,0x30,0x3b,0x20,0x7d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x68,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x64,0x20,0x7b,0x20,0x74,0x65,0x78,0x74,0x2d,0x61,0x6c,0x69,0x67,0x6e,0x3a,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x3b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x3a,0x20,0x30,0x2e,0x31,0x65,0x6d,0x20,0x30,0x3b,0x20,0x7d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x2e,0x73,0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x20,0x74,0x64,0x20,0x7b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x31,0x31,0x61,0x34,0x63,0x63,0x3b,0x20,0x7d,0x20,0x2f,0x2a,0x20,0x53,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x20,0x2a,0x2f,0x20,0x23,0x73,0x61,0x76,0x65,0x64,0x20,0x7b,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x3b,0x20,0x7d,0x20,0x23,0x63,0x6c,0x69,0x65,0x6e,0x74,0x53,0x63,0x61,0x6e,0x53,0x74,0x61,0x74,0x75,0x73,0x20,0x7b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x31,0x65,0x6d,0x3b,0x20,0x7d,0x20,0x23,0x63,0x6c,0x69,0x65,0x6e,0x74,0x53,0x63,0x61,0x6e,0x53,0x74,0x61,0x72,0x74,0x20,0x7b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x33,0x30,0x70,0x78,0x3b,0x20,0x7d,0x20,0x23,0x73,0x63,0x61,0x6e,0x54,0x69,0x6d,0x65,0x20,0x7b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x36,0x30,0x70,0x78,0x3b,0x20,0x7d,0x20,0x23,0x61,0x70,0x53,0x63,0x61,0x6e,0x53,0x74,0x61,0x74,0x75,0x73,0x20,0x7b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x31,0x65,0x6d,0x3b,0x20,0x7d,0x20,0x23,0x72,0x73,0x73,0x69,0x42,0x61,0x72,0x20,0x7b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x30,0x30,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x35,0x70,0x78,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x66,0x66,0x66,0x3b,0x20,0x7d,0x20,0x23,0x72,0x73,0x73,0x69,0x42,0x61,0x72,0x20,0x3e,0x20,0x64,0x69,0x76,0x20,0x7b,0x20,0x77,0x69,0x64,0x74,0x68,0x3a,0x20,0x35,0x32,0x70,0x78,0x3b,0x20,0x68,0x65,0x69,0x67,0x68,0x74,0x3a,0x20,0x31,0x35,0x70,0x78,0x3b,0x20,0x62,0x61,0x63,0x6b,0x67,0x72,0x6f,0x75,0x6e,0x64,0x3a,0x20,0x23,0x63,0x32,0x30,0x30,0x30,0x30,0x3b,0x20,0x7d,0x20,0x23,0x77,0x70,0x61,0x5f,0x69,0x6e,0x66,0x6f,0x20,0x7b,0x20,0x70,0x61,0x64,0x64,0x69,0x6e,0x67,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x30,0x2e,0x33,0x34,0x65,0x6d,0x3b,0x20,0x7d,0x20,0x23,0x73,0x61,0x76,0x65,0x64,0x20,0x7b,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x3a,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x3b,0x20,0x6d,0x61,0x72,0x67,0x69,0x6e,0x2d,0x6c,0x65,0x66,0x74,0x3a,0x20,0x32,0x30,0x70,0x78,0x3b,0x20,0x7d}; const static uint8_t data_manifest[] PROGMEM = {0x7b,0x20,0x22,0x73,0x69,0x74,0x65,0x73,0x22,0x3a,0x5b,0x20,0x22,0x65,0x72,0x72,0x6f,0x72,0x34,0x30,0x34,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x2c,0x20,0x22,0x73,0x74,0x79,0x6c,0x65,0x2e,0x63,0x73,0x73,0x22,0x2c,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x6a,0x73,0x22,0x2c,0x20,0x22,0x69,0x6e,0x64,0x65,0x78,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x2c,0x20,0x22,0x63,0x6c,0x69,0x65,0x6e,0x74,0x73,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x2c,0x20,0x22,0x61,0x74,0x74,0x61,0x63,0x6b,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x2c,0x20,0x22,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x73,0x2e,0x68,0x74,0x6d,0x6c,0x22,0x20,0x5d,0x2c,0x20,0x22,0x6a,0x73,0x6f,0x6e,0x22,0x3a,0x5b,0x20,0x22,0x41,0x50,0x53,0x63,0x61,0x6e,0x52,0x65,0x73,0x75,0x6c,0x74,0x73,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x43,0x6c,0x69,0x65,0x6e,0x74,0x53,0x63,0x61,0x6e,0x52,0x65,0x73,0x75,0x6c,0x74,0x73,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x73,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x61,0x74,0x74,0x61,0x63,0x6b,0x49,0x6e,0x66,0x6f,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x20,0x5d,0x2c,0x20,0x22,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x22,0x3a,0x5b,0x20,0x22,0x41,0x50,0x53,0x63,0x61,0x6e,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x41,0x50,0x53,0x65,0x6c,0x65,0x63,0x74,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x43,0x6c,0x69,0x65,0x6e,0x74,0x53,0x63,0x61,0x6e,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x43,0x6c,0x69,0x65,0x6e,0x74,0x53,0x63,0x61,0x6e,0x54,0x69,0x6d,0x65,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x63,0x6c,0x69,0x65,0x6e,0x74,0x53,0x65,0x6c,0x65,0x63,0x74,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x65,0x74,0x4e,0x61,0x6d,0x65,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x61,0x74,0x74,0x61,0x63,0x6b,0x53,0x74,0x61,0x72,0x74,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x73,0x53,0x61,0x76,0x65,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x73,0x52,0x65,0x73,0x65,0x74,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x64,0x65,0x6c,0x65,0x74,0x65,0x4e,0x61,0x6d,0x65,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x63,0x6c,0x65,0x61,0x72,0x4e,0x61,0x6d,0x65,0x4c,0x69,0x73,0x74,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x65,0x64,0x69,0x74,0x4e,0x61,0x6d,0x65,0x4c,0x69,0x73,0x74,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x61,0x64,0x64,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x63,0x6c,0x6f,0x6e,0x65,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x64,0x65,0x6c,0x65,0x74,0x65,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x63,0x6c,0x65,0x61,0x72,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x72,0x65,0x73,0x65,0x74,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x61,0x76,0x65,0x53,0x53,0x49,0x44,0x2e,0x6a,0x73,0x6f,0x6e,0x22,0x20,0x5d,0x20,0x7d}; - +/* + sendHeader must be called first, then copy every string (or substring, when generating json files) + with sendToBuffer and if everything is done call sendBuffer. +*/ void sendBuffer(){ if(bufc > 0){ server.sendContent_P(data_websiteBuffer, bufc); diff --git a/esp8266_deauther/esp8266_deauther.ino b/esp8266_deauther/esp8266_deauther.ino index ab32a72..b5d3beb 100644 --- a/esp8266_deauther/esp8266_deauther.ino +++ b/esp8266_deauther/esp8266_deauther.ino @@ -177,7 +177,7 @@ void restartESP() { //==========Settings========== void getSettings() { - server.send ( 200, "text/json", settings.get() ); + settings.send(); } void saveSettings() {