Updated copyright in code

This commit is contained in:
Spacehuhn 2021-01-11 18:14:55 +01:00
parent d95d7c7aa7
commit d01bd2bfc4
29 changed files with 172 additions and 186 deletions

View File

@ -1,5 +1,6 @@
#ifndef config_h
#define config_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#define ENABLE_DEBUG
#define DEBUG_PORT Serial
@ -700,5 +701,3 @@
#if LED_MODE_BRIGHTNESS == 0
#error LED_MODE_BRIGHTNESS must not be zero!
#endif /* if LED_MODE_BRIGHTNESS == 0 */
#endif /* ifndef config_h */

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "Accesspoints.h"
Accesspoints::Accesspoints() {
@ -170,6 +172,7 @@ String Accesspoints::getMacStr(int num) {
if (!check(num)) return String();
uint8_t* mac = getMac(num);
return bytesToStr(mac, 6);
}

View File

@ -1,5 +1,6 @@
#ifndef Accesspoints_h
#define Accesspoints_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
#include <ESP8266WiFi.h>
@ -77,5 +78,3 @@ class Accesspoints {
void internal_deselect(int num);
void internal_remove(int num);
};
#endif // ifndef Accesspoints_h

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "Attack.h"
#include "settings.h"
@ -305,6 +307,7 @@ bool Attack::deauthDevice(uint8_t* apMac, uint8_t* stMac, uint8_t reason, uint8_
// send disassociate frame
uint8_t disassocpkt[packetSize];
memcpy(disassocpkt, deauthpkt, packetSize);
disassocpkt[0] = 0xa0;
@ -372,6 +375,7 @@ bool Attack::sendBeacon(uint8_t* mac, const char* ssid, uint8_t ch, bool wpa2) {
// =====
uint16_t tmpPacketSize = (packetSize - 32) + ssidLen; // calc size
uint8_t* tmpPacket = new uint8_t[tmpPacketSize]; // create packet buffer
memcpy(&tmpPacket[0], &beaconPacket[0], 38 + ssidLen); // copy first half of packet into buffer
tmpPacket[37] = ssidLen; // update SSID length byte
memcpy(&tmpPacket[38 + ssidLen], &beaconPacket[70], wpa2 ? 39 : 13); // copy second half of packet into buffer

View File

@ -1,5 +1,6 @@
#ifndef Attack_h
#define Attack_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
#include <ESP8266WiFi.h>
@ -201,5 +202,3 @@ class Attack {
/* 107 - 108 */ 0x00, 0x00
};
};
#endif // ifndef Attack_h

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "CLI.h"
#include <LittleFS.h>

View File

@ -1,5 +1,6 @@
#ifndef CLI_h
#define CLI_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
#include <ESP8266WiFi.h>
@ -86,5 +87,3 @@ class CLI {
uint32_t getTime(String time);
bool eqlsCMD(int i, const char* keyword);
};
#endif // ifndef CLI_h

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "DisplayUI.h"
#include "settings.h"

View File

@ -1,5 +1,6 @@
#ifndef DisplayUI_h
#define DisplayUI_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "language.h"
#include "A_config.h"
@ -665,5 +666,3 @@ const uint8_t DejaVu_Sans_Mono_12[] PROGMEM = {
0x00, 0x00, 0xFC, 0x7F, 0x20, 0x08, 0x20, 0x08, 0x20, 0x08, 0xC0, 0x07, // 254
0x00, 0x00, 0x60, 0x40, 0x88, 0x67, 0x00, 0x1C, 0x88, 0x03, 0x60 // 255
};
#endif // ifndef DisplayUI_h

View File

@ -1,5 +1,6 @@
#ifndef EEPROMHELPER_H
#define EEPROMHELPER_H
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
// ========== Includes ========== //
#include <EEPROM.h>
@ -59,5 +60,3 @@ class EEPROMHelper {
EEPROM.commit();
}
};
#endif /* ifndef EEPROMHELPER_H */

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "Names.h"
#include <LittleFS.h>
@ -258,6 +260,7 @@ void Names::setMac(int num, String macStr) {
if (!check(num)) return;
uint8_t mac[6];
strToMac(macStr, mac);
internal_add(mac, getName(num), getBssid(num), getCh(num), getSelected(num));
prntln(N_CHANGED_MAC);
@ -280,6 +283,7 @@ void Names::setBSSID(int num, String bssidStr) {
if (!check(num)) return;
uint8_t mac[6];
strToMac(bssidStr, mac);
internal_add(getMac(num), getName(num), mac, getCh(num), getSelected(num));
prntln(N_CHANGED_BSSID);
@ -362,6 +366,7 @@ String Names::getMacStr(int num) {
if (!check(num)) return String();
uint8_t* mac = getMac(num);
return bytesToStr(mac, 6);
}
@ -471,6 +476,7 @@ void Names::internal_add(uint8_t* mac, String name, uint8_t* bssid, uint8_t ch,
if ((ch < 1) || (ch > 14)) ch = 1;
Device newDevice;
newDevice.mac = deviceMac;
newDevice.name = deviceName;
newDevice.apBssid = deviceBssid;

View File

@ -1,5 +1,6 @@
#ifndef Names_h
#define Names_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include <ESP8266WiFi.h>
extern "C" {
@ -98,5 +99,3 @@ class Names {
void internal_remove(int num);
void internal_removeAll();
};
#endif // ifndef Names_h

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "SSIDs.h"
#include <LittleFS.h>
@ -42,6 +44,7 @@ void SSIDs::save(bool force) {
if (!force && !changed) return;
String buf = String(); // create buffer
buf += String(OPEN_CURLY_BRACKET) + String(DOUBLEQUOTES) + str(SS_JSON_RANDOM) + String(DOUBLEQUOTES) + String(
DOUBLEPOINT) + b2s(randomMode) + String(COMMA); // {"random":false,
buf += String(DOUBLEQUOTES) + str(SS_JSON_SSIDS) + String(DOUBLEQUOTES) + String(DOUBLEPOINT) +
@ -233,6 +236,7 @@ void SSIDs::replace(int num, String name, bool wpa2) {
if (len > 32) len = 32;
SSID newSSID;
newSSID.name = randomize(name);
newSSID.wpa2 = wpa2;
newSSID.len = (uint8_t)len;
@ -301,6 +305,7 @@ void SSIDs::internal_add(String name, bool wpa2, int len) {
name = fixUtf8(name);
SSID newSSID;
newSSID.name = name;
newSSID.wpa2 = wpa2;
newSSID.len = (uint8_t)len;

View File

@ -1,5 +1,6 @@
#ifndef SSIDs_h
#define SSIDs_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
#include <ESP8266WiFi.h>
@ -81,5 +82,3 @@ class SSIDs {
void internal_remove(int num);
void internal_removeAll();
};
#endif // ifndef SSIDs_h

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "Scan.h"
#include "settings.h"

View File

@ -1,5 +1,6 @@
#ifndef Scan_h
#define Scan_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
#include "Accesspoints.h"
@ -91,5 +92,3 @@ class Scan {
String FILE_PATH = "/scan.json";
};
#endif // ifndef Scan_h

View File

@ -1,12 +1,6 @@
#ifndef SimpleList_h
#define SimpleList_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
/*
===========================================
Copyright (c) 2018 Stefan Kremser
github.com/spacehuhn
===========================================
*/
#pragma once
#include <type_traits>
#include <cstddef>
@ -166,6 +160,7 @@ void SimpleList<T>::add(int index, T obj) {
}
SimpleListNode<T>* newNode = new SimpleListNode<T>();
newNode->data = obj;
if (index == 0) {
@ -191,6 +186,7 @@ void SimpleList<T>::insert(T obj) {
// create new node
SimpleListNode<T>* newNode = new SimpleListNode<T>();
newNode->data = obj;
if (listSize == 0) {
@ -517,5 +513,3 @@ void SimpleList<T>::sort() {
this->sorted = true;
}
#endif // ifndef SimpleList_h

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "Stations.h"
Stations::Stations() {
@ -133,6 +135,7 @@ String Stations::getAPMacStr(int num) {
if (!check(num)) return String();
uint8_t* mac = getAPMac(num);
return bytesToStr(mac, 6);
}
@ -164,6 +167,7 @@ String Stations::getMacStr(int num) {
if (!check(num)) return String();
uint8_t* mac = getMac(num);
return bytesToStr(mac, 6);
}
@ -342,6 +346,7 @@ void Stations::internal_add(uint8_t* mac, int accesspointNum) {
if (count() >= STATION_LIST_SIZE) removeOldest();
Station newStation;
newStation.ap = accesspointNum;
newStation.ch = wifi_channel;
newStation.mac = (uint8_t*)malloc(6);

View File

@ -1,5 +1,6 @@
#ifndef Stations_h
#define Stations_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
extern "C" {
@ -94,5 +95,3 @@ class Stations {
void internal_remove(int num);
void internal_removeAll();
};
#endif // ifndef Stations_h

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once

View File

@ -1,9 +1,7 @@
/*
===========================================
Copyright (c) 2018 Stefan Kremser
github.com/spacehuhn
===========================================
*/
/* =====================
This software is licensed under the MIT License:
https://github.com/spacehuhntech/esp8266_deauther
===================== */
extern "C" {
// Please follow this tutorial:

View File

@ -1,5 +1,6 @@
#ifndef functions_h
#define functions_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
#include <LittleFS.h>
@ -828,5 +829,3 @@ String formatBytes(size_t bytes) {
else if (bytes < (1024 * 1024 * 1024)) return String(bytes / 1024.0 / 1024.0) + "MB";
else return String(bytes / 1024.0 / 1024.0 / 1024.0) + "GB";
}
#endif // ifndef functions_h

View File

@ -1,5 +1,6 @@
#ifndef language_h
#define language_h
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once
#include "Arduino.h"
@ -620,4 +621,3 @@ const char S_JSON_LEDENABLED[] PROGMEM = "led";
// Display
const char S_JSON_DISPLAYINTERFACE[] PROGMEM = "display";
const char S_JSON_DISPLAY_TIMEOUT[] PROGMEM = "displayTimeout";
#endif // ifndef language_h

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "led.h"

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "settings.h"
@ -114,6 +110,7 @@ namespace settings {
// read data from eeproms
settings_t newData;
EEPROMHelper::getObject(SETTINGS_ADDR, newData);
// calc and check hash
@ -126,6 +123,7 @@ namespace settings {
save();
} else {
debuglnF("Invalid Hash");
/*debug(data.magic_num);
debugF(" != ");
debugln(MAGIC_NUM);*/
@ -167,6 +165,7 @@ namespace settings {
strncpy(data.ap.password, AP_PASSWD, 64);
data.ap.hidden = AP_HIDDEN;
uint8_t ip[4] = AP_IP_ADDR;
memcpy(data.ap.ip, ip, 4);
data.web.enabled = WEB_ENABLED;
@ -208,6 +207,7 @@ namespace settings {
void print() {
String json_buffer;
get_json(json_buffer);
json_buffer.replace("\":", ": ");

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#include "wifi.h"

View File

@ -1,8 +1,4 @@
/*
Copyright (c) 2020 Stefan Kremser (@Spacehuhn)
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/esp8266_deauther
*/
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
#pragma once