Merge branch 'testing'

This commit is contained in:
Stefan Kremser
2017-08-08 08:42:47 +02:00
37 changed files with 895 additions and 1162 deletions

View File

@@ -1,163 +0,0 @@
Copyright (c) 2017 Stefan Kremser
Referring to this project as "jammer" is prohibited! Name the project by its correct name.
# Attribution-NonCommercial 4.0 International
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
### Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensors permission is not necessary for any reasonfor example, because of any applicable exception or limitation to copyrightthen that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
## Creative Commons Attribution-NonCommercial 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
### Section 1 Definitions.
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
### Section 2 Scope.
a. ___License grant.___
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. __Term.__ The term of this Public License is specified in Section 6(a).
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. __Downstream recipients.__
A. __Offer from the Licensor Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. ___Other rights.___
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
### Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. ___Attribution.___
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
### Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
### Section 5 Disclaimer of Warranties and Limitation of Liability.
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
### Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
### Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
### Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
>
> Creative Commons may be contacted at creativecommons.org

View File

@@ -77,12 +77,15 @@ Please don't refer to this project as "jammer", that totaly underminds the real
**You can flash this software yourself onto any ESP8266**, but if you would like to support me, you can get one of these cool boards that are made especially for this project and come with everything preinstalled!
- WiFi Deauther (Pocket WiFi)
- WiFi Deauther v1.5
- [AliExpress](https://goo.gl/JAXhTg)
- [tindie](https://goo.gl/yMiuGH)
- WiFi Deauther OLED (Pocket WiFi)
- WiFi Deauther OLED v1.5
- [AliExpress](https://goo.gl/P30vNz)
- [tindie](https://goo.gl/GGH7x8)
- WiFi Deauther OLED v2
- [AliExpress](https://goo.gl/UK87iU)
- [tindie](https://goo.gl/PMDYn4)
## Installation
@@ -264,7 +267,7 @@ ESP8266:
packet injection with ESP8266:
* http://hackaday.com/2016/01/14/inject-packets-with-an-esp8266/
* http://bbs.espressif.com/viewtopic.php?f=7&t=1357&p=10205&hilit=Wi-Fi_pkt_freedom#p10205
* http://bbs.espressif.com/viewtopic.php?f=7&t=1357
* https://github.com/pulkin/esp8266-injection-example
802.11w-2009: https://en.wikipedia.org/wiki/IEEE_802.11w-2009

View File

@@ -10,10 +10,17 @@ bool APScan::start() {
Serial.println("MAC - Ch - RSSI - Encrypt. - SSID - Hidden");// - Vendor");
}
aps._clear();
for (int i = 0; i < maxAPScanResults; i++) selected[i] = false;
results = 0;
for (int i = 0; i < maxAPScanResults; i++){
selected[i] = false;
String("").toCharArray(names[i], 33);
}
results = WiFi.scanNetworks(false, settings.apScanHidden); // lets scanNetworks return hidden APs. (async = false & show_hidden = true)
if(results > maxAPScanResults) results = maxAPScanResults;
for (int i = 0; i < results && i < maxAPScanResults; i++) {
if (debug) Serial.println("Scan results: "+(String)results);
for (int i = 0; i < results; i++) {
Mac _ap;
_ap.set(WiFi.BSSID(i)[0], WiFi.BSSID(i)[1], WiFi.BSSID(i)[2], WiFi.BSSID(i)[3], WiFi.BSSID(i)[4], WiFi.BSSID(i)[5]);
aps.add(_ap);
@@ -112,9 +119,6 @@ String APScan::getAPEncryption(int num) {
String APScan::getAPMac(int num) {
return aps._get(num).toString();
}
bool APScan::getAPSelected(int num) {
return selected[num];
}
bool APScan::isHidden(int num) {
return hidden[num];
}
@@ -178,7 +182,7 @@ void APScan::sendResults() {
json += "\"r\":" + (String)getAPRSSI(i) + ",";
json += "\"e\":" + (String)encryption[i] + ",";
//json += "\"v\":\""+getAPVendor(i)+"\",";
json += "\"se\":" + (String)getAPSelected(i);
json += "\"se\":" + (String)isSelected(i);
json += "}";
if ((i != results - 1) && (i != maxAPScanResults - 1)) json += ",";
@@ -211,7 +215,7 @@ String APScan::getResultsJSON() {
json += "\"r\":" + (String)getAPRSSI(i) + ",";
json += "\"e\":" + (String)encryption[i] + ",";
//json += "\"v\":\""+getAPVendor(i)+"\",";
json += "\"se\":" + (String)getAPSelected(i);
json += "\"se\":" + (String)isSelected(i);
json += "}";
if ((i != results - 1) && (i != maxAPScanResults - 1)) json += ",";
}

View File

@@ -32,7 +32,6 @@ class APScan {
String getAPEncryption(int num);
//String getAPVendor(int num);
String getAPMac(int num);
bool getAPSelected(int num);
bool isHidden(int num);
int getAPRSSI(int num);
int getAPChannel(int num);
@@ -57,4 +56,4 @@ class APScan {
};
#endif
#endif

View File

@@ -1,7 +1,6 @@
#include "Attack.h"
Attack::Attack() {
randomSeed(os_random());
}
void Attack::generate() {
@@ -13,8 +12,7 @@ void Attack::generate() {
for (int i = 0; i < macListLen; i++) channels[i] = random(1, maxChannel);
do {
getRandomVendorMac(_randomMacBuffer);
for (int i = 0; i < 6; i++) _randomBeaconMac.setAt(_randomMacBuffer[i], i);
_randomBeaconMac.randomize();
} while (beaconAdrs.add(_randomBeaconMac) >= 0);
if (debug) Serial.println("done");
@@ -162,7 +160,7 @@ void Attack::run() {
if (apScan.isSelected(a)) {
Mac _ap;
int _ch = apScan.getAPChannel(a);
_ap.setMac(apScan.aps._get(a));
_ap.set(apScan.aps._get(a));
wifi_set_channel(_ch);
@@ -213,11 +211,7 @@ void Attack::run() {
prevTime[1] = millis();
for (int a = 0; a < ssidList.len; a++) {
String _ssid = ssidList.get(a);
int _ch = channels[a];
buildBeacon(beaconAdrs._get(a), _ssid, _ch, settings.attackEncrypted);
buildBeacon(beaconAdrs._get(a), ssidList.get(a), channels[a], ssidList.isEncrypted(a));
if (send()) packetsCounter[1]++;
}
@@ -287,7 +281,8 @@ void Attack::start(int num) {
attackTimeoutCounter[num] = 0;
refreshLed();
if (debug) Serial.println("starting " + (String)attackNames[num] + " attack...");
if (num == 0) attackMode = "STOP";
if (num == 0) attackMode_deauth = "STOP";
else if(num == 1) attackMode_beacon = "STOP";
if(!settings.multiAttacks){
for (int i = 0; i < attacksNum; i++){
if(i != num) stop(i);
@@ -299,7 +294,8 @@ void Attack::start(int num) {
void Attack::stop(int num) {
if(isRunning[num]) {
if (debug) Serial.println("stopping " + (String)attackNames[num] + " attack...");
if (num == 0) attackMode = "START";
if (num == 0) attackMode_deauth = "START";
else if(num == 1) attackMode_beacon = "START";
isRunning[num] = false;
prevTime[num] = millis();
refreshLed();
@@ -317,7 +313,7 @@ void Attack::_log(int num){
for(int a=0;a<apScan.results;a++){
if(apScan.isSelected(a)){
Mac _ap;
_ap.setMac(apScan.aps._get(a));
_ap.set(apScan.aps._get(a));
addLog(_ap.toString());
}
}
@@ -378,7 +374,11 @@ size_t Attack::getSize(){
json = "\"ssid\":[";
jsonSize += json.length();
for (int i = 0; i < ssidList.len; i++) {
json = "\"" + ssidList.get(i) + "\"";
json = "[";
json += "\"" + ssidList.get(i) + "\",";
json += String( ssidList.isEncrypted(i) ) + "";
Serial.print(ssidList.isEncrypted(i));
json += "]";
if (i != ssidList.len - 1) json += ",";
jsonSize += json.length();
}
@@ -439,7 +439,10 @@ void Attack::sendResults(){
json = "\"ssid\":[";
sendToBuffer(json);
for (int i = 0; i < ssidList.len; i++) {
json = "\"" + ssidList.get(i) + "\"";
json = "[";
json += "\"" + ssidList.get(i) + "\",";
json += (String)ssidList.isEncrypted(i) + "";
json += "]";
if (i != ssidList.len - 1) json += ",";
sendToBuffer(json);
}
@@ -463,11 +466,11 @@ void Attack::refreshLed() {
}
if (numberRunning >= 1 && settings.useLed) {
if (debug) Serial.println("Attack LED : ON");
digitalWrite(settings.ledPin, LOW);
digitalWrite(settings.ledPin, !settings.pinStateOff);
}
else if (numberRunning == 0 || !settings.useLed) {
if (debug) Serial.println("Attack LED : OFF");
digitalWrite(settings.ledPin, HIGH);
digitalWrite(settings.ledPin, settings.pinStateOff);
}
}

View File

@@ -26,7 +26,8 @@ extern const bool debug;
extern void addLog(String str);
extern void openLog();
extern void closeLog();
extern String attackMode;
extern String attackMode_deauth;
extern String attackMode_beacon;
extern APScan apScan;
extern ClientScan clientScan;

View File

@@ -15,16 +15,22 @@ void Mac::set(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth, uint
adress[5] = sixth;
}
void Mac::setAt(uint8_t first, int num) {
if (num > -1 && num < 6) adress[num] = first;
void Mac::set(uint8_t* mac) {
for(int i=0; i<6 || i<sizeof(mac); i++){
adress[i] = mac[i];
}
}
void Mac::setMac(Mac adr) {
void Mac::set(Mac adr) {
for (int i = 0; i < 6; i++) {
adress[i] = adr._get(i);
}
}
void Mac::setAt(uint8_t first, int num) {
if (num > -1 && num < 6) adress[num] = first;
}
bool Mac::valid() {
for (int i = 0; i < 6; i++) {
if (adress[i] != 0xFF && adress[i] != 0x00) return true;
@@ -52,6 +58,10 @@ void Mac::_println() {
Serial.println(Mac::toString());
}
uint8_t* Mac::_get() {
return adress;
}
uint8_t Mac::_get(int num) {
return adress[num];
}
@@ -63,4 +73,10 @@ bool Mac::compare(Mac target) {
return true;
}
void Mac::randomize() {
uint8_t randomMac[6];
getRandomVendorMac(randomMac);
this->set(randomMac);
}

View File

@@ -3,19 +3,24 @@
#include <Arduino.h>
extern void getRandomVendorMac(uint8_t *buf);
class Mac
{
public:
Mac();
void set(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth, uint8_t fifth, uint8_t sixth);
void set(uint8_t* mac);
void set(Mac adr);
void setAt(uint8_t first, int num);
void setMac(Mac adr);
String toString();
void _print();
void _println();
uint8_t* _get();
uint8_t _get(int num);
bool compare(Mac target);
bool valid();
void randomize();
private:
uint8_t adress[6];
};

View File

@@ -14,7 +14,7 @@ bool MacList::contains(Mac adr) {
int MacList::add(Mac adr) {
if(num < len && adr.valid()) {
if (!contains(adr)) {
macAdrs[num].setMac(adr);
macAdrs[num].set(adr);
num++;
return num - 1;
}
@@ -58,6 +58,6 @@ void MacList::remove(Mac adr) {
}
void MacList::set(int num, Mac adr) {
macAdrs[num].setMac(adr);
macAdrs[num].set(adr);
}

View File

@@ -15,6 +15,7 @@ void SSIDList::load() {
char _nextChar = EEPROM.read(listAdr + (i * SSIDLength) + h);
names[i][h] = _nextChar;
}
encrypted[i] = EEPROM.read(encAdr + i);
}
}
@@ -22,17 +23,18 @@ void SSIDList::clear() {
len = 0;
}
void SSIDList::add(String name) {
void SSIDList::add(String name, bool enc) {
if (len < SSIDListLength) {
for (int i = 0; i < SSIDLength; i++) {
if (i < name.length()) names[len][i] = name[i];
else names[len][i] = 0x00;
}
encrypted[len] = enc;
len++;
}
}
void SSIDList::addClone(String name, int num) {
void SSIDList::addClone(String name, int num, bool enc) {
int _restSSIDLen = SSIDLength - name.length();
String _apName;
@@ -52,14 +54,7 @@ void SSIDList::addClone(String name, int num) {
for (int d = 0; d < _restSSIDLen - 2; d++) _apName += " ";
_apName += (String)c;//e.g. "SAMPLEAP 78"
}
add(_apName);
}
}
void SSIDList::edit(int num, String name) {
for (int i = 0; i < SSIDLength; i++) {
if (i < name.length()) names[num][i] = name[i];
else names[num][i] = 0x00;
add(_apName, enc);
}
}
@@ -71,12 +66,17 @@ String SSIDList::get(int num) {
return _name;
}
bool SSIDList::isEncrypted(int num){
return encrypted[num];
}
void SSIDList::remove(int num) {
if (num >= 0 && num < len) {
for (int i = num; i < len - 1; i++) {
for (int h = 0; h < SSIDLength; h++) {
names[i][h] = names[i + 1][h];
}
encrypted[i] = encrypted[i + 1];
}
len--;
}
@@ -89,6 +89,7 @@ void SSIDList::save() {
for (int h = 0; h < SSIDLength; h++) {
EEPROM.write(listAdr + (i * SSIDLength) + h, names[i][h]);
}
EEPROM.write(encAdr + i, encrypted[i]);
}
EEPROM.commit();
if (debug) Serial.println("done");
@@ -99,7 +100,7 @@ void SSIDList::_random() {
for (int i = len; i < SSIDListLength; i++) {
_rName = "";
for (int h = 0; h < SSIDLength; h++) _rName += letters[random(0, sizeof(letters))];
add(_rName);
add(_rName, random(2) > 0.5 );
}
}

View File

@@ -7,6 +7,7 @@
#define listAdr 2048
#define lenAdr 2047
#define encAdr 3585
#define SSIDListLength 48
#define SSIDLength 32
@@ -19,10 +20,11 @@ class SSIDList
void load();
void clear();
void add(String name);
void addClone(String name, int num);
void add(String name, bool enc);
void addClone(String name, int num, bool enc);
void edit(int num, String name);
String get(int num);
bool isEncrypted(int num);
void remove(int num);
void _random();
void save();
@@ -31,6 +33,7 @@ class SSIDList
char letters[67] = {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x20, 0x2c, 0x2e, 0x2d, 0x5f};
char names[SSIDListLength][SSIDLength];
bool encrypted[SSIDListLength];
};
#endif

View File

@@ -1,7 +1,44 @@
#include "Settings.h"
Settings::Settings() {
uint8_t tempMAC[6];
defaultMacAP.set(WiFi.softAPmacAddress(tempMAC));
if(!defaultMacAP.valid()) defaultMacAP.randomize();
}
void Settings::syncMacInterface(){
if(debug) Serial.println("Trying to sync the MAC addr with settings");
if(isSettingsLoaded){
Mac macToSync;
if(isMacAPRand){
macToSync.randomize();
wifi_set_macaddr(SOFTAP_IF, macToSync._get());
if(debug) Serial.println("Synced with a random mac addr : " + macToSync.toString());
}else if(macAP.valid()){
macToSync = macAP;
wifi_set_macaddr(SOFTAP_IF, macToSync._get());
if(debug) Serial.println("Synced with saved mac addr : " + macToSync.toString());
}else{
if(debug) Serial.println("Could not sync because of invalid settings !");
}
}else{
if(debug) Serial.println("Could not sync because settings are not loaded !");
}
}
void Settings::setLedPin(int newLedPin){
prevLedPin = ledPin;
if(newLedPin > 0 && newLedPin != prevLedPin){
ledPin = newLedPin;
pinMode(ledPin, OUTPUT);
if(!prevLedPin == 0){
digitalWrite(ledPin, digitalRead(prevLedPin));
digitalWrite(prevLedPin, pinStateOff);
pinMode(prevLedPin, INPUT);
}else{
digitalWrite(ledPin, pinStateOff);
}
}
}
void Settings::load() {
@@ -31,6 +68,11 @@ void Settings::load() {
} else {
apChannel = 1;
}
for(int i=0; i<6; i++){
macAP.setAt((uint8_t)EEPROM.read(macAPAdr+i),i);
}
if(!macAP.valid()) macAP.set(defaultMacAP);
isMacAPRand = (bool)EEPROM.read(isMacAPRandAdr);
apScanHidden = (bool)EEPROM.read(apScanHiddenAdr);
@@ -38,14 +80,14 @@ void Settings::load() {
attackTimeout = eepromReadInt(attackTimeoutAdr);
attackPacketRate = EEPROM.read(attackPacketRateAdr);
clientScanTime = EEPROM.read(clientScanTimeAdr);
attackEncrypted = (bool)EEPROM.read(attackEncryptedAdr);
useLed = (bool)EEPROM.read(useLedAdr);
channelHop = (bool)EEPROM.read(channelHopAdr);
multiAPs = (bool)EEPROM.read(multiAPsAdr);
multiAttacks = (bool)EEPROM.read(multiAttacksAdr);
macInterval = eepromReadInt(macIntervalAdr);
beaconInterval = (bool)EEPROM.read(beaconIntervalAdr);
ledPin = (int)EEPROM.read(ledPinAdr);
setLedPin((int)EEPROM.read(ledPinAdr));
isSettingsLoaded = 1;
}
void Settings::reset() {
@@ -58,6 +100,8 @@ void Settings::reset() {
ssidLen = ssid.length();
passwordLen = password.length();
macAP = defaultMacAP;
isMacAPRand = 0;
apScanHidden = true;
@@ -65,7 +109,6 @@ void Settings::reset() {
attackTimeout = 5 * 60;
attackPacketRate = 10;
clientScanTime = 15;
attackEncrypted = false;
useLed = true;
channelHop = false;
multiAPs = false;
@@ -91,6 +134,12 @@ void Settings::save() {
EEPROM.write(ssidHiddenAdr, ssidHidden);
EEPROM.write(apChannelAdr, apChannel);
EEPROM.write(isMacAPRandAdr, isMacAPRand);
for(int i=0; i<6; i++){
EEPROM.write(macAPAdr+i, macAP._get(i));
}
EEPROM.write(apScanHiddenAdr, apScanHidden);
EEPROM.write(deauthReasonAdr, deauthReason);
@@ -99,7 +148,6 @@ void Settings::save() {
EEPROM.write(attackPacketRateAdr, attackPacketRate);
EEPROM.write(clientScanTimeAdr, clientScanTime);
EEPROM.write(attackEncryptedAdr, attackEncrypted);
EEPROM.write(useLedAdr, useLed);
EEPROM.write(channelHopAdr, channelHop);
EEPROM.write(multiAPsAdr, multiAPs);
@@ -124,12 +172,14 @@ void Settings::info() {
Serial.println("password: " + password);
Serial.println("password length: " + (String)passwordLen);
Serial.println("channel: " + (String)apChannel);
Serial.println("Default MAC AP: " + defaultMacAP.toString());
Serial.println("Saved MAC AP: " + macAP.toString());
Serial.println("MAC AP random: " + (String)isMacAPRand);
Serial.println("Scan hidden APs: " + (String)apScanHidden);
Serial.println("deauth reson: " + (String)(int)deauthReason);
Serial.println("attack timeout: " + (String)attackTimeout);
Serial.println("attack packet rate: " + (String)attackPacketRate);
Serial.println("client scan time: " + (String)clientScanTime);
Serial.println("attack SSID encrypted: " + (String)attackEncrypted);
Serial.println("use built-in LED: " + (String)useLed);
Serial.println("channel hopping: " + (String)channelHop);
Serial.println("multiple APs: " + (String)multiAPs);
@@ -147,12 +197,13 @@ size_t Settings::getSize() {
json += "\"ssidHidden\":" + (String)ssidHidden + ",";
json += "\"password\":\"" + password + "\",";
json += "\"apChannel\":" + (String)apChannel + ",";
json += "\"macAp\":\"" + macAP.toString() + "\",";
json += "\"randMacAp\":" + (String)isMacAPRand + ",";
json += "\"apScanHidden\":" + (String)apScanHidden + ",";
json += "\"deauthReason\":" + (String)(int)deauthReason + ",";
json += "\"attackTimeout\":" + (String)attackTimeout + ",";
json += "\"attackPacketRate\":" + (String)attackPacketRate + ",";
json += "\"clientScanTime\":" + (String)clientScanTime + ",";
json += "\"attackEncrypted\":" + (String)attackEncrypted + ",";
json += "\"useLed\":" + (String)useLed + ",";
json += "\"channelHop\":" + (String)channelHop + ",";
json += "\"multiAPs\":" + (String)multiAPs + ",";
@@ -174,12 +225,13 @@ void Settings::send() {
json += "\"ssidHidden\":" + (String)ssidHidden + ",";
json += "\"password\":\"" + password + "\",";
json += "\"apChannel\":" + (String)apChannel + ",";
json += "\"macAp\":\"" + macAP.toString() + "\",";
json += "\"randMacAp\":" + (String)isMacAPRand + ",";
json += "\"apScanHidden\":" + (String)apScanHidden + ",";
json += "\"deauthReason\":" + (String)(int)deauthReason + ",";
json += "\"attackTimeout\":" + (String)attackTimeout + ",";
json += "\"attackPacketRate\":" + (String)attackPacketRate + ",";
json += "\"clientScanTime\":" + (String)clientScanTime + ",";
json += "\"attackEncrypted\":" + (String)attackEncrypted + ",";
json += "\"useLed\":" + (String)useLed + ",";
json += "\"channelHop\":" + (String)channelHop + ",";
json += "\"multiAPs\":" + (String)multiAPs + ",";

View File

@@ -8,6 +8,10 @@
#include "MacList.h"
#include "NameList.h"
extern "C" {
#include "user_interface.h"
}
extern void sendBuffer();
extern void sendToBuffer(String str);
extern void sendHeader(int code, String type, size_t _size);
@@ -26,7 +30,7 @@ extern NameList nameList;
#define attackTimeoutAdr 1091
#define attackPacketRateAdr 1093
#define clientScanTimeAdr 1094
#define attackEncryptedAdr 1095
//#define attackEncryptedAdr 1095 <-- address is now free for another setting
#define ssidHiddenAdr 1096
#define apScanHiddenAdr 1097
#define apChannelAdr 1098
@@ -37,9 +41,11 @@ extern NameList nameList;
#define macIntervalAdr 1103
#define beaconIntervalAdr 1105
#define ledPinAdr 1106
#define macAPAdr 1107
#define isMacAPRandAdr 1113
#define checkNumAdr 2001
#define checkNum 15
#define checkNum 16
class Settings
{
@@ -62,14 +68,21 @@ class Settings
unsigned int attackTimeout;
int attackPacketRate;
int clientScanTime;
bool attackEncrypted;
bool useLed;
bool channelHop;
bool multiAPs;
bool multiAttacks;
int macInterval;
bool beaconInterval;
int ledPin;
int ledPin = 0;
int prevLedPin = 0;
Mac defaultMacAP;
Mac macAP;
bool isMacAPRand;
bool isSettingsLoaded = 0;
void syncMacInterface();
void setLedPin(int newLedPin);
bool pinStateOff = true; // When attack is off, pin state is HIGH
private:
size_t getSize();

File diff suppressed because one or more lines are too long

View File

@@ -5,22 +5,28 @@
===========================================
*/
// Including some libraries we need //
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <FS.h>
#define resetPin 4 /* <-- comment out or change if you need GPIO 4 for other purposes */
//#define USE_DISPLAY /* <-- uncomment that if you want to use the display */
//#define USE_LED16 /* <-- for the Pocket ESP8266 which has a LED on GPIO 16 to indicate if it's running */
// Settings //
//#define USE_DISPLAY /* <-- uncomment that if you want to use the display */
#define resetPin 4 /* <-- comment out or change if you need GPIO 4 for other purposes */
#define USE_LED16 /* <-- for the Pocket ESP8266 which has a LED on GPIO 16 to indicate if it's running */
// Including everything for the OLED //
#ifdef USE_DISPLAY
#include <Wire.h>
//include the library you need
#include "SSD1306.h"
//#include "SH1106.h"
#include "SH1106.h"
//create display(Adr, SDA-pin, SCL-pin)
SSD1306 display(0x3c, 5, 4); //GPIO 5 = D1, GPIO 4 = D2
@@ -36,23 +42,20 @@
#define fontSize 8
#define rowsPerSite 8
int rows = 3;
int rows = 4;
int curRow = 0;
int sites = 1;
int curSite = 1;
int lrow = 0;
int menu = 0; //0 = Main Menu, 1 = APs, 2 = Stations, 3 = Attacks, 4 = Monitor
bool canBtnPress = true;
int buttonPressed = 0; //0 = UP, 1 = DOWN, 2 = SELECT, 3 = DISPLAY
bool displayOn = true;
#endif
String wifiMode = "";
String attackMode = "";
String scanMode = "SCAN";
bool warning = true;
// More Includes! //
extern "C" {
#include "user_interface.h"
}
@@ -72,6 +75,14 @@ ESP8266WebServer server(80);
const bool debug = true;
/* ========== DEBUG ========== */
// Run-Time Variables //
String wifiMode = "";
String attackMode_deauth = "";
String attackMode_beacon = "";
String scanMode = "SCAN";
bool warning = true;
NameList nameList;
APScan apScan;
@@ -87,16 +98,18 @@ void sniffer(uint8_t *buf, uint16_t len) {
#ifdef USE_DISPLAY
void drawInterface() {
if(displayOn){
display.clear();
int _lrow = 0;
for (int i = curSite * rowsPerSite - rowsPerSite; i < curSite * rowsPerSite; i++) {
if (i == 0) display.drawString(3, i * fontSize, " --> WiFi " + wifiMode);
else if (i == 1) display.drawString(3, i * fontSize, " --> " + scanMode);
else if (i == 2) display.drawString(3, i * fontSize, " --> " + attackMode + " attack");
else if (i - 3 <= apScan.results) {
display.drawString(3, _lrow * fontSize, apScan.getAPName(i - 3));
if (apScan.getAPSelected(i - 3)) {
if (i == 0) display.drawString(3, i * fontSize, "-> WiFi " + wifiMode);
else if (i == 1) display.drawString(3, i * fontSize, "-> " + scanMode);
else if (i == 2) display.drawString(3, i * fontSize, "-> " + attackMode_deauth + " deauth");
else if (i == 3) display.drawString(3, i * fontSize, "-> " + attackMode_beacon + " beacon flood");
else if (i - 4 < apScan.results) {
display.drawString(4, _lrow * fontSize, apScan.getAPName(i - 4));
if (apScan.isSelected(i - 4)) {
display.drawVerticalLine(1, _lrow * fontSize, fontSize);
display.drawVerticalLine(2, _lrow * fontSize, fontSize);
}
@@ -143,7 +156,7 @@ void loadAPScanHTML() {
sendFile(200, "text/html", data_apscanHTML, sizeof(data_apscanHTML));
}
void loadStationsHTML() {
sendFile(200, "text/html", data_stationHTML, sizeof(data_stationHTML));
sendFile(200, "text/html", data_stationsHTML, sizeof(data_stationsHTML));
}
void loadAttackHTML() {
sendFile(200, "text/html", data_attackHTML, sizeof(data_attackHTML));
@@ -152,7 +165,7 @@ void loadSettingsHTML() {
sendFile(200, "text/html", data_settingsHTML, sizeof(data_settingsHTML));
}
void load404() {
sendFile(200, "text/html", data_error404, sizeof(data_error404));
sendFile(200, "text/html", data_errorHTML, sizeof(data_errorHTML));
}
void loadInfoHTML(){
sendFile(200, "text/html", data_infoHTML, sizeof(data_infoHTML));
@@ -162,20 +175,20 @@ void loadLicense(){
}
void loadFunctionsJS() {
sendFile(200, "text/javascript", data_functionsJS, sizeof(data_functionsJS));
sendFile(200, "text/javascript", data_js_functionsJS, sizeof(data_js_functionsJS));
}
void loadAPScanJS() {
sendFile(200, "text/javascript", data_apscanJS, sizeof(data_apscanJS));
sendFile(200, "text/javascript", data_js_apscanJS, sizeof(data_js_apscanJS));
}
void loadStationsJS() {
sendFile(200, "text/javascript", data_stationsJS, sizeof(data_stationsJS));
sendFile(200, "text/javascript", data_js_stationsJS, sizeof(data_js_stationsJS));
}
void loadAttackJS() {
attack.ssidChange = true;
sendFile(200, "text/javascript", data_attackJS, sizeof(data_attackJS));
sendFile(200, "text/javascript", data_js_attackJS, sizeof(data_js_attackJS));
}
void loadSettingsJS() {
sendFile(200, "text/javascript", data_settingsJS, sizeof(data_settingsJS));
sendFile(200, "text/javascript", data_js_settingsJS, sizeof(data_js_settingsJS));
}
void loadStyle() {
@@ -199,7 +212,7 @@ void startAPScan() {
#ifdef USE_DISPLAY
apScan.sort();
rows = 3;
rows = 4;
rows += apScan.results;
sites = rows / rowsPerSite;
if (rows % rowsPerSite > 0) sites++;
@@ -324,18 +337,32 @@ void startAttack() {
}
void addSSID() {
if(server.hasArg("ssid") && server.hasArg("num")){
if(server.hasArg("ssid") && server.hasArg("num") && server.hasArg("enc")){
int num = server.arg("num").toInt();
if(num > 0){
ssidList.addClone(server.arg("ssid"),num);
ssidList.addClone(server.arg("ssid"),num, server.arg("enc") == "true");
}else{
ssidList.add(server.arg("ssid"));
ssidList.add(server.arg("ssid"), server.arg("enc") == "true" || server.arg("enc") == "1");
}
attack.ssidChange = true;
server.send( 200, "text/json", "true");
}else server.send( 200, "text/json", "false");
}
void cloneSelected(){
if(apScan.selectedSum > 0){
int clonesPerSSID = 48/apScan.selectedSum;
ssidList.clear();
for(int i=0;i<apScan.results;i++){
if(apScan.isSelected(i)){
ssidList.addClone(apScan.getAPName(i),clonesPerSSID, apScan.getAPEncryption(i) != "none");
}
}
}
attack.ssidChange = true;
server.send( 200, "text/json", "true");
}
void deleteSSID() {
ssidList.remove(server.arg("num").toInt());
attack.ssidChange = true;
@@ -392,9 +419,24 @@ void saveSettings() {
settings.apChannel = server.arg("apChannel").toInt();
}
}
if (server.hasArg("ssidEnc")) {
if (server.arg("ssidEnc") == "false") settings.attackEncrypted = false;
else settings.attackEncrypted = true;
if (server.hasArg("macAp")) {
String macStr = server.arg("macAp");
macStr.replace(":","");
Mac tempMac;
if(macStr.length() == 12){
for(int i=0;i<6;i++){
const char* val = macStr.substring(i*2,i*2+2).c_str();
uint8_t valByte = strtoul(val, NULL, 16);
tempMac.setAt(valByte,i);
}
if(tempMac.valid()) settings.macAP.set(tempMac);
} else if(macStr.length() == 0){
settings.macAP.set(settings.defaultMacAP);
}
}
if (server.hasArg("randMacAp")) {
if (server.arg("randMacAp") == "false") settings.isMacAPRand = false;
else settings.isMacAPRand = true;
}
if (server.hasArg("scanTime")) settings.clientScanTime = server.arg("scanTime").toInt();
if (server.hasArg("timeout")) settings.attackTimeout = server.arg("timeout").toInt();
@@ -426,7 +468,7 @@ void saveSettings() {
else settings.multiAttacks = true;
}
if (server.hasArg("ledPin")) settings.ledPin = server.arg("ledPin").toInt();
if (server.hasArg("ledPin")) settings.setLedPin(server.arg("ledPin").toInt());
if(server.hasArg("macInterval")) settings.macInterval = server.arg("macInterval").toInt();
settings.save();
@@ -439,6 +481,8 @@ void resetSettings() {
}
void setup() {
randomSeed(os_random());
#ifdef USE_LED16
pinMode(16, OUTPUT);
@@ -446,17 +490,23 @@ void setup() {
#endif
Serial.begin(115200);
attackMode = "START";
attackMode_deauth = "START";
attackMode_beacon = "START";
EEPROM.begin(4096);
SPIFFS.begin();
settings.load();
if (debug) settings.info();
settings.syncMacInterface();
nameList.load();
ssidList.load();
attack.refreshLed();
delay(500); // Prevent bssid leak
startWifi();
attack.stopAll();
attack.generate();
@@ -504,6 +554,7 @@ void setup() {
server.on("/clearNameList.json", clearNameList);
server.on("/editNameList.json", editClientName);
server.on("/addSSID.json", addSSID);
server.on("/cloneSelected.json", cloneSelected);
server.on("/deleteSSID.json", deleteSSID);
server.on("/randomSSID.json", randomSSID);
server.on("/clearSSID.json", clearSSID);
@@ -530,13 +581,17 @@ void setup() {
display.setFont(ArialMT_Plain_24);
display.drawString(0, 16, "Deauther");
display.setFont(ArialMT_Plain_10);
display.drawString(100, 28, "v");
display.setFont(ArialMT_Plain_16);
display.drawString(104, 24, "1.6");
display.setFont(ArialMT_Plain_10);
display.drawString(0, 40, "Copyright (c) 2017");
display.drawString(0, 50, "Stefan Kremser");
display.display();
display.setFont(Roboto_Mono_8);
delay(2000);
delay(1600);
#endif
#ifdef resetPin
@@ -544,20 +599,15 @@ void setup() {
if(digitalRead(resetPin) == LOW) settings.reset();
#endif
pinMode(settings.ledPin, OUTPUT);
digitalWrite(settings.ledPin, HIGH);
if(debug){
Serial.println("\nStarting...\n");
#ifndef USE_DISPLAY
delay(2000);
delay(1600);
#endif
}
}
void loop() {
if (clientScan.sniffing) {
if (clientScan.stop()) startWifi();
} else {
@@ -603,7 +653,8 @@ void loop() {
// ===== SELECT =====
} else if (buttonPressed == 2) {
//WiFi on/off
// ===== WIFI on/off =====
if (curRow == 0) {
if (wifiMode == "ON") stopWifi();
else startWifi();
@@ -613,16 +664,37 @@ void loop() {
startAPScan();
drawInterface();
// ===== start,stop attack =====
// ===== start,stop deauth attack =====
} else if (curRow == 2) {
if (attackMode == "START" && apScan.getFirstTarget() > -1) attack.start(0);
else if (attackMode == "STOP") attack.stop(0);
if (attackMode_deauth == "START" && apScan.getFirstTarget() > -1) attack.start(0);
else if (attackMode_deauth == "STOP") attack.stop(0);
// ===== start,stop beacon attack =====
} else if (curRow == 3) {
if (attackMode_beacon == "START"){
//clone all selected SSIDs
if(apScan.selectedSum > 0){
int clonesPerSSID = 48/apScan.selectedSum;
ssidList.clear();
for(int i=0;i<apScan.results;i++){
if(apScan.isSelected(i)){
ssidList.addClone(apScan.getAPName(i),clonesPerSSID, apScan.getAPEncryption(i) != "none");
}
}
}
attack.ssidChange = true;
//start attack
attack.start(1);
}
else if (attackMode_beacon == "STOP") attack.stop(1);
}
// ===== select APs =====
else if (curRow >= 3) {
else if (curRow >= 4) {
attack.stop(0);
apScan.select(curRow - 3);
apScan.select(curRow - 4);
}
}
// ===== DISPLAY =====

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 KiB

After

Width:  |  Height:  |  Size: 629 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

@@ -1,4 +1,4 @@
Copy these files and past them at the location.
Copy and replace the files at these locations:
user_interface ---> \packages\esp8266\hardware\esp8266\2.0.0\tools\sdk\include
ESP8266WiFi.cpp and ESP8266WiFi.h ---> \packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src
user_interface.h -> \packages\esp8266\hardware\esp8266\2.0.0\tools\sdk\include
ESP8266WiFi.cpp and ESP8266WiFi.h -> \packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src

57
web_server/convert_all.sh Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/bash
#
# This script walks through the html folder and minify all JS, HTML and CSS files. It also generates
# the corresponding constants that is added to the data.h file on esp8266_deauther folder.
#
# @Author Erick B. Tedeschi < erickbt86 [at] gmail [dot] com >
#
outputfile="$(pwd)/data_h_temp"
rm $outputfile
function minify_html_css {
file=$1
curl -X POST -s --data-urlencode "input@$file" http://html-minifier.com/raw > /tmp/converter.temp
}
function minify_js {
file=$1
curl -X POST -s --data-urlencode "input@$file" https://javascript-minifier.com/raw > /tmp/converter.temp
}
function ascii2hexCstyle {
file_name=$(constFileName $1)
result=$(cat /tmp/converter.temp | hexdump -ve '1/1 "0x%.2x,"')
result=$(echo $result | sed 's/,$//')
echo "const char data_${file_name}[] PROGMEM = {$result};"
}
function constFileName {
extension=$(echo $1 | egrep -io "(css|js|html)$" | tr "[:lower:]" "[:upper:]")
file=$(echo $1 | sed 's/\.css//' | sed 's/\.html//' | sed 's/\.js//' | sed 's/\.\///' | tr '/' '_' | tr '.' '_')
echo $file$extension
}
cd html
file_list=$(find . -type f)
for file in $file_list; do
echo "Processing: $file"
if [[ "$file" == *.js ]]; then
echo "-> JS minifier"
minify_js $file
ascii2hexCstyle $file >> $outputfile
elif [[ "$file" == *.html ]] || [[ "$file" == *.css ]]; then
echo "-> HTML and CSS minifier"
minify_html_css $file
ascii2hexCstyle $file >> $outputfile
else
echo "-> without minifier"
cat $file > /tmp/converter.temp
ascii2hexCstyle $file >> $outputfile
fi
sleep 1
done

View File

@@ -8,6 +8,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="html/style.css">
<script src="jquery-3.2.1.min.js"></script>
<style>
textarea{
width: 96%;
height: 350px;
}
</style>
</head>
<body>
@@ -22,8 +28,8 @@
<div class="col-12">
<h1 class="header">Text to Byte Array Converter</h1>
<p>
Please use <a href="https://htmlcompressor.com/compressor/" target="_blank">HTMLCompressor</a> first to get your HTML, CSS and JS minified.<br />
Every saved byte can improve the stability of the ESP8266's webserver!<br />
Please use <a href="https://htmlcompressor.com/compressor/" target="_blank">HTMLCompressor</a> (or something similar) first to get your HTML, CSS and JS minified.<br />
Every saved byte can improve the stability of the ESP8266's webserver!
</p>
</div>
</div>
@@ -45,12 +51,6 @@
<p>Length: <span id="info_len">0</span> Bytes</p>
</div>
</div>
<div id="copyright">
version 1.5<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
</div>
</div>

View File

@@ -2,12 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="js/functions.js"></script>
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<nav>
@@ -17,41 +18,43 @@
<a href="settings.html">Settings</a>
<a class="right" href="info.html">Info</a>
</nav>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header">Scan for Wi-Fi access points</h1>
<a id="scanInfo">scanning...</a>
<a id="scanInfo" class="left labelFix">scanning...</a>
<button onclick="scan()" id="apScanStart" class="right button-primary">scan</button>
<p>
Networks found:
<span id="networksFound">0</span>
<p class="clear">
Networks found: <span id="networksFound">0</span><br />
MAC: <span id="apMAC"></span><br />
<br />
MAC: <span id="apMAC"></span>
<span id="selectAllBtns" style="visibility:'hidden'">
<br />
<button class="marginNull button-primary left" onclick="select(-2)">deselect all</button>
<button class="marginNull button-primary right" onclick="select(-1)">select all</button>
<br />
</span>
</p>
<br />
<table></table>
<p class="small">
<span class="warn">INFO: </span><span class="bold">You may have to reload the site to see the results.</span>
<span class="red">INFO: </span><span class="bold">You may have to reload the site to see the results.</span>
<br />
<br />
WPA* = WPA/WPA2 auto mode
</p>
<div id="copyright">
version 1.5<br />
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
<script src="js/apscan.js"></script>

View File

@@ -2,12 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="js/functions.js"></script>
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<nav>
@@ -17,35 +18,32 @@
<a href="settings.html">Settings</a>
<a class="right" href="info.html">Info</a>
</nav>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header">Attacks</h1>
<p class="bold">Selected AP(s):</p>
<ul id="selectedAPs">
</ul>
<br />
<p class="bold">Selected AP(s): <button onclick='cloneSelected()'>clone</button></p>
<ul id="selectedAPs"></ul>
<p class="bold">Selected Station(s):</p>
<ul id="selectedClients">
</ul>
<ul id="selectedClients"></ul>
<br />
<table></table>
<table>
</table>
<label class="left">
<input type="number" id="randomIntrvl" value="5" min="1" max="65000"/>s
</label>
<br />
<label class="left"><input type="number" id="randomIntrvl" value="5" min="1" max="65000"/>s</label>
<button class="right" id="randomBtn" onclick="random()">Enable Random</button>
<p class="clear">
<br />
<span class="warn">INFO: </span><span class="bold">You may loose connection when starting the attack.</span><br />
<span class="red">INFO: </span><span class="bold">You may loose connection when starting the attack.</span><br />
Change the channel in the settings to the same of the selected AP to prevent this.
</p>
@@ -58,7 +56,7 @@
<label for="ssid">SSID</label>
</div>
<div class="col-6">
<input type="text" id="ssid" minlength="1" maxlength="32" placeholder="SSID">
<input type="text" id="ssid" minlength="1" maxlength="32" placeholder="SSID" />
</div>
</div>
@@ -67,7 +65,16 @@
<label for="num">Number of Clones</label>
</div>
<div class="col-6">
<input type="number" id="num" min="0" max="48" value="0">
<input type="number" id="num" min="0" max="48" value="0" />
</div>
</div>
<div class="row">
<div class="col-6">
<label for="enc">Encrypted</label>
</div>
<div class="col-6">
<input type="checkbox" id="enc" name="enc" />
</div>
</div>
@@ -76,37 +83,38 @@
<button class="button-primary col-4" onclick="addSSID()">add</button>
<br class="clear" />
<hr />
<p class="left">SSIDs: <span id="ssidCounter">0/48</span>
<div class="right">
<button class="button-warn" onclick="clearSSID()">clear</button>
<button onclick="randomSSID()">random</button>
</div>
</p>
<br />
<p class="left">SSIDs: <span id="ssidCounter">0/48</span></p>
<div class="right">
<button class="red" onclick="clearSSID()">clear</button>
<button onclick="randomSSID()">random</button>
</div>
<table></table>
<br />
<button class="marginNull button-warn" onclick="resetSSID()">reset</button>
<button class="marginNull red" onclick="resetSSID()">reset</button>
<button class="marginNull button-primary right" onclick="saveSSID()">save</button>
<p class="small" id="saved">saved</p>
<p>
<br />
<span class="bold">Deauth [deauthentication attack]:</span><br />
Sends deauthentication and dissociation frames to the selected station(s) and access point(s).<br />
Sends constantly deauthentication and disassociation frames to the selected station(s) and access point(s).<br />
<br />
<span class="bold">Beacon [beacon flood]:</span><br />
Sends beacon frames with the SSIDs in the list below.<br />
<span class="bold">Beacon [beacon flooding]:</span><br />
Broadcasts constantly beacon frames to advertise all SSIDs in the list below.<br />
<br />
<span class="bold">Probe-Request [probe request flood]:</span><br />
Sends probe request frames with the SSIDs in the list below.
<span class="bold">Probe-Request [probe request flooding]:</span><br />
Broadcasts constantly probe request frames with all SSIDs in the list below.
</p>
<div id="copyright">
version 1.5<br />
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
<script src="js/attack.js"></script>

View File

@@ -2,11 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<nav>
@@ -16,18 +18,16 @@
<a href="settings.html">Settings</a>
<a class="right" href="info.html">Info</a>
</nav>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="header">ERROR 404</h1>
<p class="middle"><br />Page not found :(<br /></p>
<p class="centered bold"><br />Page not found &macr;\_(ツ)_/&macr;</p>
<div id="copyright">
version 1.5<br />
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>

View File

@@ -2,39 +2,43 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="js/functions.js"></script>
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="header">WARNING</h1>
<p class="middle bold">
This software is meant for testing common vulnerabilities in the 802.11 standard only.<br />
It can disrupt unprotected Wi-Fi connections.<br/>
Please check the laws in your country before using it.<br />
<p class="centered bold">
This software is meant for testing common vulnerabilities in the 802.11 standard.<br />
Please check the laws for your country before using it.<br />
<br />
<span class="warn">Use it only on your own networks and devices!</span><br />
The usage of this software against other networks without permission is illegal!<br />
<br />
You are self resposible for everything you do with this program!<br />
It will log all actions against any network and device.<br />
You are resposible for everything you do with this software.<br />
The device will log every attack against any network or device.<br />
<br />
Referring to this project as "jammer" is prohibited! Name the project by its correct name.
Unauthorized selling of this project in any way is not allowed (see <a href="license">license</a>).<br />
Please do not call this project a "jammer", it does not jam any frequencies!
<br />
Go to <a href="https://github.com/spacehuhn/esp8266_deauther">github.com/spacehuhn/esp8266_deauther</a> for more information.<br />
<br />
<br />
<a class="button" href="apscan.html">I've read and understood the notice above</a>
</p>
<div id="copyright">
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>

View File

@@ -2,11 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<nav>
@@ -16,58 +18,67 @@
<a href="settings.html">Settings</a>
<a class="right" href="info.html">Info</a>
</nav>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="header">Info</h1>
<h2>ESP8266 Deauther</h2>
<p>
<span class="bold">Copyright (c) 2017 Stefan Kremser</span><br />
<br />
This project is licensed under Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0). See the <a href="license">license file</a> for details.
<br />
This project is licensed under the MIT License. See the <a href="license">license file</a> for details.<br />
The source code is available on <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a>.<br />
<br />
Use it only for testing or educational purposes on your own devices!<br />
Use it only for testing or educational purposes against your own devices!<br />
<br />
<span class="bold">
Referring to this project as "jammer" is prohibited! Name the project by its correct name.<br />
</span>
<span class="bold">Please do not call this project a "jammer", it does not jam any frequencies!</span>
</p>
<h2>Contributors</h2>
<p>
<a href="https://github.com/andrbmgi" target="_blank">@andrbmgi</a>
<a href="https://github.com/N0vaPixel" target="_blank">@N0vaPixel</a> (Aur&eacute;lien Hernandez)<br />
<a href="https://github.com/SaltyViper" target="_blank">@SaltyViper</a><br />
<a href="https://github.com/tobozo" target="_blank">@tobozo</a><br />
<a href="https://github.com/andrbmgi" target="_blank">@andrbmgi</a><br />
<a href="https://github.com/dalmirdasilva" target="_blank">@dalmirdasilva</a> (Dalmir da Silva)<br />
<a href="https://github.com/ericktedeschi" target="_blank">@ericktedeschi</a> (Erick Belluci Tedeschi)<br />
<a href="https://github.com/SamuelKlit" target="_blank">@SamuelKlit</a> (Samuel KS)<br />
<a href="https://github.com/schinfo" target="_blank">@schinfo</a> (Helmut)<br />
<a href="https://github.com/ajnavarro" target="_blank">@ajnavarro</a> (Antonio Navarro Perez)<br />
<br />
<a href="https://github.com/N0vaPixel" target="_blank">@N0vaPixel</a> (Aur&eacute;lien Hernandez)
Also special thanks to <a href="https://github.com/deantonious" target="_blank">@deantonious</a> for the help with the webdesign!<br />
<br />
<a href="https://github.com/tobozo" target="_blank">@tobozo</a>
<br />
<a href="https://github.com/SaltyViper" target="_blank">@SaltyViper</a>
<br />
<a href="https://github.com/ajnavarro" target="_blank">@ajnavarro</a> (Antonio Navarro Perez)
<br />
<a href="https://github.com/schinfo" target="_blank">@schinfo</a> (Helmut)
<br />
<a href="https://github.com/SamuelKlit" target="_blank">@SamuelKlit</a> (Samuel KS)
For more information go to <a href="https://github.com/spacehuhn/esp8266_deauther/graphs/contributors">contributors</a> on this projects GitHub page.
</p>
<p>
For more information go to <a href="https://github.com/spacehuhn/esp8266_deauther/graphs/contributors">contributors</a> on the GitHub page.
</p>
<br />
<h2>Credits</h2>
<p>
<a href="https://github.com/ThisIsDallas/Simple-Grid">SIMPLE GRID</a> - Copyright (C) 2013 Dallas Bass - Released under the MIT License.<br />
<a href="https://github.com/ThisIsDallas/Simple-Grid">SIMPLE GRID</a> - (C) ZACH COLE 2016<br />
<br />
The MAC adresse list is based on Wireshark manufacturer database.<br />
The MAC address vendor list is based on the Wireshark manufacturer database.<br />
Source: <a href="https://www.wireshark.org/tools/oui-lookup.html">https://www.wireshark.org/tools/oui-lookup.html</a><br />
Wireshark is released under the GNU General Public License version 2<br />
</p>
<h2>Contact</h2>
<p>
Web: spacehuhn.de<br />
GitHub: github.com/spacehuhn<br />
Twitter: @spacehuhn<br />
E-mail: mail@spacehuhn.de<br />
<br />
If you would like to support me with my projects, please consider becoming a patron on <a target="_blank" href="https://patreon.com/spacehuhn">patreon.com/spacehuhn</a>.<br />
<br />
Or buy the official hardware for this project from DSTIKE on <a target="_blank" href="https://www.tindie.com/stores/lspoplove/">tindie.com/stores/lspoplove</a>.
</p>
<div id="copyright">
version 1.5<br />
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>

View File

@@ -18,11 +18,15 @@ function compare(a, b) {
}
function getEncryption(num) {
/*
if (num == 8) return "WPA*";
else if (num == 4) return "WPA2";
else if (num == 2) return "WPA";
else if (num == 7) return "none";
else if (num == 5) return "WEP";
*/
if (num == 7) return " ";
else return "&#128274;";
}
function getResults() {
@@ -38,7 +42,7 @@ function getResults() {
var tr = '';
if (res.aps.length > 0) {
tr += '<tr><th>Ch</th><th>SSID</th><th>RSSI</th><th>Encrypt.</th><th>Select</th></tr>';
tr += '<tr><th>Ch</th><th>SSID</th><th> </th><th>RSSI</th><th>Select</th></tr>';
}
for (var i = 0; i < res.aps.length; i++) {
@@ -46,15 +50,21 @@ function getResults() {
if (res.aps[i].se == 1) tr += '<tr class="selected">';
else tr += '<tr>';
tr += '<td>' + res.aps[i].c + '</td>';
tr += '<td>' + res.aps[i].ss + '</td>';
tr += '<td>' + res.aps[i].r + ' <meter value="' + res.aps[i].r + '" max="-30" min="-100" low="-80" high="-60" optimum="-50"></meter></td>';
tr += '<td>' + escapeHTML(res.aps[i].ss) + '</td>';
tr += '<td>' + getEncryption(res.aps[i].e) + '</td>';
//tr += '<td>' + res.aps[i].r + ' <meter value="' + res.aps[i].r + '" max="-30" min="-100" low="-80" high="-60" optimum="-50"></meter></td>';
var _width = res.aps[i].r + 130;
var _color;
if(res.aps[i].r < -80) _color = "meter_red";
else if(res.aps[i].r < -60) _color = "meter_orange";
else _color = "meter_green";
tr += '<td><div class="meter_background"> <div class="meter_forground '+_color+'" style="width: '+_width+'%;"><div class="meter_value">' + res.aps[i].r + '</div></div> </div></td>';
if (res.aps[i].se) {
tr += '<td><button class="marginNull selectedBtn" onclick="select(' + res.aps[i].i + ')">deselect</button></td>';
tr += '<td><button class="select" onclick="select(' + res.aps[i].i + ')">deselect</button></td>';
apMAC.innerHTML = res.aps[i].m;
}
else tr += '<td><button class="marginNull" onclick="select(' + res.aps[i].i + ')">select</button></td>';
else tr += '<td><button class="select" onclick="select(' + res.aps[i].i + ')">select</button></td>';
tr += '</tr>';
}
table.innerHTML = tr;

View File

@@ -6,6 +6,7 @@ var saved = getE("saved");
var ssidCounter = getE("ssidCounter");
var ssid = getE("ssid");
var num = getE("num");
var enc = getE("enc");
var randomIntrvl = getE("randomIntrvl");
var randomBtn = getE("randomBtn");
var resultInterval;
@@ -17,8 +18,8 @@ function getResults() {
var aps = "";
var clients = "";
var tr = "<tr><th>Attack</th><th>Status</th><th>Start/Stop</th></tr>";
for (var i = 0; i < res.aps.length; i++) aps += "<li>" + res.aps[i] + " <button onclick='cloneSSID(\""+res.aps[i]+"\")'>clone</button></li>";
for (var i = 0; i < res.clients.length; i++) clients += "<li>" + res.clients[i] + "</li>";
for (var i = 0; i < res.aps.length; i++) aps += "<li>" + escapeHTML(res.aps[i]) + "</li>";
for (var i = 0; i < res.clients.length; i++) clients += "<li>" + escapeHTML(res.clients[i]) + "</li>";
selectedAPs.innerHTML = aps;
selectedClients.innerHTML = clients;
@@ -31,10 +32,10 @@ function getResults() {
else tr += "<tr>";
tr += "<td>" + res.attacks[i].name + "</td>";
if (res.attacks[i].status == "ready") tr += "<td class='green' id='status"+i+"'>" + res.attacks[i].status + "</td>";
else tr += "<td class='red' id='status"+i+"'>" + res.attacks[i].status + "</td>";
if (res.attacks[i].running) tr += "<td><button class='marginNull selectedBtn' onclick='startStop(" + i + ")'>stop</button></td>";
else tr += "<td><button class='marginNull' onclick='startStop(" + i + ")'>start</button></td>";
if (res.attacks[i].status == "ready") tr += "<td class='green status' id='status"+i+"'>" + res.attacks[i].status + "</td>";
else tr += "<td class='red status' id='status"+i+"'>" + res.attacks[i].status + "</td>";
if (res.attacks[i].running) tr += "<td><button class='select' onclick='startStop(" + i + ")'>stop</button></td>";
else tr += "<td><button class='select' onclick='startStop(" + i + ")'>start</button></td>";
tr += "</tr>";
}
@@ -44,11 +45,13 @@ function getResults() {
data = res.ssid;
ssidCounter.innerHTML = data.length + "/48";
var tr = "<tr><th>Name</th><th>X</th></tr>";
var tr = "<tr><th>Name</th><th></th><th>Del.</th></tr>";
for (var i = 0; i < data.length; i++) {
tr += "<tr>";
tr += "<td>" + data[i] + "</td>";
tr += '<td><button class="marginNull button-warn" onclick="deleteSSID(' + i + ')">x</button></td>';
tr += "<td>" + escapeHTML(data[i][0]) + "</td>";
if(data[i][1] == 1) tr += "<td>&#128274;</td>";
else tr += "<td></td>";
tr += '<td><button class="button-warn" onclick="deleteSSID(' + i + ')">x</button></td>';
tr += "</tr>";
}
ssidList.innerHTML = tr;
@@ -75,15 +78,13 @@ function addSSID() {
if(data.length >= 64) showMessage("SSID list full :(", 2500);
else{
saved.innerHTML = "";
getResponse("addSSID.json?ssid=" + _ssidName + "&num="+num.value, getResults);
getResponse("addSSID.json?ssid=" + _ssidName + "&num="+num.value + "&enc=" + enc.checked, getResults);
}
}
}
function cloneSSID(_ssidName) {
ssid.value = _ssidName;
if(data.length > 0) num.value = 48 - data.length;
else num.value = 48;
function cloneSelected() {
getResponse("cloneSelected.json", getResults);
}
function deleteSSID(num) {

View File

@@ -1,16 +1,33 @@
function showMessage(msg, closeAfter){
document.getElementById("error").innerHTML = msg;
if(closeAfter !== undefined){
setTimeout(function(){
document.getElementById("error").innerHTML = "";
},closeAfter);
}
}
function getE(name){
return document.getElementById(name);
}
function escapeHTML(str) {
return str
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\"/g, '&quot;')
.replace(/\'/g, '&#39;')
.replace(/\//g, '&#x2F;')
}
function showMessage(msg, closeAfter){
var errorE = getE("error");
errorE.innerHTML = msg;
errorE.classList.remove('hide');
errorE.classList.add('show');
if(closeAfter !== undefined){
setTimeout(function(){
errorE.innerHTML = "";
errorE.classList.remove('show');
errorE.classList.add('hide');
},closeAfter);
}
}
function getResponse(adr, callback, timeoutCallback, timeout, method){
if(timeoutCallback === undefined) {
timeoutCallback = function(){
@@ -23,7 +40,6 @@ function getResponse(adr, callback, timeoutCallback, timeout, method){
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState == 4){
if(xmlhttp.status == 200){
showMessage("");
callback(xmlhttp.responseText);
}
else timeoutCallback();

View File

@@ -2,6 +2,8 @@ var ssid = getE('ssid');
var ssidHidden = getE('ssidHidden');
var password = getE('password');
var apChannel = getE('apChannel');
var macAp = getE('macAp');
var randMacAp = getE('randMacAp');
var apScanHidden = getE('apScanHidden');
var scanTime = getE('scanTime');
var timeout = getE('timeout');
@@ -9,7 +11,6 @@ var deauthReason = getE('deauthReason');
var packetRate = getE('packetRate');
var saved = getE('saved');
var clientNames = getE('clientNames');
var ssidEnc = getE('ssidEnc');
var useLed = getE('useLed');
/*var channelHop = getE('channelHop');*/
var multiAPs = getE('multiAPs');
@@ -33,12 +34,13 @@ function getData() {
ssidHidden.checked = res.ssidHidden;
password.value = res.password;
apChannel.value = res.apChannel;
macAp.value = res.macAp;
randMacAp.checked = res.randMacAp;
apScanHidden.checked = res.apScanHidden;
scanTime.value = res.clientScanTime;
timeout.value = res.attackTimeout;
deauthReason.value = res.deauthReason;
packetRate.value = res.attackPacketRate;
ssidEnc.checked = res.attackEncrypted;
useLed.checked = res.useLed;
/*channelHop.checked = res.channelHop;*/
multiAPs.checked = res.multiAPs;
@@ -56,12 +58,13 @@ function saveSettings() {
url += "&ssidHidden=" + ssidHidden.checked;
url += "&password=" + password.value;
url += "&apChannel=" + apChannel.value;
url += "&macAp=" + macAp.value;
url += "&randMacAp=" + randMacAp.checked;
url += "&apScanHidden=" + apScanHidden.checked;
url += "&scanTime=" + scanTime.value;
url += "&timeout=" + timeout.value;
url += "&deauthReason=" + deauthReason.value;
url += "&packetRate=" + packetRate.value;
url += "&ssidEnc=" + ssidEnc.checked;
url += "&useLed=" + useLed.checked;
/*url += "&channelHop=" + channelHop.checked;*/
url += "&multiAPs="+multiAPs.checked;

View File

@@ -35,21 +35,21 @@ function getResults() {
clientsFound.innerHTML = res.clients.length;
var tr = '';
if (res.clients.length > 0) tr += '<tr><th>Pkts</th><th>Vendor</th><th>Name</th><th>MAC</th><th>AP</th><th>Select</th></tr>';
if (res.clients.length > 0) tr += '<tr><th>Pkts</th><th>Name</th><th>MAC</th><th>AP</th><th>Select</th></tr>';
for (var i = 0; i < res.clients.length; i++) {
if (res.clients[i].s == 1) tr += '<tr class="selected">';
else tr += '<tr>';
tr += '<td>' + res.clients[i].p + '</td>';
tr += '<td>' + res.clients[i].v + '</td>';
if(res.clients[i].l >= 0) tr += '<td>' + res.clients[i].n + ' <a onclick="editNameList(' + res.clients[i].l + ')">edit</a></td>';
if(res.clients[i].l >= 0) tr += '<td>' + escapeHTML(res.clients[i].n) + ' <a onclick="editNameList(' + res.clients[i].l + ')"></a></td>';
else tr += '<td><a onclick="setName(' + res.clients[i].i + ')">set</a></td>';
tr += '<td>' + res.clients[i].m + '</td>';
tr += '<td>' + res.clients[i].a + '</td>';
if(res.clients[i].v.length > 1) tr += '<td>' + res.clients[i].v + res.clients[i].m.substring(8, 20) + '</td>';
else tr += '<td>' + res.clients[i].m + '</td>';
tr += '<td>' + escapeHTML(res.clients[i].a) + '</td>';
if (res.clients[i].s == 1) tr += '<td><button class="marginNull selectedBtn" onclick="select(' + res.clients[i].i + ')">deselect</button></td>';
else tr += '<td><button class="marginNull" onclick="select(' + res.clients[i].i + ')">select</button></td>';
if (res.clients[i].s == 1) tr += '<td><button class="marginNull select" onclick="select(' + res.clients[i].i + ')">deselect</button></td>';
else tr += '<td><button class="marginNull select" onclick="select(' + res.clients[i].i + ')">select</button></td>';
tr += '</tr>';
}
@@ -57,13 +57,13 @@ function getResults() {
clientNames.innerHTML = res.nameList.length + "/50";
var tr = '<tr><th>MAC</th><th>Name</th><th>X</th><th>Add</th></tr>';
var tr = '<tr><th>MAC</th><th>Name</th><th>Del.</th><th>Add</th></tr>';
for (var i = 0; i < res.nameList.length; i++) {
tr += '<tr>';
tr += '<td>' + res.nameList[i].m + '</td>';
tr += '<td>' + res.nameList[i].n + ' <a onclick="editNameList(' + i + ')">edit</a></td>';
tr += '<td>' + escapeHTML(res.nameList[i].n) + ' <a onclick="editNameList(' + i + ')">edit</a></td>';
tr += '<td><button class="marginNull button-warn" onclick="deleteName(' + i + ')">x</button></td>';
tr += '<td><button class="marginNull button-primary" onclick="add(' + i + ')">add</button></td>';
tr += '</tr>';

View File

@@ -1,411 +1,23 @@
Copyright (c) 2017 Stefan Kremser
MIT License
Referring to this project as "jammer" is prohibited! Name the project by its correct name.
Copyright (c) 2017 Stefan Kremser
Attribution-NonCommercial 4.0 International
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
=======================================================================
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Do not redistribute, advertising or sell of this softwae as "jammer"!
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-NonCommercial 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. NonCommercial means not primarily intended for or directed towards
commercial advantage or monetary compensation. For purposes of
this Public License, the exchange of the Licensed Material for
other material subject to Copyright and Similar Rights by digital
file-sharing or similar means is NonCommercial provided there is
no payment of monetary compensation in connection with the
exchange.
j. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
k. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
l. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for
NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties, including when
the Licensed Material is used other than for NonCommercial
purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database for NonCommercial purposes
only;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -2,12 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="js/functions.js"></script>
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<nav>
@@ -17,56 +18,79 @@
<a href="settings.html">Settings</a>
<a class="right" href="info.html">Info</a>
</nav>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header">Settings</h1>
</div>
</div>
<div class="row">
<div class="col-12">
<h2>Wi-Fi</h2>
</div>
</div>
<div class="row">
<div class="col-6">
<label for="ssid">SSID</label>
<label for="ssid" class="labelFix">SSID</label>
</div>
<div class="col-6">
<input type="text" id="ssid" minlength="1" maxlength="32">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="ssidHidden">Hide SSID</label>
</div>
<div class="col-6">
<input type="checkbox" name="ssidHidden" id="ssidHidden" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="password">Password (min.8 chars)</label>
<label for="password" class="labelFix">Password (<span class="red">min.8 chars</span>)</label>
</div>
<div class="col-6">
<input type="text" id="password" minlength="8" maxlength="32">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="apChannel">Channel</label>
<label for="ssidHidden">Hide SSID (<span class="red">be careful with this setting!</span>)</label>
</div>
<div class="col-6">
<input type="checkbox" name="ssidHidden" id="ssidHidden" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="apChannel" class="labelFix">Channel</label>
</div>
<div class="col-6">
<input type="number" id="apChannel" min="1" max="14">
</div>
</div>
<br />
<div class="row">
<div class="col-6">
<label for="apChannel" class="labelFix">MAC</label>
</div>
<div class="col-6">
<input type="text" id="macAp" min="1" max="14">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="randMacAp" class="labelFix">Random MAC</label>
</div>
<div class="col-6">
<input type="checkbox" name="randMacAp" id="randMacAp" value="false">
</div>
</div>
<div class="row">
<div class="col-12">
<h2>AP Scan</h2>
</div>
</div>
<div class="row">
<div class="col-6">
<label for="apScanHidden">Scan Hidden APs</label>
@@ -75,6 +99,7 @@
<input type="checkbox" name="apScanHidden" id="apScanHidden" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="multiAPs">Select multiple SSIDs</label>
@@ -83,34 +108,39 @@
<input type="checkbox" name="multiAPs" id="multiAPs" value="false">
</div>
</div>
<br />
<div class="row">
<div class="col-12">
<h2>Station Scan</h2>
</div>
</div>
<div class="row">
<div class="col-6">
<label for="scanTime">Default Scan Time</label>
<label for="scanTime" class="labelFix">Default Scan Time</label>
</div>
<div class="col-6">
<input type="number" id="scanTime" min="1" max="255"> s
</div>
</div>
<br />
<div class="row">
<div class="col-12">
<h2>Attack</h2>
</div>
</div>
<div class="row">
<div class="col-6">
<label for="timeout">Timeout</label>
<label for="timeout" class="labelFix">Timeout (0 = no timeout)</label>
</div>
<div class="col-6">
<input type="number" id="timeout" min="-1" max="65536"> s
</div>
</div>
<div class="row">
<div class="col-6">
<label for="useLed">Use LED</label>
@@ -119,22 +149,16 @@
<input type="checkbox" id="useLed" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="ledPin">LED Pin (restart needed)</label>
<label for="ledPin" class="labelFix">LED Pin</label>
</div>
<div class="col-6">
<input type="number" id="ledPin" min="0" max="18">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="ssidEnc">WPA2 Beacons</label>
</div>
<div class="col-6">
<input type="checkbox" id="ssidEnc" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="beaconInterval">1s Beacon Interval (default: 100ms)</label>
@@ -143,33 +167,37 @@
<input type="checkbox" id="beaconInterval" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="deauthReason">Deauth Reason-Code</label>
<label for="deauthReason" class="labelFix">Deauth Reason-Code</label>
</div>
<div class="col-6">
<input type="number" id="deauthReason" min="1" max="45">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="packetRate">Packetrate (<span class="red">may cause instability!</span>)</label>
<label for="packetRate" class="labelFix">Packetrate (<span class="red">may cause instability!</span>)</label>
</div>
<div class="col-6">
<input type="number" id="packetRate" min="1" max="50"> pkts/s
</div>
</div>
<div class="row">
<div class="col-6">
<label for="multiAttacks">Multiple Attacks</label>
<label for="multiAttacks">Enable Simultaneous Attacks</label>
</div>
<div class="col-6">
<input type="checkbox" id="multiAttacks" value="false">
</div>
</div>
<div class="row">
<div class="col-6">
<label for="macInterval">MAC Change Interval (used for beacons & probes)</label>
<label for="macInterval" class="labelFix">MAC Change Interval (used for beacons & probes)</label>
</div>
<div class="col-6">
<input type="number" id="macInterval" min="0" max="65000">s
@@ -190,17 +218,17 @@
<div class="row">
<div class="col-12">
<br />
<button class="button-warn" onclick="resetSettings()">reset</button>
<button class="button-warn" onclick="restart()">restart</button>
<button class="red" onclick="resetSettings()">reset</button>
<button class="red" onclick="restart()">restart</button>
<button class="button-primary right" onclick="saveSettings()">save</button>
<br class="clear" />
<p id="saved"></p>
<br class="clear" />
<div id="copyright">
version 1.5<br />
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
<script src="js/settings.js"></script>

View File

@@ -2,12 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<title>ESP8266 Deauther</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="description" content="Wi-Fi Deauthenticator">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="js/functions.js"></script>
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<script src="js/functions.js"></script>
</head>
<body>
<nav>
@@ -17,59 +18,75 @@
<a href="settings.html">Settings</a>
<a class="right" href="info.html">Info</a>
</nav>
<div id="error"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header">Scan for Wi-Fi Stations</h1>
<label for="scanTime">Scan time:</label>
<input type="number" id="scanTime" value="10">s
<label>Scan time:
<input type="number" id="scanTime" value="10">s
</label>
<button onclick="scan()" id="startScan" class="right button-primary">start</button>
<a id="clientScanStatus" class="right padding">scanning...</a>
<br />
<p class="warn">The access point will be unavailable while scanning and you may have to reconnect!<p>
<a id="clientScanStatus"><br />scanning...</a>
<p class="red">The access point will be unavailable while scanning and you may have to reconnect!</p>
<p>
Stations found: <span id="clientsFound">0</span>
Stations found: <span id="clientsFound">0</span><br />
<br />
<button class="marginNull button-primary left" onclick="select(-2)">deselect all</button>
<button class="marginNull button-primary right" onclick="select(-1)">select all</button>
<button class="marginNull button-primary right" onclick="select(-1)">select all</button><br />
</p>
<br />
<table></table>
<p class="block bold" >Saved stations: <span id="clientNames"></span></p>
<p class="block bold" >
Saved stations: <span id="clientNames"></span>
</p>
<table id="nameList"></table>
<button class="button-warn left" onclick="clearNameList()">clear</button>
<br class="clear" />
<p>Add station:</p>
<button class="red left" onclick="clearNameList()">clear</button>
<p>
<br class="clear" />
<br />
Add station:
</p>
</div>
</div>
<div class="row">
<div class="col-4">
<label>MAC <input type="text" placeholder="AA:BB:CC:DD:EE:FF" id="cMac"/></label>
<label>MAC <input type="text" placeholder="AA:BB:CC:DD:EE:FF" id="cMac" /></label>
</div>
<div class="col-4">
<label>Name <input type="text" placeholder="EXAMPLE" id="cName"/></label>
<label>Name <input type="text" placeholder="EXAMPLE" id="cName" /></label>
</div>
<div class="col-4">
<button class="button-primary" onclick="addClient()">add</button>
<button class="button-primary" style="width: 100%" onclick="addClient()">add</button>
</div>
</div>
<div class="row">
<div class="col-12">
<div id="copyright">
version 1.5<br />
Version 1.6<br />
Copyright (c) 2017 Stefan Kremser<br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a><br />
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
<script src="js/stations.js"></script>
</div>
</div>
<script src="js/stations.js"></script>
</div>
</body>
</html>

View File

@@ -1,245 +1,227 @@
/* Global */
.header{
font-size: 1.6rem;
background: #00B0FF;
color: #fff;
padding:0.2rem;
border-radius:4px;
margin-top: 0;
}
input,
.button,
button,
textarea{
border-radius: 4px;
border: 1px solid #bbb;
padding: 0 6px;
}
textarea{
width: 96%;
height: 350px;
}
nav,
nav a{
background: #222;
}
nav a{
color: #999;
padding: .5em;
display: inline-block;
text-decoration: none;
}
nav a:hover{
background: #000;
color:#f0f0f0;
}
meter{
width: 45px;
}
h2{
font-size: 1.5rem;
border-bottom: 1px solid #A5A5A5;
body {
background: #36393e;
color: #bfbfbf;
font-family: sans-serif;
margin: 0;
}
h1 {
font-size: 1.7rem;
margin-top: 1rem;
background: #2f3136;
color: #bfbfbb;
padding: 0.2em 1em;
border-radius: 3px;
border-left: solid #4974a9 5px;
font-weight: 100;
}
h2 {
font-size: 1.1rem;
margin-top: 1rem;
background: #2f3136;
color: #bfbfbb;
padding: 0.4em 1.8em;
border-radius: 3px;
border-left: solid #4974a9 5px;
font-weight: 100;
}
table{
width: 100%;
text-align:center;
border: none;
border-collapse: collapse;
border-collapse: collapse;
}
td{
font-weight: normal;
font-size: 0.85em;
}
.bottom-border{
border-bottom: 1px solid #c3c3c3;
}
.selected{
background: #00B0FF;
}
.left{
.left {
float: left;
}
.right{
.right {
float: right;
}
.bold{
.bold {
font-weight: bold;
}
.clear{
clear: both;
}
.warn{
font-weight: bold;
color: #f00;
}
.middle{
text-align: center;
}
.red{
color:#f00;
color: #F04747;
}
.green{
color:#1ecb1e;
color:#43B581;
}
.padding{
padding: 0 1rem;
.clear {
clear: both;
}
.fullWidth{
width: 100%
}
#error{
.centered{
text-align: center;
color: #fff;
background: #f00;
}
.select{
width: 98px !important;
padding: 0 !important;
}
.selected{
background: #4974a9;
}
.status{
width: 120px;
padding-left: 8px;
}
.labelFix {
line-height: 40px;
}
#error {
text-align: center;
color: #fff;
background: #af3535;
border-radius: 5px;
padding: 10px;
margin-top: 10px;
}
#copyright{
font-size: 0.95em;
text-align: center;
margin-top: 3em;
margin-bottom: 3em;
}
.selectedBtn{
background: #fff;
/* ERROR */
.hide {
display: none;
}
a{
color: #39C2FF;
cursor: pointer;
.show {
display: block !important;
animation-name: fadeIn;
animation-duration: 1s;
}
input{
padding: 3px;
@keyframes fadeIn {
0% {opacity: 0;}
100% {opacity: 1;}
}
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
display: inline-block;
height: 31px;
color: #555;
text-align: center;
font-size: 11px;
font-weight: 600;
line-height: 30px;
letter-spacing: .1rem;
text-transform: uppercase;
text-decoration: none;
white-space: nowrap;
background-color: transparent;
cursor: pointer;
box-sizing: border-box; }
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover{
color: #333;
border-color: #888;
outline: 0;
hr {
background: #3e4146;
}
.button-primary{
color: #FFF;
background-color: #33C3F0;
border-color: #33C3F0;
a {
color: #5281bb;
text-decoration: none;
}
.button-primary:hover {
color: #FFF;
background-color: #1EAEDB;
border-color: #1EAEDB;
a:hover {
color: #95b8e4;
}
.button-warn{
background: #f00;
li{
margin: 4px 0;
}
/* Meter */
.meter_background{
background: #42464D;
width: 100%;
min-width: 90px;
}
.meter_forground{
color: #fff;
padding: 4px 0;
/* + one of the colors below
(width will be set by the JS) */
}
.meter_green{
background: #43B581;
}
.meter_orange{
background: #FAA61A;
}
.meter_red{
background: #F04747;
}
.meter_value{
padding-left: 8px;
}
/**
*** SIMPLE GRID
*** (C) ZACH COLE 2016
**/
/*@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,700,700italic);*/
/* UNIVERSAL */
html,
body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
left: 0;
top: 0;
font-size: 100%;
/* Tables */
table {
width: 100%;
margin-bottom: 50px;
}
/* ROOT FONT STYLES */
* {
font-family: /*'Lato',*/ Helvetica, sans-serif;
color: #333447;
line-height: 1.5;
th, td {
padding: 10px 6px;
text-align: left;
border-bottom: 1px solid #5d5d5d;
}
/* TYPOGRAPHY */
h1 {
font-size: 2.5rem;
/* Navigation bar */
nav {
display: block;
padding: 8px 10px;
background: #2f3136;
}
h2 {
font-size: 2rem;
nav a {
color: #bfbfbf;
padding: 0.5em;
display: inline-block;
text-decoration: none;
}
h3 {
font-size: 1.375rem;
nav a:hover{
background: #36393f;
color:#cecece;
border-radius: 4px;
}
h4 {
font-size: 1.125rem;
/* Inputs and buttons */
.upload-script, .button, button, input[type="submit"], input[type="reset"], input[type="button"] {
display: inline-block;
height: 38px;
padding: 0 25px;
color:#fff;
text-align: center;
font-size: 11px;
font-weight: 600;
line-height: 38px;
letter-spacing: .1rem;
text-transform: uppercase;
text-decoration: none;
white-space: nowrap;
background: #2f3136;
border-radius: 4px;
border: none;
cursor: pointer;
box-sizing: border-box;
}
h5 {
font-size: 1rem;
button:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="button"]:hover {
background: #42444a;
}
h6 {
font-size: 0.875rem;
/* Forms */
input[type="email"], input[type="number"], input[type="search"], input[type="text"], input[type="tel"], input[type="url"], input[type="password"], textarea, select {
height: 38px;
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
background-color: #2f3136;
border-radius: 4px;
box-shadow: none;
box-sizing: border-box;
color: #d4d4d4;
border: none;
}
p {
/*font-size: 1.125rem;*/
font-weight: 200;
/*line-height: 1.8;*/
.setting {
width: 100% !important;
max-width: 284px !important;
}
.font-light {
font-weight: 300;
}
.font-regular {
font-weight: 400;
}
.font-heavy {
font-weight: 700;
}
/* POSITIONING */
.left {
text-align: left;
}
.right {
text-align: right;
}
.center {
text-align: center;
margin-left: auto;
margin-right: auto;
}
.justify {
text-align: justify;
input[type="file"] {
display: none;
}
/* ==== GRID SYSTEM ==== */
@@ -248,6 +230,7 @@ p {
width: 100%;
margin-left: auto;
margin-right: auto;
max-width: 1140px;
}
.row {
@@ -257,7 +240,7 @@ p {
.row [class^="col"] {
float: left;
margin: 0.5rem 2%;
margin: 0.25rem 2%;
min-height: 0.125rem;
}
@@ -276,54 +259,6 @@ p {
width: 96%;
}
.col-1-sm {
width: 4.33%;
}
.col-2-sm {
width: 12.66%;
}
.col-3-sm {
width: 21%;
}
.col-4-sm {
width: 29.33%;
}
.col-5-sm {
width: 37.66%;
}
.col-6-sm {
width: 46%;
}
.col-7-sm {
width: 54.33%;
}
.col-8-sm {
width: 62.66%;
}
.col-9-sm {
width: 71%;
}
.col-10-sm {
width: 79.33%;
}
.col-11-sm {
width: 87.66%;
}
.col-12-sm {
width: 96%;
}
.row::after {
content: "";
display: table;
@@ -334,13 +269,7 @@ p {
display: none;
}
@media only screen and (min-width: 33.75em) { /* 540px */
.container {
width: 85%;
}
}
@media only screen and (min-width: 45em) { /* 720px */
@media only screen and (min-width: 45em) {
.col-1 {
width: 4.33%;
}
@@ -392,11 +321,4 @@ p {
.hidden-sm {
display: block;
}
}
@media only screen and (min-width: 60em) { /* 960px */
.container {
width: 80%;
max-width: 60rem;
}
}

View File

@@ -1,3 +1,35 @@
# How to update files inside html folder?
The files related to the Frontend of ESP8266_Deauther are inside html folder.
To reflect on the firmware it needs to be: minified, converted to hex and updated on data.h on esp8266_deauther folder on the root of this project.
The following process can be used:
## Script Mode (Linux/Mac)
**1** Update the desired files on ./html folder
**2** at the command line run the shell script: ./convert_all.sh
**3** open the generated file "data_h_temp" and copy the content (CTRL+C)
**4** Go to data.h and replace the content between the comments like below:
```c
/* constants generated by convert_all.sh - start */
const char data_apscanHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x43...
const char data_attackHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x43...
const char data_errorHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x43,...
const char data_indexHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x43,...
const char data_infoHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x43,0...
const char data_js_apscanJS[] PROGMEM = {0x66,0x75,0x6e,0x63,0x7...
const char data_js_attackJS[] PROGMEM = {0x66,0x75,0x6e,0x63,0x7...
const char data_js_functionsJS[] PROGMEM = {0x66,0x75,0x6e,0x63,...
const char data_js_settingsJS[] PROGMEM = {0x66,0x75,0x6e,0x63,0...
const char data_js_stationsJS[] PROGMEM = {0x66,0x75,0x6e,0x63,0...
const char data_license[] PROGMEM = {0x43,0x6f,0x70,0x79,0x72,0x...
const char data_settingsHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x...
const char data_stationsHTML[] PROGMEM = {0x3c,0x21,0x44,0x4f,0x...
const char data_styleCSS[] PROGMEM = {0x2f,0x2a,0x20,0x47,0x6c,0...
/* constants generated by convert_all.sh - end */
```
## Manual mode
**1** Use a minifier (e.g. htmlcompressor.com) to get your files as small as possible
**2** Open converter.html
**3** Paste the code in the left textfield