Visual improvements for web interface

This commit is contained in:
Spacehuhn 2021-01-11 18:04:59 +01:00
parent 077eee674b
commit d95d7c7aa7
14 changed files with 844 additions and 775 deletions

View File

@ -2,7 +2,7 @@ Do not redistribute, advertise or sell this software as a "jammer"!!!
MIT License
Copyright (c) 2018 Stefan Kremser
Copyright (c) 2020 Spacehuhn Technologies
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,28 +1,36 @@
<!--- This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther -->
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="theme-color" content="#36393E">
<meta name="description" content="ESP8266 Deauther">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/site.js"></script>
<script src="js/attack.js"></script>
</head>
<body onload="loadLang()">
</head>
<body onload="loadLang()">
<nav>
<a href="scan.html" data-translate="scan">Scan</a>
<a href="ssids.html" data-translate="ssids">SSIDs</a>
<a href="attack.html" data-translate="attacks">Attacks</a>
<a href="settings.html" data-translate="settings">Settings</a>
<a class="right" href="info.html" data-translate="info">Info</a>
<ul class="menu">
<li><a href="scan.html" data-translate="scan">Scan</a></li>
<li><a href="ssids.html" data-translate="ssids">SSIDs</a></li>
<li><a href="attack.html" data-translate="attacks">Attack</a></li>
<li><a href="settings.html" data-translate="settings">Settings</a></li>
</ul>
</nav>
<div id="status"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header" data-translate="attacks">Attacks</h1>
<p>
@ -33,7 +41,8 @@
- You need a saved SSID for the beacon and probe attack.<br>
- Click reload to refresh the packet rate.<br>
</span>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and look at the serial monitor for further debugging.</span><br>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and
look at the serial monitor for further debugging.</span><br>
</p>
<button onclick="load()" class="right" data-translate="reload">reload</button>
@ -49,19 +58,22 @@
<td>Deauth</td>
<td id="deauthTargets">0</td>
<td id="deauthPkts">0/0</td>
<td><button id="deauth" onclick="start(0)" class="select" data-translate="start">START</button></td>
<td><button id="deauth" onclick="start(0)" class="select" data-translate="start">START</button>
</td>
</tr>
<tr>
<td>Beacon</td>
<td id="beaconTargets">0</td>
<td id="beaconPkts">0/0</td>
<td><button id="beacon" onclick="start(1)" class="select" data-translate="start">START</button></td>
<td><button id="beacon" onclick="start(1)" class="select" data-translate="start">START</button>
</td>
</tr>
<tr>
<td>Probe</td>
<td id="probeTargets">0</td>
<td id="probePkts">0/0</td>
<td><button id="probe" onclick="start(2)" class="select" data-translate="start">START</button></td>
<td><button id="probe" onclick="start(2)" class="select" data-translate="start">START</button>
</td>
</tr>
<tr>
<td colspan="2">All Pkts/s:</td>
@ -71,34 +83,39 @@
<h2>Deauth</h2>
<p data-translate="deauth_desc">
Closes the connection of WiFi devices by sending deauthentication frames to access points and client devices you selected.<br>
This is only possible because a lot of devices don't use the 802.11w-2009 standard that offers a protection against this attack.<br>
Please only select one target! When you select multiple targets that run on different channels and start the attack,
it will quickly switch between those channels and you have no chance to reconnect to the access point that hosts this web interface.
Closes the connection of WiFi devices by sending deauthentication frames to access points and client
devices you selected.<br>
This is only possible because a lot of devices don't use the 802.11w-2009 standard that offers a
protection against this attack.<br>
Please only select one target! When you select multiple targets that run on different channels and
start the attack,
it will quickly switch between those channels and you have no chance to reconnect to the access
point that hosts this web interface.
</p>
<h2>Beacon</h2>
<p data-translate="beacon_desc">
Beacon packets are used to advertise access points. By continuously sending beacon packets out, it will look like you created new WiFi networks.<br>
Beacon packets are used to advertise access points. By continuously sending beacon packets out, it
will look like you created new WiFi networks.<br>
You can specify the network names under SSIDs.<br>
</p>
<h2>Probe</h2>
<p data-translate="probe_desc">
Probe requests are sent by client devices to ask if a known network is nearby.<br>
Use this attack to confuse WiFi trackers by asking for networks that you specified in the SSID list.<br>
Use this attack to confuse WiFi trackers by asking for networks that you specified in the SSID
list.<br>
It's unlikely you will see any impact by this attack with your home network.<br>
</p>
<div id="copyright">
<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
</div>
</div>
</div>
<footer>
<span id="version">Version 2.6.0</span>
<br>
Version 2.5<br>
Copyright (c) 2020 Spacehuhn Technologies<br>
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>
</body>
<br>
<a href="http://deauther.maltronics.com" target="_blank">Wiki</a> | <a href="info.html">Credits</a>
</footer>
</body>
</html>

View File

@ -1,20 +1,24 @@
<!--- This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther -->
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="theme-color" content="#36393E">
<meta name="description" content="ESP8266 Deauther">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/site.js"></script>
</head>
<body onload="loadLang()">
</head>
<body onload="loadLang()">
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header" data-translate="warning">WARNING</h1>
<p class="centered" data-translate="disclaimer">
This project is a proof of concept for testing and educational purposes.<br>
@ -22,31 +26,35 @@
<br>
Use it only against your own networks and devices!<br>
<br>
It uses valid Wi-Fi frames described in the IEEE 802.11 standard and does not block or disrupt any frequencies.<br>
It uses valid Wi-Fi frames described in the IEEE 802.11 standard and does not block or disrupt any
frequencies.<br>
Please check the legal regulations in your country before using it.<br>
<br>
Please don't refer to this project as "jammer", that totally undermines the real purpose of this project!<br>
Please don't refer to this project as "jammer", as it undermines the real purpose of this
project!<br>
If you do, it only proves that you didn't understand anything of what this project stands for.<br>
Publishing content about this without without a proper explanation shows that you only do it for the clicks,
fame and/or money and have no respect for intellectual property, the community behind it and the fight for a better WiFi standard.<br>
Publishing content about this without without a proper explanation shows that you only do it for the
clicks,
fame and/or money and have no respect for intellectual property, the community behind it and the
fight for a better WiFi standard.<br>
<br>
For more information visit:
For more information visit:<br>
<a
href="https://github.com/spacehuhntech/esp8266_deauther">github.com/spacehuhntech/esp8266_deauther</a>
</p>
<p class="centered bold">
<a href="https://github.com/spacehuhn/esp8266_deauther">github.com/spacehuhn/esp8266_deauther</a><br>
<br>
<br>
<a class="button" href="scan.html" data-translate="disclaimer-button">I have read and understood the notice above</a>
<a class="button" href="scan.html" data-translate="disclaimer-button">I have read and understood the
notice above</a>
</p>
<div id="copyright">
<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
</div>
</div>
</div>
<footer>
<span id="version">Version 2.6.0</span>
<br>
Version 2.5<br>
Copyright (c) 2020 Spacehuhn Technologies<br>
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>
</body>
<br>
<a href="http://deauther.maltronics.com" target="_blank">Wiki</a> | <a href="info.html">Credits</a>
</footer>
</body>
</html>

View File

@ -1,42 +1,62 @@
<!--- This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther -->
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="theme-color" content="#36393E">
<meta name="description" content="ESP8266 Deauther">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/site.js"></script>
</head>
<body onload="loadLang()">
</head>
<body onload="loadLang()">
<nav>
<a href="scan.html" data-translate="scan">Scan</a>
<a href="ssids.html" data-translate="ssids">SSIDs</a>
<a href="attack.html" data-translate="attacks">Attacks</a>
<a href="settings.html" data-translate="settings">Settings</a>
<a class="right" href="info.html" data-translate="info">Info</a>
<ul class="menu">
<li><a href="scan.html" data-translate="scan">Scan</a></li>
<li><a href="ssids.html" data-translate="ssids">SSIDs</a></li>
<li><a href="attack.html" data-translate="attacks">Attack</a></li>
<li><a href="settings.html" data-translate="settings">Settings</a></li>
</ul>
</nav>
<div id="status"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header" data-translate="info">Info</h1>
<h1 class="header">Credits</h1>
<h2>ESP8266 Deauther</h2>
<p>
<span class="bold">Copyright (c) 2018 Stefan Kremser</span><br />
<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 against your own networks and devices!<br />
<br />
<span class="bold">Please don't refer to this project as "jammer", that totally undermines the real purpose of this project!</span>
<h2>Disclaimer</h2>
<p data-translate="disclaimer">
This project is a proof of concept for testing and educational purposes.<br>
Neither the ESP8266, nor its SDK was meant or build for such purposes. Bugs can occur!<br>
<br>
Use it only against your own networks and devices!<br>
<br>
It uses valid Wi-Fi frames described in the IEEE 802.11 standard and does not block or disrupt any
frequencies.<br>
Please check the legal regulations in your country before using it.<br>
<br>
Please don't refer to this project as "jammer", as it undermines the real purpose of this
project!<br>
If you do, it only proves that you didn't understand anything of what this project stands for.<br>
Publishing content about this without without a proper explanation shows that you only do it for the
clicks,
fame and/or money and have no respect for intellectual property, the community behind it and the
fight for a better WiFi standard.<br>
<br>
For more information visit:<br>
<a
href="https://github.com/spacehuhntech/esp8266_deauther">github.com/spacehuhntech/esp8266_deauther</a>
</p>
<h2>Credits</h2>
<h2>Acknowledgements</h2>
<p>
A huge thanks to:<br>
<ul>
@ -50,39 +70,52 @@
</ul>
for helping out with various things regarding this project and keeping it alive!<br>
<br>
I also want to thank Espressif and their community for this awesome chip and all the software and hardware projects around it and the countless tutorials you can find online!<br>
<br>
Shoutout to everyone working on the libraries used for this project:<br>
Also thanks to everyone working on the libraries used for this project:<br>
<ul>
<li><a href="https://github.com/ThingPulse/esp8266-oled-ssd1306" target="_blank">esp8266-oled-ssd1306</a></li>
<li><a href="https://github.com/ThingPulse/esp8266-oled-ssd1306"
target="_blank">esp8266-oled-ssd1306</a></li>
<li><a href="https://github.com/bblanchon/ArduinoJson" target="_blank">ArduinoJson</a></li>
<li><a href="https://github.com/ivanseidel/LinkedList" target="_blank">LinkedList</a></li>
<li><a href="https://github.com/adafruit/Adafruit_DotStar" target="_blank">Adafruit DotStar</a></li>
<li><a href="https://github.com/adafruit/Adafruit_NeoPixel" target="_blank">Adafruit NeoPixel</a>
</li>
<li><a href="https://github.com/NorthernWidget/DS3231" target="_blank">DS3231</a></li>
<li><a href="https://github.com/xoseperez/my92xx" target="_blank">my92xx</a></li>
</ul>
<br>
Also thanks to everyone that supports this project by <a href="http://spacehuhn.de/donate" target="_blank">donating]</a>, beeing my <a href="http://patreon.com/spacehuhn" target="_blank">patron</a> or buying one of the <a href="https://www.tindie.com/stores/lspoplove" target="_blank">official Deauther boards</a> from DSTIKE.<br>
We also thank Espressif and their community for this awesome chip and all the software and
hardware projects around it and the countless tutorials you can find online!<br>
</p>
<h2>Contact</h2>
<h2>License</h2>
<p>
Web: <a target="_blank" href="http://spacehuhn.com/">spacehuhn.com</a><br>
GitHub: <a target="_blank" href="http://github.com/spacehuhn/">github.com/spacehuhn</a><br />
Twitter: <a target="_blank" href="http://twitter.com/spacehuhn/">@spacehuhn</a><br />
E-mail: mail@spacehuhn.com<br />
<b>In regards to the firmware:</b><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">
<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
<br>
Version 2.5<br>
MIT License<br>
Copyright (c) 2020 Spacehuhn Technologies<br>
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
<br>
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:<br>
<br>
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.<br>
<br>
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.
</p>
</div>
</div>
</div>
</div>
</body>
<footer>
<span id="version">Version 2.6.0</span>
<br>
<br>
<a href="http://deauther.maltronics.com" target="_blank">Wiki</a> | <a href="info.html">Credits</a>
</footer>
</body>
</html>

View File

@ -1,23 +1,25 @@
var attackJSON = [[false,0,0],[false,0,0],[false,0,0]];
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
function draw(){
var attackJSON = [[false, 0, 0], [false, 0, 0], [false, 0, 0]];
function draw() {
getE("deauth").innerHTML = attackJSON[0][0] ? lang("stop") : lang("start");
getE("beacon").innerHTML = attackJSON[1][0] ? lang("stop") : lang("start");
getE("probe").innerHTML = attackJSON[2][0] ? lang("stop") : lang("start");
getE("deauthTargets").innerHTML = esc(attackJSON[0][1]+"");
getE("beaconTargets").innerHTML = esc(attackJSON[1][1]+"");
getE("probeTargets").innerHTML = esc(attackJSON[2][1]+"");
getE("deauthTargets").innerHTML = esc(attackJSON[0][1] + "");
getE("beaconTargets").innerHTML = esc(attackJSON[1][1] + "");
getE("probeTargets").innerHTML = esc(attackJSON[2][1] + "");
getE("deauthPkts").innerHTML = esc(attackJSON[0][2] + "/" + attackJSON[0][3]);
getE("beaconPkts").innerHTML = esc(attackJSON[1][2] + "/" + attackJSON[1][3]);
getE("probePkts").innerHTML = esc(attackJSON[2][2] + "/" + attackJSON[2][3]);
getE("allpkts").innerHTML = esc(attackJSON[3]+"");
getE("allpkts").innerHTML = esc(attackJSON[3] + "");
}
function start(mode){
switch(mode){
function start(mode) {
switch (mode) {
case 0:
attackJSON[0][0] = !attackJSON[0][0];
break;
@ -28,13 +30,13 @@ function start(mode){
attackJSON[2][0] = !attackJSON[2][0];
break;
}
getFile("run?cmd=attack"+(attackJSON[0][0] ? " -d":"")+(attackJSON[1][0] ? " -b":"")+(attackJSON[2][0] ? " -p":""),function(){
getFile("run?cmd=attack" + (attackJSON[0][0] ? " -d" : "") + (attackJSON[1][0] ? " -b" : "") + (attackJSON[2][0] ? " -p" : ""), function () {
draw();
});
}
function load(){
getFile("attack.json",function(response){
function load() {
getFile("attack.json", function (response) {
attackJSON = JSON.parse(response);
draw();
});

View File

@ -1,7 +1,9 @@
var nameJson = [];
var scanJson = {aps:[],stations:[]};
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
function drawScan(){
var nameJson = [];
var scanJson = { aps: [], stations: [] };
function drawScan() {
var html;
var selected;
var width;
@ -24,28 +26,28 @@ function drawScan(){
+ "<th class='remove'></th>"
+ "</tr>";
for(var i=0;i<scanJson.aps.length;i++){
selected = scanJson.aps[i][scanJson.aps[i].length-1];
for (var i = 0; i < scanJson.aps.length; i++) {
selected = scanJson.aps[i][scanJson.aps[i].length - 1];
width = parseInt(scanJson.aps[i][3]) + 130;
if(width < 50) color = "meter_red";
else if(width < 70) color = "meter_orange";
if (width < 50) color = "meter_red";
else if (width < 70) color = "meter_orange";
else color = "meter_green";
html += (selected ? "<tr class='selected'>" : "<tr>")
+ "<td class='id'>"+i+"</td>" // ID
+ "<td class='ssid'>"+esc(scanJson.aps[i][0])+"</td>" // SSID
+ "<td class='name'>"+(scanJson.aps[i][1].length > 0 ? esc(scanJson.aps[i][1]) : "<button onclick='add(0,"+i+")'>"+lang("add")+"</button>")+"</td>" // Name
+ "<td class='ch'>"+esc(scanJson.aps[i][2])+"</td>" // Ch
+ "<td class='id'>" + i + "</td>" // ID
+ "<td class='ssid'>" + esc(scanJson.aps[i][0]) + "</td>" // SSID
+ "<td class='name'>" + (scanJson.aps[i][1].length > 0 ? esc(scanJson.aps[i][1]) : "<button onclick='add(0," + i + ")'>" + lang("add") + "</button>") + "</td>" // Name
+ "<td class='ch'>" + esc(scanJson.aps[i][2]) + "</td>" // Ch
// RSSI
+ "<td class='rssi'><div class='meter_background'> <div class='meter_forground "+color+"' style='width: "+width+"%;'><div class='meter_value'>" + scanJson.aps[i][3] + "</div></div> </div></td>"
+ "<td class='enc'>"+esc(scanJson.aps[i][4])+"</td>" // ENC
+ "<td class='lock'>"+(scanJson.aps[i][4] == "-" ? "":"&#x1f512;")+"</td>" // Lock Emoji
+ "<td class='mac'>"+esc(scanJson.aps[i][5])+"</td>" // MAC
+ "<td class='vendor'>"+esc(scanJson.aps[i][6])+"</td>" // Vendor
+ "<td class='rssi'><div class='meter_background'> <div class='meter_forground " + color + "' style='width: " + width + "%;'><div class='meter_value'>" + scanJson.aps[i][3] + "</div></div> </div></td>"
+ "<td class='enc'>" + esc(scanJson.aps[i][4]) + "</td>" // ENC
+ "<td class='lock'>" + (scanJson.aps[i][4] == "-" ? "" : "&#x1f512;") + "</td>" // Lock Emoji
+ "<td class='mac'>" + esc(scanJson.aps[i][5]) + "</td>" // MAC
+ "<td class='vendor'>" + esc(scanJson.aps[i][6]) + "</td>" // Vendor
// Select
+ "<td class='selectColumn'><label class='checkBoxContainer'><input type='checkbox' "+(selected ? "checked" : "")+" onclick='selectRow(0,"+i+","+(selected ? "false" : "true")+")'><span class='checkmark'></span></label></td>"
+ "<td class='remove'><button class='red' onclick='remove(0,"+i+")'>X</button></td>" // Remove
+ "<td class='selectColumn'><label class='checkBoxContainer'><input type='checkbox' " + (selected ? "checked" : "") + " onclick='selectRow(0," + i + "," + (selected ? "false" : "true") + ")'><span class='checkmark'></span></label></td>"
+ "<td class='remove'><button class='red' onclick='remove(0," + i + ")'>X</button></td>" // Remove
+ "</tr>";
}
@ -66,31 +68,31 @@ function drawScan(){
+ "<th class='remove'></th>"
+ "</tr>";
for(var i=0;i<scanJson.stations.length;i++){
selected = scanJson.stations[i][scanJson.stations[i].length-1];
for (var i = 0; i < scanJson.stations.length; i++) {
selected = scanJson.stations[i][scanJson.stations[i].length - 1];
ap = "";
if(scanJson.stations[i][5] >= 0)
if (scanJson.stations[i][5] >= 0)
ap = esc(scanJson.aps[scanJson.stations[i][5]][0]);
html += (selected ? "<tr class='selected'>" : "<tr>")
+ "<td class='id'>"+i+"</td>" // ID
+ "<td class='vendor'>"+esc(scanJson.stations[i][3])+"</td>" // Vendor
+ "<td class='mac'>"+esc(scanJson.stations[i][0])+"</td>" // MAC
+ "<td class='ch'>"+esc(scanJson.stations[i][1])+"</td>" // Ch
+ "<td class='name'>"+(scanJson.stations[i][2].length > 0 ? esc(scanJson.stations[i][2]) : "<button onclick='add(1,"+i+")'>"+lang("add")+"</button>")+"</td>" // Name
+ "<td class='pkts'>"+esc(scanJson.stations[i][4])+"</td>" // Pkts
+ "<td class='ap'>"+ap+"</td>" // AP
+ "<td class='lastseen'>"+esc(scanJson.stations[i][6])+"</td>" // Last seen
+ "<td class='id'>" + i + "</td>" // ID
+ "<td class='vendor'>" + esc(scanJson.stations[i][3]) + "</td>" // Vendor
+ "<td class='mac'>" + esc(scanJson.stations[i][0]) + "</td>" // MAC
+ "<td class='ch'>" + esc(scanJson.stations[i][1]) + "</td>" // Ch
+ "<td class='name'>" + (scanJson.stations[i][2].length > 0 ? esc(scanJson.stations[i][2]) : "<button onclick='add(1," + i + ")'>" + lang("add") + "</button>") + "</td>" // Name
+ "<td class='pkts'>" + esc(scanJson.stations[i][4]) + "</td>" // Pkts
+ "<td class='ap'>" + ap + "</td>" // AP
+ "<td class='lastseen'>" + esc(scanJson.stations[i][6]) + "</td>" // Last seen
// Select
+ "<td class='selectColumn'><label class='checkBoxContainer'><input type='checkbox' "+(selected ? "checked" : "")+" onclick='selectRow(1,"+i+","+(selected ? "false" : "true")+")'><span class='checkmark'></span></label></td>"
+ "<td class='remove'><button class='red' onclick='remove(1,"+i+")'>X</button></td>" // Remove
+ "<td class='selectColumn'><label class='checkBoxContainer'><input type='checkbox' " + (selected ? "checked" : "") + " onclick='selectRow(1," + i + "," + (selected ? "false" : "true") + ")'><span class='checkmark'></span></label></td>"
+ "<td class='remove'><button class='red' onclick='remove(1," + i + ")'>X</button></td>" // Remove
+ "</tr>";
}
getE("stTable").innerHTML = html;
}
function drawNames(){
function drawNames() {
var html;
var selected;
@ -108,20 +110,20 @@ function drawNames(){
+ "<th class='remove'></th>"
+ "</tr>";
for(var i=0;i<nameJson.length;i++){
selected = nameJson[i][nameJson[i].length-1];
for (var i = 0; i < nameJson.length; i++) {
selected = nameJson[i][nameJson[i].length - 1];
html += (selected ? "<tr class='selected'>" : "<tr>")
+ "<td class='id'>"+i+"</td>" // ID
+ "<td class='mac' contentEditable='true' id='name_"+i+"_mac'>"+esc(nameJson[i][0])+"</td>" // MAC
+ "<td class='vendor'>"+esc(nameJson[i][1])+"</td>" // Vendor
+ "<td class='name' contentEditable='true' id='name_"+i+"_name'>"+esc(nameJson[i][2].substring(0,16))+"</td>" // Name
+ "<td class='ap' contentEditable='true' id='name_"+i+"_apbssid'>"+esc(nameJson[i][3])+"</td>" // AP-BSSID
+ "<td class='ch' contentEditable='true' id='name_"+i+"_ch'>"+esc(nameJson[i][4])+"</td>" // Ch
+ "<td class='save'><button class='green' onclick='save("+i+")'>"+lang("save")+"</button></td>" // Save
+ "<td class='id'>" + i + "</td>" // ID
+ "<td class='mac' contentEditable='true' id='name_" + i + "_mac'>" + esc(nameJson[i][0]) + "</td>" // MAC
+ "<td class='vendor'>" + esc(nameJson[i][1]) + "</td>" // Vendor
+ "<td class='name' contentEditable='true' id='name_" + i + "_name'>" + esc(nameJson[i][2].substring(0, 16)) + "</td>" // Name
+ "<td class='ap' contentEditable='true' id='name_" + i + "_apbssid'>" + esc(nameJson[i][3]) + "</td>" // AP-BSSID
+ "<td class='ch' contentEditable='true' id='name_" + i + "_ch'>" + esc(nameJson[i][4]) + "</td>" // Ch
+ "<td class='save'><button class='green' onclick='save(" + i + ")'>" + lang("save") + "</button></td>" // Save
// Select
+ "<td class='selectColumn'><label class='checkBoxContainer'><input type='checkbox' "+(selected ? "checked" : "")+" onclick='selectRow(2,"+i+","+(selected ? "false" : "true")+")'><span class='checkmark'></span></label></td>"
+ "<td class='remove'><button class='red' onclick='remove(2,"+i+")'>X</button></td>" // Remove
+ "<td class='selectColumn'><label class='checkBoxContainer'><input type='checkbox' " + (selected ? "checked" : "") + " onclick='selectRow(2," + i + "," + (selected ? "false" : "true") + ")'><span class='checkmark'></span></label></td>"
+ "<td class='remove'><button class='red' onclick='remove(2," + i + ")'>X</button></td>" // Remove
+ "</tr>";
}
@ -130,9 +132,9 @@ function drawNames(){
var duts;
var elxtime;
function scan(type){
function scan(type) {
getE('RButton').disabled = true;
switch(type){
switch (type) {
case 0:
getE('scanOne').disabled = true;
getE('scanZero').style.visibility = 'hidden';
@ -141,17 +143,17 @@ function scan(type){
case 1:
getE('scanZero').disabled = true;
getE('scanOne').style.visibility = 'hidden';
elxtime = parseInt(getE("scanTime").value+"000") + 1500;
elxtime = parseInt(getE("scanTime").value + "000") + 1500;
}
var cmdStr = "scan "
+ (type == 0 ? "aps " : "stations -t "+getE("scanTime").value+"s")
+ " -ch "+getE("ch").options[getE("ch").selectedIndex].value;
getFile("run?cmd="+cmdStr);
+ (type == 0 ? "aps " : "stations -t " + getE("scanTime").value + "s")
+ " -ch " + getE("ch").options[getE("ch").selectedIndex].value;
getFile("run?cmd=" + cmdStr);
duts = parseInt(type);
setTimeout(buttonFunc, elxtime)
}
function buttonFunc(){
function buttonFunc() {
switch (duts) {
case 0:
getE('scanZero').style.visibility = 'visible';
@ -164,128 +166,128 @@ function buttonFunc(){
getE('RButton').disabled = false;
}
function load(){
function load() {
// APs and Stations
getFile("run?cmd=save scan", function(){
getFile("scan.json",function(res){
getFile("run?cmd=save scan", function () {
getFile("scan.json", function (res) {
scanJson = JSON.parse(res);
drawScan();
});
});
// Names
getFile("run?cmd=save names", function(){
getFile("names.json",function(res){
getFile("run?cmd=save names", function () {
getFile("names.json", function (res) {
nameJson = JSON.parse(res);
drawNames();
});
});
}
function selectRow(type,id,selected){
switch(type){
function selectRow(type, id, selected) {
switch (type) {
case 0:
scanJson.aps[id][7] = selected;
drawScan();
getFile("run?cmd="+(selected ? "":"de")+"select ap "+id);
getFile("run?cmd=" + (selected ? "" : "de") + "select ap " + id);
break;
case 1:
scanJson.stations[id][7] = selected;
drawScan();
getFile("run?cmd="+(selected ? "":"de")+"select station "+id);
getFile("run?cmd=" + (selected ? "" : "de") + "select station " + id);
break;
case 2:
save(id);
nameJson[id][5] = selected;
drawNames();
getFile("run?cmd="+(selected ? "":"de")+"select name "+id);
getFile("run?cmd=" + (selected ? "" : "de") + "select name " + id);
}
}
function remove(type,id){
switch(type){
function remove(type, id) {
switch (type) {
case 0:
scanJson.aps.splice(id, 1);
drawScan();
getFile("run?cmd=remove ap "+id);
getFile("run?cmd=remove ap " + id);
break;
case 1:
scanJson.stations.splice(id, 1);
drawScan();
getFile("run?cmd=remove station "+id);
getFile("run?cmd=remove station " + id);
break;
case 2:
nameJson.splice(id, 1);
drawNames();
getFile("run?cmd=remove name "+id);
getFile("run?cmd=remove name " + id);
}
}
function save(id){
var mac = getE("name_"+id+"_mac").innerHTML.replace("<br>","");
var name = getE("name_"+id+"_name").innerHTML.replace("<br>","");
var apbssid = getE("name_"+id+"_apbssid").innerHTML.replace("<br>","");
var ch = getE("name_"+id+"_ch").innerHTML.replace("<br>","");
function save(id) {
var mac = getE("name_" + id + "_mac").innerHTML.replace("<br>", "");
var name = getE("name_" + id + "_name").innerHTML.replace("<br>", "");
var apbssid = getE("name_" + id + "_apbssid").innerHTML.replace("<br>", "");
var ch = getE("name_" + id + "_ch").innerHTML.replace("<br>", "");
var changed = mac != nameJson[id][0] || name != nameJson[id][2] || apbssid != nameJson[id][3] || ch != nameJson[id][4];
if(changed){
if (changed) {
nameJson[id][0] = mac;
nameJson[id][2] = name;
nameJson[id][3] = apbssid;
nameJson[id][4] = ch;
if(nameJson[id][0].length != 17){
if (nameJson[id][0].length != 17) {
showMessage("ERROR: MAC invalid");
return;
}
getFile("run?cmd=replace name "+id+" -n \""+nameJson[id][2]+"\" -m \""+nameJson[id][0]+"\" -ch "+nameJson[id][4]+" -b \""+nameJson[id][3]+"\" "+(nameJson[id][5] ? "-s" : ""));
getFile("run?cmd=replace name " + id + " -n \"" + nameJson[id][2] + "\" -m \"" + nameJson[id][0] + "\" -ch " + nameJson[id][4] + " -b \"" + nameJson[id][3] + "\" " + (nameJson[id][5] ? "-s" : ""));
drawNames();
}
}
function add(type,id){
if(nameJson.length >= 25){
function add(type, id) {
if (nameJson.length >= 25) {
showMessage("Device Name List is full!");
return;
}
switch(type){
switch (type) {
case 0:
getFile("run?cmd=add name \""+scanJson.aps[id][0]+"\" -ap "+id);
getFile("run?cmd=add name \"" + scanJson.aps[id][0] + "\" -ap " + id);
scanJson.aps[id][1] = scanJson.aps[id][0]; // name = SSID
nameJson.push([scanJson.aps[id][5],scanJson.aps[id][6],scanJson.aps[id][0],"",scanJson.aps[id][2],false]);
nameJson.push([scanJson.aps[id][5], scanJson.aps[id][6], scanJson.aps[id][0], "", scanJson.aps[id][2], false]);
drawScan();
break;
case 1:
getFile("run?cmd=add name \""+scanJson.stations[id][0]+"\" station "+id);
scanJson.stations[id][2] = "device_"+nameJson.length; // name = device_
nameJson.push([scanJson.stations[id][0],scanJson.stations[id][3],"device_"+nameJson.length,scanJson.aps[scanJson.stations[id][5]][5],scanJson.stations[id][1],false]);
getFile("run?cmd=add name \"" + scanJson.stations[id][0] + "\" station " + id);
scanJson.stations[id][2] = "device_" + nameJson.length; // name = device_
nameJson.push([scanJson.stations[id][0], scanJson.stations[id][3], "device_" + nameJson.length, scanJson.aps[scanJson.stations[id][5]][5], scanJson.stations[id][1], false]);
drawScan();
break;
case 2:
getFile("run?cmd=add name device_"+nameJson.length+" -m 00:00:00:00:00:00 -ch 1");
nameJson.push(["00:00:00:00:00:00","","device_"+nameJson.length,"",1,false]);
getFile("run?cmd=add name device_" + nameJson.length + " -m 00:00:00:00:00:00 -ch 1");
nameJson.push(["00:00:00:00:00:00", "", "device_" + nameJson.length, "", 1, false]);
drawNames();
}
drawNames();
}
function selectAll(type,select){
switch(type){
function selectAll(type, select) {
switch (type) {
case 0:
getFile("run?cmd="+(select ? "":"de")+"select aps");
for(var i=0;i<scanJson.aps.length;i++) scanJson.aps[i][7] = select;
getFile("run?cmd=" + (select ? "" : "de") + "select aps");
for (var i = 0; i < scanJson.aps.length; i++) scanJson.aps[i][7] = select;
drawScan();
break;
case 1:
getFile("run?cmd="+(select ? "":"de")+"select stations");
for(var i=0;i<scanJson.stations.length;i++) scanJson.stations[i][7] = select;
getFile("run?cmd=" + (select ? "" : "de") + "select stations");
for (var i = 0; i < scanJson.stations.length; i++) scanJson.stations[i][7] = select;
drawScan();
break;
case 2:
getFile("run?cmd="+(select ? "":"de")+"select names");
for(var i=0;i<nameJson.length;i++) nameJson[i][5] = select;
getFile("run?cmd=" + (select ? "" : "de") + "select names");
for (var i = 0; i < nameJson.length; i++) nameJson[i][5] = select;
drawNames();
}
}

View File

@ -1,36 +1,38 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
var settingsJson = {};
function load(){
getFile("settings.json",function(res){
function load() {
getFile("settings.json", function (res) {
settingsJson = JSON.parse(res);
draw();
});
}
function draw(){
function draw() {
var html = "";
for (var key in settingsJson) {
key = esc(key);
if (settingsJson.hasOwnProperty(key)) {
html += "<div class='row'>"
+ "<div class='col-6'>"
+ "<label class='settingName "+(typeof settingsJson[key] == "boolean" ? "labelFix":"")+"' for='"+key+"'>"+key+":</label>"
+ "<label class='settingName " + (typeof settingsJson[key] == "boolean" ? "labelFix" : "") + "' for='" + key + "'>" + key + ":</label>"
+ "</div>"
+ "<div class='col-6'>";
if(typeof settingsJson[key] == "boolean"){
html += "<label class='checkBoxContainer'><input type='checkbox' name='"+key+"' "+(settingsJson[key] ? "checked" : "")+" onchange='save(\""+key+"\",!settingsJson[\""+key+"\"])'><span class='checkmark'></span></label>";
}else if(typeof settingsJson[key] == "number"){
html += "<input type='number' name='"+key+"' value="+settingsJson[key]+" onchange='save(\""+key+"\",parseInt(this.value))'>";
}else if(typeof settingsJson[key] == "string"){
html += "<input type='text' name='"+key+"' value='"+settingsJson[key].toString()+"' "+(key=="version"?"readonly":"")+" onchange='save(\""+key+"\",this.value)'>";
if (typeof settingsJson[key] == "boolean") {
html += "<label class='checkBoxContainer'><input type='checkbox' name='" + key + "' " + (settingsJson[key] ? "checked" : "") + " onchange='save(\"" + key + "\",!settingsJson[\"" + key + "\"])'><span class='checkmark'></span></label>";
} else if (typeof settingsJson[key] == "number") {
html += "<input type='number' name='" + key + "' value=" + settingsJson[key] + " onchange='save(\"" + key + "\",parseInt(this.value))'>";
} else if (typeof settingsJson[key] == "string") {
html += "<input type='text' name='" + key + "' value='" + settingsJson[key].toString() + "' " + (key == "version" ? "readonly" : "") + " onchange='save(\"" + key + "\",this.value)'>";
}
html += "</div>"
+ "</div>"
+ "<div class='row'>"
+ "<div class='col-12'>"
+ "<p>"+lang("setting_"+key)+"</p>"
+ "<p>" + lang("setting_" + key) + "</p>"
+ "<hr>"
+ "</div>"
+ "</div>";
@ -39,12 +41,12 @@ function draw(){
getE("settingsList").innerHTML = html;
}
function save(key, value){
if(key){
function save(key, value) {
if (key) {
settingsJson[key] = value;
getFile("run?cmd=set "+key+" \""+value+"\"");
}else{
getFile("run?cmd=save settings",function(res){
getFile("run?cmd=set " + key + " \"" + value + "\"");
} else {
getFile("run?cmd=save settings", function (res) {
load();
});
}

View File

@ -1,11 +1,13 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
var langJson = {};
function getE(name){
function getE(name) {
return document.getElementById(name);
}
function esc(str) {
if(str){
if (str) {
return str.toString()
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
@ -17,48 +19,35 @@ function esc(str) {
return "";
}
function convertLineBreaks(str){
if(str){
function convertLineBreaks(str) {
if (str) {
str = str.toString();
str = str.replace(/(?:\r\n|\r|\n)/g,'<br>');
str = str.replace(/(?:\r\n|\r|\n)/g, '<br>');
return str;
}
return "";
}
function showMessage(msg, closeAfter){
var elmt = getE("error");
elmt.innerHTML = esc(msg)+"<a onclick='closeMessage()' id='closeError'>x</a>";
elmt.classList.remove('hide');
elmt.classList.add('show');
if(closeAfter !== undefined){
setTimeout(closeMessage(),closeAfter);
}
function showMessage(msg, closeAfter) {
getE("status").style.backgroundColor = "#d33";
console.error("disconnected (" + msg + ")");
getE("status").innerHTML = "disconnected";
}
function closeMessage(){
var elmt = getE("error");
elmt.innerHTML = "";
elmt.classList.remove('show');
elmt.classList.add('hide');
}
function getFile(adr, callback, timeout, method, onTimeout, onError){
function getFile(adr, callback, timeout, method, onTimeout, onError) {
/* fallback stuff */
if(adr === undefined) return;
if(callback === undefined) callback = function(){};
if(timeout === undefined) timeout = 8000;
if(method === undefined) method = "GET";
if(onTimeout === undefined) {
onTimeout = function(){
showMessage("ERROR: timeout loading file "+adr);
if (adr === undefined) return;
if (callback === undefined) callback = function () { };
if (timeout === undefined) timeout = 8000;
if (method === undefined) method = "GET";
if (onTimeout === undefined) {
onTimeout = function () {
showMessage("ERROR: timeout loading file " + adr);
};
}
if(onError === undefined){
onError = function(){
showMessage("ERROR: loading file: "+adr);
if (onError === undefined) {
onError = function () {
showMessage("ERROR: loading file: " + adr);
};
}
@ -72,9 +61,9 @@ function getFile(adr, callback, timeout, method, onTimeout, onError){
request.onerror = onError;
request.overrideMimeType("application/json");
request.onreadystatechange = function() {
if(this.readyState == 4){
if(this.status == 200){
request.onreadystatechange = function () {
if (this.readyState == 4) {
if (this.status == 200) {
callback(this.responseText);
}
}
@ -86,33 +75,38 @@ function getFile(adr, callback, timeout, method, onTimeout, onError){
console.log(adr);
}
function lang(key){
function lang(key) {
return convertLineBreaks(esc(langJson[key]));
}
function parseLang(fileStr){
function parseLang(fileStr) {
langJson = JSON.parse(fileStr);
if(langJson["lang"] != "en"){// no need to update the HTML
if (langJson["lang"] != "en") {// no need to update the HTML
var elements = document.querySelectorAll("[data-translate]");
for (i = 0; i < elements.length; i++) {
var element = elements[i];
element.innerHTML = lang(element.getAttribute("data-translate"));
}
}
document.querySelector('html').setAttribute("lang", langJson["lang"] );
if(typeof load !== 'undefined') load();
document.querySelector('html').setAttribute("lang", langJson["lang"]);
if (typeof load !== 'undefined') load();
}
function loadLang(){
function loadLang() {
var language = "default"; //navigator.language.slice(0, 2);
getFile("lang/" + language + ".lang",
parseLang,
2000,
"GET",
function(){
function () {
getFile("lang/en.lang", parseLang);
}, function(){
}, function () {
getFile("lang/en.lang", parseLang);
}
);
}
window.addEventListener('load', function () {
getE("status").style.backgroundColor = "#3c5";
getE("status").innerHTML = "connected";
});

View File

@ -1,15 +1,17 @@
var ssidJson = {"random":false,"ssids":[]};
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
function load(){
getFile("run?cmd=save ssids", function(){
getFile("ssids.json",function(res){
var ssidJson = { "random": false, "ssids": [] };
function load() {
getFile("run?cmd=save ssids", function () {
getFile("ssids.json", function (res) {
ssidJson = JSON.parse(res);
draw();
});
});
}
function draw(){
function draw() {
var html;
html = "<tr>"
@ -20,13 +22,13 @@ function draw(){
+ "<th class='remove'></th>"
+ "</tr>";
for(var i=0;i<ssidJson.ssids.length;i++){
for (var i = 0; i < ssidJson.ssids.length; i++) {
html += "<tr>"
+ "<td class='id'>"+i+"</td>" // ID
+ "<td class='ssid' contenteditable='true' id='ssid_"+i+"'>"+esc(ssidJson.ssids[i][0].substring(0,ssidJson.ssids[i][2]))+"</td>" // SSID
+ "<td class='lock clickable' onclick='changeEnc("+i+")' id='enc_"+i+"'>"+(ssidJson.ssids[i][1] ? "&#x1f512;" : "-")+"</td>" // Enc
+ "<td class='save'><button class='green' onclick='save("+i+")'>"+lang("save")+"</button></td>" // Save
+ "<td class='remove'><button class='red' onclick='remove("+i+")'>X</button></td>" // Remove
+ "<td class='id'>" + i + "</td>" // ID
+ "<td class='ssid' contenteditable='true' id='ssid_" + i + "'>" + esc(ssidJson.ssids[i][0].substring(0, ssidJson.ssids[i][2])) + "</td>" // SSID
+ "<td class='lock clickable' onclick='changeEnc(" + i + ")' id='enc_" + i + "'>" + (ssidJson.ssids[i][1] ? "&#x1f512;" : "-") + "</td>" // Enc
+ "<td class='save'><button class='green' onclick='save(" + i + ")'>" + lang("save") + "</button></td>" // Save
+ "<td class='remove'><button class='red' onclick='remove(" + i + ")'>X</button></td>" // Remove
+ "</tr>";
}
@ -35,71 +37,71 @@ function draw(){
getE("ssidTable").innerHTML = html;
}
function remove(id){
function remove(id) {
ssidJson.ssids.splice(id, 1);
getFile("run?cmd=remove ssid "+id);
getFile("run?cmd=remove ssid " + id);
draw();
}
function add(){
function add() {
var ssidStr = getE("ssid").value;
var wpa2 = getE("enc").checked;
var clones = getE("ssidNum").value;
var force = getE("overwrite").checked;
if(ssidStr.length > 0){
var cmdStr = "add ssid \""+ssidStr+"\""+(force ? " -f":" ")+" -cl "+clones;
if(wpa2) cmdStr += " -wpa2";
if (ssidStr.length > 0) {
var cmdStr = "add ssid \"" + ssidStr + "\"" + (force ? " -f" : " ") + " -cl " + clones;
if (wpa2) cmdStr += " -wpa2";
getFile("run?cmd="+cmdStr);
getFile("run?cmd=" + cmdStr);
for(var i=0;i<clones;i++){
if(ssidJson.ssids.length >= 60) ssidJson.ssids.splice(0,1);
ssidJson.ssids.push([ssidStr,wpa2]);
for (var i = 0; i < clones; i++) {
if (ssidJson.ssids.length >= 60) ssidJson.ssids.splice(0, 1);
ssidJson.ssids.push([ssidStr, wpa2]);
}
draw();
}
}
function enableRandom(){
if(ssidJson.random){
getFile("run?cmd=disable random",function(){
function enableRandom() {
if (ssidJson.random) {
getFile("run?cmd=disable random", function () {
load();
});
}else{
getFile("run?cmd=enable random "+getE("interval").value,function(){
} else {
getFile("run?cmd=enable random " + getE("interval").value, function () {
load();
});
}
}
function disableRandom(){
function disableRandom() {
}
function addSelected(){
getFile("run?cmd=add ssid -s"+(getE("overwrite").checked ? " -f":""));
function addSelected() {
getFile("run?cmd=add ssid -s" + (getE("overwrite").checked ? " -f" : ""));
}
function changeEnc(id){
function changeEnc(id) {
ssidJson.ssids[id][1] = !ssidJson.ssids[id][1];
draw();
save(id);
}
function removeAll(){
function removeAll() {
ssidJson.ssids = [];
getFile("run?cmd=remove ssids");
draw();
}
function save(id){
var name = getE("ssid_"+id).innerHTML.replace("<br>","").substring(0,32);
function save(id) {
var name = getE("ssid_" + id).innerHTML.replace("<br>", "").substring(0, 32);
var wpa2 = ssidJson.ssids[id][1];
ssidJson.ssids[id] = [name,wpa2];
ssidJson.ssids[id] = [name, wpa2];
getFile("run?cmd=replace ssid "+id+" -n \""+name+"\" "+(wpa2 ? "-wpa2" : ""));
getFile("run?cmd=replace ssid " + id + " -n \"" + name + "\" " + (wpa2 ? "-wpa2" : ""));
}

View File

@ -1,23 +0,0 @@
MIT License
Copyright (c) 2018 Stefan Kremser
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.
Do not redistribute, advertising or sell of this softwae as "jammer"!
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

@ -1,28 +1,36 @@
<!--- This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther -->
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="theme-color" content="#36393E">
<meta name="description" content="ESP8266 Deauther">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/site.js"></script>
<script src="js/scan.js"></script>
</head>
<body onload="loadLang()">
</head>
<body onload="loadLang()">
<nav>
<a href="scan.html" data-translate="scan">Scan</a>
<a href="ssids.html" data-translate="ssids">SSIDs</a>
<a href="attack.html" data-translate="attacks">Attacks</a>
<a href="settings.html" data-translate="settings">Settings</a>
<a class="right" href="info.html" data-translate="info">Info</a>
<ul class="menu">
<li><a href="scan.html" data-translate="scan">Scan</a></li>
<li><a href="ssids.html" data-translate="ssids">SSIDs</a></li>
<li><a href="attack.html" data-translate="attacks">Attack</a></li>
<li><a href="settings.html" data-translate="settings">Settings</a></li>
</ul>
</nav>
<div id="status"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header" data-translate="scan">Scan</h1>
<button id=scanZero onclick="scan(0)">Scan APs</button>
@ -67,11 +75,14 @@
<p>
<span class="red" data-translate="info_span">INFO: </span><br>
<span data-translate="scan_info">
- Click Scan and wait until the blue LED on your board turns off (or changes to green), then click on Reload.<br>
- The web interface will be unavailable during a station scan and you will have to reconnect!<br>
- Click Scan and wait until the blue LED on your board turns off (or changes to green), then
click on Reload.<br>
- The web interface will be unavailable during a station scan and you will have to
reconnect!<br>
- Please select only one target!<br>
</span>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and look at the serial monitor for further debugging.</span>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and
look at the serial monitor for further debugging.</span>
</p>
<hr>
@ -95,16 +106,15 @@
<button onclick="selectAll(2,true)" data-translate="select_all">select all</button>
<button onclick="selectAll(2,false)" data-translate="deselect_all">deselect all</button>
<button onclick="add(2)" data-translate="new">new</button>
<div id="copyright">
<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
</div>
</div>
</div>
<footer>
<span id="version">Version 2.6.0</span>
<br>
Version 2.5<br>
Copyright (c) 2020 Spacehuhn Technologies<br>
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>
</body>
<br>
<a href="http://deauther.maltronics.com" target="_blank">Wiki</a> | <a href="info.html">Credits</a>
</footer>
</body>
</html>

View File

@ -1,32 +1,41 @@
<!--- This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther -->
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="theme-color" content="#36393E">
<meta name="description" content="ESP8266 Deauther">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/site.js"></script>
<script src="js/settings.js"></script>
</head>
<body onload="loadLang()">
</head>
<body onload="loadLang()">
<nav>
<a href="scan.html" data-translate="scan">Scan</a>
<a href="ssids.html" data-translate="ssids">SSIDs</a>
<a href="attack.html" data-translate="attacks">Attacks</a>
<a href="settings.html" data-translate="settings">Settings</a>
<a class="right" href="info.html" data-translate="info">Info</a>
<ul class="menu">
<li><a href="scan.html" data-translate="scan">Scan</a></li>
<li><a href="ssids.html" data-translate="ssids">SSIDs</a></li>
<li><a href="attack.html" data-translate="attacks">Attack</a></li>
<li><a href="settings.html" data-translate="settings">Settings</a></li>
</ul>
</nav>
<div id="status"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header" data-translate="settings">Settings</h1>
<button onclick="getFile('run?cmd=stopap')" class="red" data-translate="wifi_off">WiFi off</button>
<button onclick="getFile('run?cmd=reset;;save settings')" class="red" data-translate="reset">Reset</button>
<button onclick="getFile('run?cmd=reset;;save settings')" class="red"
data-translate="reset">Reset</button>
<button onclick="getFile('run?cmd=reboot')" class="red right" data-translate="reboot">reboot</button>
<p>
@ -35,7 +44,8 @@
- Some settings require a reboot.<br>
- Click save to make sure that your changes are applied.<br>
</span>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and look at the serial monitor for further debugging.</span><br>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and
look at the serial monitor for further debugging.</span><br>
</p>
<button onclick="save()" data-translate="save">save</button>
@ -44,21 +54,13 @@
</div>
<div id="settingsList"></div>
<div class="row">
<div class="col-12">
<button onclick="save()" class="green">save</button>
<button onclick="load()">reload</button>
<div id="copyright">
<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
</div>
<footer>
<span id="version">Version 2.6.0</span>
<br>
Version 2.5<br>
Copyright (c) 2020 Spacehuhn Technologies<br>
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>
</body>
<br>
<a href="http://deauther.maltronics.com" target="_blank">Wiki</a> | <a href="info.html">Credits</a>
</footer>
</body>
</html>

View File

@ -1,28 +1,36 @@
<!--- This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther -->
<!Doctype html>
<html>
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
<meta name="theme-color" content="#36393E">
<meta name="description" content="ESP8266 Deauther">
<meta name="author" content="Spacehuhn - Stefan Kremser">
<meta name="theme-color" content="#36393E" />
<title>ESP8266 Deauther</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/site.js"></script>
<script src="js/ssids.js"></script>
</head>
<body onload="loadLang()">
</head>
<body onload="loadLang()">
<nav>
<a href="scan.html" data-translate="scan">Scan</a>
<a href="ssids.html" data-translate="ssids">SSIDs</a>
<a href="attack.html" data-translate="attacks">Attacks</a>
<a href="settings.html" data-translate="settings">Settings</a>
<a class="right" href="info.html" data-translate="info">Info</a>
<ul class="menu">
<li><a href="scan.html" data-translate="scan">Scan</a></li>
<li><a href="ssids.html" data-translate="ssids">SSIDs</a></li>
<li><a href="attack.html" data-translate="attacks">Attack</a></li>
<li><a href="settings.html" data-translate="settings">Settings</a></li>
</ul>
</nav>
<div id="status"></div>
<div class="container">
<div class="row">
<div class="col-12">
<div id="error" class="hide"></div>
<h1 class="header" data-translate="ssids">SSIDs</h1>
</div>
</div>
@ -55,7 +63,8 @@
<label data-translate="overwrite">Overwrite</label>
</div>
<div class="col-6">
<label class='checkBoxContainer'><input id="overwrite" type='checkbox' checked><span class='checkmark'></span></label>
<label class='checkBoxContainer'><input id="overwrite" type='checkbox' checked><span
class='checkmark'></span></label>
</div>
</div>
<div class="row">
@ -75,7 +84,8 @@
- Don't forget to click save when you edited a SSID.<br>
- You have to click Reload after cloning SSIDs.<br>
</span>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and look at the serial monitor for further debugging.</span><br>
<span data-translate="info_disclaimer">In case of an unexpected error, please reload the site and
look at the serial monitor for further debugging.</span><br>
</p>
<hr>
</div>
@ -91,24 +101,20 @@
<div class="row">
<div class="col-12">
<button onclick="enableRandom()" id="randomBtn">Enable Random Mode</button>
<p data-translate="random_desc">Enable the random mode to generate a random SSID list in a given interval.</p>
<p data-translate="random_desc">Enable the random mode to generate a random SSID list in a given
interval.</p>
<hr>
<table id="ssidTable"></table>
<button onclick="removeAll()" class="red" data-translate="remove_all">Remove All</button>
</div>
</div>
<div class="row">
<div class="col-12">
<div id="copyright">
<a href="https://github.com/spacehuhn/esp8266_deauther/wiki" target="_blank">Wiki</a> | <a href="https://github.com/spacehuhn/esp8266_deauther" target="_blank">GitHub</a><br>
</div>
<footer>
<span id="version">Version 2.6.0</span>
<br>
Version 2.5<br>
Copyright (c) 2020 Spacehuhn Technologies<br>
<a href="https://github.com/spacehuhn" target="_blank">github.com/spacehuhn</a>
</div>
</div>
</div>
</div>
</body>
<br>
<a href="http://deauther.maltronics.com" target="_blank">Wiki</a> | <a href="info.html">Credits</a>
</footer>
</body>
</html>

View File

@ -1,3 +1,5 @@
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */
/* Global */
body {
background: #36393e;
@ -13,7 +15,7 @@ h1 {
color: #bfbfbb;
padding: 0.2em 1em;
border-radius: 3px;
border-left: solid #4974a9 5px;
border-left: solid #20c20e 5px;
font-weight: 100;
}
@ -24,7 +26,7 @@ h2 {
color: #bfbfbb;
padding: 0.4em 1.8em;
border-radius: 3px;
border-left: solid #4974a9 5px;
border-left: solid #20c20e 5px;
font-weight: 100;
}
@ -84,13 +86,14 @@ p{
text-decoration: underline;
}
#error {
#status {
text-align: center;
text-transform: capitalize;
padding: 5px;
color: #fff;
background: #af3535;
border-radius: 5px;
padding: 10px;
margin-top: 10px;
position: sticky;
top: 0;
z-index: 99;
}
#closeError{
@ -100,8 +103,8 @@ p{
cursor: pointer;
}
#copyright{
font-size: 0.95em;
footer {
font-size: .95em;
text-align: center;
margin-top: 3em;
margin-bottom: 3em;
@ -274,24 +277,35 @@ th, td {
}
}
/* Navigation bar */
nav {
display: block;
padding: 8px 10px;
background: #2f3136;
background: #1d2236
font-weight: bold;
padding: 0 10px;
}
nav a {
color: #bfbfbf;
padding: 0.5em;
display: inline-block;
text-decoration: none;
color: inherit;
padding: 0 .5em;
}
nav a:hover{
background: #36393f;
color:#cecece;
border-radius: 4px;
.menu {
list-style-type: none;
margin: 0;
padding: 0;
margin: 0 auto;
display: flex;
flex-direction: row;
display:block;
}
.menu li {
margin: 10px 20px 10px 0;
display: inline-block;
}
.menu li:last-child {
float: right;
}
/* Inputs and buttons */