Skip to content

Commit 8e310c6

Browse files
authored
Add files via upload
added the HTML files from the webinterface. To convert it into bytecode use minifier.html.
1 parent c32a887 commit 8e310c6

File tree

6 files changed

+532
-0
lines changed

6 files changed

+532
-0
lines changed

htmlfiles/attack.html

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<html>
2+
<head>
3+
<meta charset="utf-8">
4+
<link rel="stylesheet" href="style.css">
5+
<style>
6+
nav a:nth-child(3){
7+
background: #000;
8+
color:#fff;
9+
}
10+
</style>
11+
<script src="functions.js"></script>
12+
<meta name="viewport" content="width=device-width, initial-scale=0.8">
13+
</head>
14+
<body>
15+
<nav>
16+
<a href="index.html">APs</a>
17+
<a href="clients.html">Clients</a>
18+
<a href="attack.html">Attack</a>
19+
</nav>
20+
<div id="content">
21+
<h1>Attack</h1>
22+
23+
<p class="block bold">Selected AP:</p>
24+
<ul id="selectedAPs">
25+
</ul>
26+
27+
<br />
28+
29+
<p class="block bold">Selected Clients:</p>
30+
<ul id="selectedClients">
31+
</ul>
32+
33+
<br />
34+
35+
<table>
36+
</table>
37+
38+
<p class="small">
39+
<br>
40+
<b>deauth selected:</b><br>
41+
sends deauthentication frames and dissociation frames to the selected client(s) in the selected WiFi network.
42+
<br><br>
43+
<b>deauth all:</b><br>
44+
sends deauthentication frames and dissociation frames as broadcast to all clients in the selected WiFi network.
45+
<br><br>
46+
<b>beacon spam:</b><br>
47+
sends beacon frames with the same SSID as the selected WiFi access point.
48+
<br><br>
49+
<b>random beacon spam:</b><br>
50+
sends beacon frames with a random SSID .
51+
<br>
52+
</p>
53+
54+
</div>
55+
</body>
56+
<script>
57+
var selectedAPs = document.getElementById("selectedAPs");
58+
var selectedClients = document.getElementById("selectedClients");
59+
var table = document.getElementsByTagName("table")[0];
60+
61+
function getResults(){
62+
getResponse("attackInfo.json",function(responseText){
63+
var res = JSON.parse(responseText);
64+
var aps = "";
65+
var clients = "";
66+
var tr = "<tr><th>Attack</th><th>Status</th><th>Start/Stop</th></tr>";
67+
for(var i=0;i<res.aps.length;i++) aps += "<li>"+res.aps[i]+"</li>";
68+
for(var i=0;i<res.clients.length;i++) clients += "<li>"+res.clients[i]+"</li>";
69+
70+
selectedAPs.innerHTML = aps;
71+
selectedClients.innerHTML = clients;
72+
73+
for(var i=0;i<res.attacks.length;i++){
74+
if(res.attacks[i].running) tr += "<tr class='selected'>";
75+
else tr += "<tr>";
76+
77+
tr += "<td>"+res.attacks[i].name+"</td>";
78+
if(res.attacks[i].status == "ready") tr += "<td style='color:#1ecb1e'>"+res.attacks[i].status+"</td>";
79+
else tr += "<td style='color:#f00'>"+res.attacks[i].status+"</td>";
80+
if(res.attacks[i].running) tr += "<td><button class='marginNull selectedBtn' onclick='startStop("+i+")'>stop</button></td>";
81+
else tr += "<td><button class='marginNull' onclick='startStop("+i+")'>start</button></td>";
82+
83+
tr += "</tr>";
84+
}
85+
table.innerHTML = tr;
86+
});
87+
}
88+
89+
function startStop(num){
90+
getResponse("attackStart.json?num="+num,function(responseText){
91+
if(responseText == "true") {
92+
getResults();
93+
setTimeout(getResults,3000);
94+
}
95+
else alert("error");
96+
});
97+
}
98+
99+
getResults();
100+
</script>
101+
</html>

htmlfiles/clients.html

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<html>
2+
<head>
3+
<meta charset="utf-8">
4+
<link rel="stylesheet" href="style.css">
5+
<style>
6+
#clientScanStatus{
7+
margin-left: 1em;
8+
}
9+
nav a:nth-child(2){
10+
background: #000;
11+
color:#fff;
12+
}
13+
#clientScanStart{
14+
margin-left: 30px;
15+
}
16+
#clientScanTime{
17+
width: 60px;
18+
}
19+
</style>
20+
<script src="functions.js"></script>
21+
<meta name="viewport" content="width=device-width, initial-scale=0.8">
22+
</head>
23+
<body>
24+
<nav>
25+
<a href="index.html">APs</a>
26+
<a href="clients.html">Clients</a>
27+
<a href="attack.html">Attack</a>
28+
</nav>
29+
<div id="content">
30+
<h1>Scan for client devices</h1>
31+
32+
<label for="clientScanTime">Scan time:</label>
33+
<input type="number" id="scanTime" value="10">s
34+
35+
<button onclick="scan()" id="startScan">start</button>
36+
<a id="clientScanStatus">ready!</a>
37+
<br />
38+
<p class="warn" id="status">AP will be off while scanning!<p>
39+
<br />
40+
41+
<p class="block bold" id="clientsFound">Client devices found: 0</p>
42+
43+
<br />
44+
45+
<table>
46+
</table>
47+
</div>
48+
</body>
49+
<script>
50+
var table = document.getElementsByTagName('table')[0];
51+
var scanBtn = document.getElementById("startScan");
52+
var scanTime = document.getElementById("scanTime");
53+
var clientsFound = document.getElementById("clientsFound");
54+
var scanStatus = document.getElementById("clientScanStatus");
55+
56+
var res;
57+
58+
function compare(a,b) {
59+
if (a.packets > b.packets) return -1;
60+
if (a.packets < b.packets) return 1;
61+
return 0;
62+
}
63+
64+
function toggleBtn(onoff){
65+
if(onoff){
66+
scanBtn.style.visibility = 'visible';
67+
}else{
68+
scanBtn.style.visibility = 'hidden';
69+
}
70+
}
71+
72+
function getResults(reload = false){
73+
getResponse("ClientScanResults.json",function(responseText){
74+
res = JSON.parse(responseText);
75+
res.clients = res.clients.sort(compare);
76+
77+
clientsFound.innerHTML = "Client devices found: "+res.clients.length;
78+
79+
var tr = '';
80+
if(res.clients.length > 0) tr += '<tr><th>Pkts</th><th>Vendor</th><th>Name</th><th>MAC</th><th>Select</th></tr>';
81+
82+
for(var i=0;i<res.clients.length;i++){
83+
84+
if(res.clients[i].selected) tr += '<tr class="selected">';
85+
else tr += '<tr>';
86+
tr += '<td>'+res.clients[i].packets+'</td>';
87+
tr += '<td>'+res.clients[i].vendor+'</td>';
88+
tr += '<td>'+res.clients[i].name+' <a class="blue" onclick="changeName('+res.clients[i].id+')">edit</a></td>';
89+
tr += '<td>'+res.clients[i].mac+'</td>';
90+
91+
if(res.clients[i].selected) tr += '<td><button class="marginNull selectedBtn" onclick="select('+res.clients[i].id+')">deselect</button></td>';
92+
else tr += '<td><button class="marginNull" onclick="select('+res.clients[i].id+')">select</button></td>';
93+
94+
tr += '</tr>';
95+
}
96+
table.innerHTML = tr;
97+
toggleBtn(true);
98+
scanStatus.innerHTML = "";
99+
100+
if(reload == true) location.reload();
101+
102+
},function(){
103+
location.reload();
104+
},6000);
105+
106+
}
107+
108+
function scan(){
109+
getResponse("ClientScan.json?time="+scanTime.value,function(responseText){
110+
if(responseText == "true"){
111+
scanStatus.innerHTML = "scanning...";
112+
toggleBtn(false);
113+
setTimeout(function(){
114+
scanStatus.innerHTML = "reconnecting...";
115+
getResults(true);
116+
},scanTime.value*1000);
117+
}
118+
else alert("error");
119+
});
120+
}
121+
122+
function select(num){
123+
getResponse("clientSelect.json?num="+num,function(responseText){
124+
if(responseText == "true") getResults();
125+
else alert("error :/");
126+
});
127+
}
128+
129+
function changeName(id){
130+
var newName = prompt("Name for "+res.clients[id].mac);
131+
132+
getResponse("setName.json?id="+id+"&name="+newName,function(responseText){
133+
if(responseText == "true") getResults();
134+
else alert("error");
135+
});
136+
}
137+
138+
getResults();
139+
</script>
140+
</html>

htmlfiles/functions.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function getResponse(adr, callback, timeoutCallback = function(){alert("timeout error. Please reload the site");}, timeout = 3000){
2+
var xmlhttp = new XMLHttpRequest();
3+
xmlhttp.onreadystatechange = function() {
4+
if(xmlhttp.readyState == 4){
5+
if(xmlhttp.status == 200) callback(xmlhttp.responseText);
6+
else timeoutCallback();
7+
}
8+
};
9+
xmlhttp.open("GET", adr, true);
10+
xmlhttp.send();
11+
xmlhttp.timeout = timeout;
12+
xmlhttp.ontimeout = timeoutCallback;
13+
}

htmlfiles/index.html

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<html>
2+
<head>
3+
<meta charset="utf-8">
4+
<link rel="stylesheet" href="style.css">
5+
<style>
6+
#apScanStatus{
7+
margin-left: 1em;
8+
}
9+
nav a:first-child{
10+
background: #000;
11+
color:#fff;
12+
}
13+
#rssiBar{
14+
width: 100px;
15+
height: 15px;
16+
background: #fff;
17+
}
18+
#rssiBar > div{
19+
width: 52px;
20+
height: 15px;
21+
background: #c20000;
22+
}
23+
</style>
24+
<script src="functions.js"></script>
25+
<meta name="viewport" content="width=device-width, initial-scale=0.8">
26+
</head>
27+
<body>
28+
<nav>
29+
<a href="index.html">APs</a>
30+
<a href="clients.html">Clients</a>
31+
<a href="attack.html">Attack</a>
32+
</nav>
33+
<div id="content">
34+
<h1>Scan for WiFi access points</h1>
35+
36+
<button onclick="scan()" id="apScanStart">scan</button>
37+
<a id="scanInfo">scanning...</a>
38+
39+
<p class="block bold" id="networksFound">Networks found: 0</p>
40+
<p class="small">
41+
MAC: <span id="apMAC"></span><br />
42+
Vendor: <span id="apVendor"></span>
43+
</p>
44+
<br />
45+
46+
<table>
47+
</table>
48+
<p class="small">
49+
<br />
50+
WPA* = WPA/WPA2 auto mode
51+
</p>
52+
</div>
53+
</body>
54+
<script>
55+
var table = document.getElementsByTagName('table')[0];
56+
var networkInfo = document.getElementById('networksFound');
57+
var scanBtn = document.getElementById('apScanStart');
58+
var scanInfo = document.getElementById('scanInfo');
59+
var apMAC = document.getElementById('apMAC');
60+
var apVendor = document.getElementById('apVendor');
61+
62+
function toggleBtn(onoff){
63+
if(onoff){
64+
scanInfo.style.visibility = 'hidden';
65+
scanBtn.style.visibility = 'visible';
66+
}else{
67+
scanInfo.style.visibility = 'visible';
68+
scanBtn.style.visibility = 'hidden';
69+
}
70+
}
71+
72+
function compare(a,b) {
73+
if (a.rssi > b.rssi) return -1;
74+
if (a.rssi < b.rssi) return 1;
75+
return 0;
76+
}
77+
78+
function getResults(){
79+
toggleBtn(true);
80+
getResponse("APScanResults.json",function(responseText){
81+
var res = JSON.parse(responseText);
82+
res.aps = res.aps.sort(compare);
83+
networkInfo.innerHTML = "Networks found: "+res.aps.length;
84+
apMAC.innerHTML = "";
85+
apVendor.innerHTML = "";
86+
87+
var tr = '';
88+
if(res.aps.length > 0) tr += '<tr><th>Ch</th><th>SSID</th><th>RSSI</th><th>Encryption</th><th>Select</th></tr>';
89+
90+
for(var i=0;i<res.aps.length;i++){
91+
92+
if(res.aps[i].selected) tr += '<tr class="selected">';
93+
else tr += '<tr>';
94+
tr += '<td>'+res.aps[i].channel+'</td>';
95+
tr += '<td>'+res.aps[i].ssid+'</td>';
96+
tr += '<td>'+res.aps[i].rssi+' <meter value="'+res.aps[i].rssi+'" max="-30" min="-100" low="-80" high="-60" optimum="-50"></meter></td>';
97+
tr += '<td>'+res.aps[i].encryption+'</td>';
98+
99+
if(res.aps[i].selected){
100+
tr += '<td><button class="marginNull selectedBtn" onclick="select('+res.aps[i].id+')">deselect</button></td>';
101+
apMAC.innerHTML = res.aps[i].mac;
102+
apVendor.innerHTML = res.aps[i].vendor;
103+
}
104+
else tr += '<td><button class="marginNull" onclick="select('+res.aps[i].id+')">select</button></td>';
105+
tr += '</tr>';
106+
}
107+
table.innerHTML = tr;
108+
});
109+
}
110+
111+
function scan(){
112+
toggleBtn(false);
113+
getResponse("APScan.json",function(responseText){
114+
if(responseText == "true") getResults();
115+
else alert("error");
116+
toggleBtn(true);
117+
});
118+
}
119+
120+
function select(num){
121+
getResponse("APSelect.json?num="+num,function(responseText){
122+
if(responseText == "true") getResults();
123+
else alert("error");
124+
});
125+
}
126+
127+
getResults();
128+
</script>
129+
</html>

0 commit comments

Comments
 (0)