Skip to content

Commit e6a1433

Browse files
committed
Version 8.0
## What's new - Device information is now available on the `Info` Page, these include - Memory Usage (realtime updates) - Bootloader version & boot mode - Wi-PWN version & ESP8266 SDK version - Flash & Chip unique identifiers (IDs) - Wi-PWN now displays correctly on Firefox & Iceweasel *(Oh, and Internet Explorer)* - Fixed Input bug where the input label would overlap the input text - Animation improvements, the body only fades in once elements are fully loaded (Implemented on settings page) - Fixed Wi-PWN failing to load 404 elements if in a subdirectory (URLs use direct instead of relative paths) - Minor UI updates ## Android App updates - Now includes extra navigation items to different pages (including the useful, new info page) - Fixed `Open in browser` action menu bug - Added Discord & Github links to navigation pane *NOTE: The app publisher name was updated from `mirumcode.wi_pwn` to `samdd.wipwn`, if you had the previous version installed you will find yourself with duplicate apps*
1 parent 0f4493f commit e6a1433

File tree

11 files changed

+109
-32
lines changed

11 files changed

+109
-32
lines changed

arduino/Wi-PWN/Settings.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,8 @@ void Settings::send() {
304304
size_t Settings::getSysInfoSize() {
305305
String json = "{";
306306
size_t jsonSize = 0;
307-
uint32_t free = system_get_free_heap_size();
308307

309-
json += "\"availableram\":\"" + (String)free + "\",";
308+
json += "\"freememory\":\"" + (String)ESP.getFreeHeap() + "\",";
310309
json += "\"bootmode\":\"" + (String)ESP.getBootMode() + "\",";
311310
json += "\"bootversion\":\"" + (String)ESP.getBootVersion() + "\",";
312311
json += "\"sdkversion\":\"" + (String)ESP.getSdkVersion() + "\",";
@@ -322,10 +321,9 @@ size_t Settings::getSysInfoSize() {
322321
void Settings::sendSysInfo() {
323322
if (debug) Serial.println("getting sysinfo json");
324323
sendHeader(200, "text/json", getSysInfoSize());
325-
uint32_t free = system_get_free_heap_size();
326324

327325
String json = "{";
328-
json += "\"availableram\":\"" + (String)free + "\",";
326+
json += "\"freememory\":\"" + (String)ESP.getFreeHeap() + "\",";
329327
json += "\"bootmode\":\"" + (String)ESP.getBootMode() + "\",";
330328
json += "\"bootversion\":\"" + (String)ESP.getBootVersion() + "\",";
331329
json += "\"sdkversion\":\"" + (String)ESP.getSdkVersion() + "\",";

arduino/Wi-PWN/Wi-PWN.ino

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
************************************************
1010
*/
1111

12-
// Including some libraries we need //se
12+
// Including some libraries we need //
1313
#include <Arduino.h>
1414

1515
#include <ESP8266WiFi.h>
@@ -22,10 +22,11 @@
2222

2323
// Settings //
2424

25-
//#define USE_DISPLAY /* <-- uncomment that if you want to use the display */
26-
#define resetPin 4 /* <-- comment out or change if you need GPIO 4 for other purposes */
27-
//#define USE_LED16 /* <-- for the Pocket ESP8266 which has a LED on GPIO 16 to indicate if it's running */
28-
//#define USE_CAPTIVE_PORTAL /* <-- enable captive portal (redirects all pages to 192.168.4.1) - most devices flood the ESP8266 with requests */
25+
//#define USE_DISPLAY /* <-- uncomment that if you want to use the display */
26+
//#define GPIO0_DEAUTH_BUTTON /* <-- Enable using GPIO0 (Flash button on NodeMCUs) as a deauth attack toggle (CAN LEAD TO BLINKING OF LED ON STARTUP!)*/
27+
#define resetPin 4 /* <-- comment out or change if you need GPIO 4 for other purposes */
28+
//#define USE_LED16 /* <-- for the Pocket ESP8266 which has a LED on GPIO 16 to indicate if it's running */
29+
//#define USE_CAPTIVE_PORTAL /* <-- enable captive portal (redirects all pages to 192.168.4.1) - most devices flood the ESP8266 with requests */
2930

3031

3132
// Including everything for the OLED //
@@ -781,11 +782,13 @@ void loop() {
781782
}
782783

783784
#ifndef USE_DISPLAY
785+
#ifdef GPIO0_DEAUTH_BUTTON
784786
if(digitalRead(0) == LOW) {
785-
Serial.println("FLASH button (GPIO0) pressed, executing action...");
787+
Serial.println("FLASH button (GPIO0) pressed, toggling deauth attack...");
786788
attack.start(0);
787789
delay(400);
788790
}
791+
#endif
789792
#endif
790793

791794

3.44 KB
Binary file not shown.

arduino/Wi-PWN/data.h

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.
-1.36 MB
Binary file not shown.

web_server/html/dark.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ button:hover, .reboot:hover {
4242
fill: #fff
4343
}
4444
.WiFi span:nth-child(1) {
45-
box-shadow: inset 0 0 15px rgba(0, 0, 0, .15), 0 0 4px rgba(0,0,0,.15)
45+
box-shadow: inset 0 0 15px rgba(0, 0, 0, .15), 0 0 4px rgba(0,0,0,.15);
46+
-webkit-filter: initial;
47+
filter: initial;
4648
}
4749
.WiFi span:nth-child(2) {
4850
-webkit-filter: none;

web_server/html/info.html

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,46 @@
2828
<div class="main-wrap">
2929
<div class="container">
3030
<div class="card-container">
31-
<div class="settingsHeader">Wi-PWN</div>
31+
<div class="settingsHeader">Wi-PWN creator</div>
3232
<div class="card">
3333
<div class="card-content">
34-
34+
<p>
35+
Wi-PWN was designed by <a href="https://samdenty99.github.io/about"><b>Sam Denty</b></a>, from the original project by spacehuhn. Wi-PWN is released under the <a href="https://creativecommons.org/licenses/by-nc/4.0/">CC BY-NC 4.0</a> license.
36+
</p>
37+
<a href="https://samdenty99.github.io">
38+
<h2 class="center a light-text">
39+
https://samdd.me
40+
</h2>
41+
</a>
42+
</div>
43+
<div class="card-action">
44+
<a href="https://samdenty99.github.io/r?github" target="blank_">Github</a><a href="https://samdenty99.github.io/projects" class="right" target="blank_">Other projects</a>
3545
</div>
46+
</div>
47+
</div>
48+
<div class="card-container">
49+
<div class="settingsHeader">Wi-PWN</div>
50+
<div class="card">
3651
<table>
3752
<tr>
38-
<td>Installed version</td>
53+
<td>Wi-PWN version</td>
3954
<td id="version"></td>
40-
<td><button onclick="checkUpdate()">Check for updates</button></td>
55+
<td><button onclick="checkUpdate()" class="onlgr">Check for updates</button><button onclick="checkUpdate()" class="onsmr">Update</button></td>
56+
</tr>
57+
<tr>
58+
<td>Free memory</td>
59+
<td id="freememory"></td>
60+
<td id="flashsize"></td>
61+
</tr>
62+
<tr>
63+
<td>Versions</td>
64+
<td>Boot <b>v.<span id="bootversion"></span></b>_m.<span id="bootmode"></span></td>
65+
<td>SDK <b id="sdk"></b></td>
4166
</tr>
4267
<tr>
43-
<td>Available RAM</td>
44-
<td id="availableram"></td>
68+
<td>Flash &amp; Chip ID</td>
69+
<td><span id="flashid"></span></td>
70+
<td><span id="chipid"></span></td>
4571
</tr>
4672
</table>
4773
<div class="card-action">

web_server/html/js/functions.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var version = "7.1",
1+
var version = "8.0",
22
sL = getE('spinner-container'),
33
notification = document.getElementById("notification"),
44
themeColor = getComputedStyle(document.body),
@@ -159,10 +159,6 @@ function fadeIn() {
159159
setTimeout(function(){document.getElementsByClassName('main-wrap')[0].classList.add('animation')}, 1000)
160160
}
161161

162-
function checkUpdate() {
163-
window.open("https://samdenty99.github.io/r?https://Wi-PWN.samdd.me/update?installed="+version,'_blank');
164-
}
165-
166162
/* Set meta color */
167163
defaultMetaColor();
168164

web_server/html/js/info.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
11
var versionCell = getE("version"),
2-
availableram = getE("availableram");
2+
freememory = getE("freememory"),
3+
flashsize = getE("flashsize"),
4+
bootversion = getE("bootversion"),
5+
chipid = getE("chipid"),
6+
flashid = getE("flashid"),
7+
sdk = getE("sdk"),
8+
bootmode = getE("bootmode"),
9+
fm, fz, bm, bv, fi, ci, sk;
310

411
function getData() {
512
getResponse("sysinfo.json", function(responseText) {
613
var res = JSON.parse(responseText);
7-
availableram.innerHTML = res.availableram;
14+
fm = res.freememory.replace(/(.)(?=(\d{3})+$)/g,'$1,');
15+
fz = res.flashchipsize;
16+
bm = res.bootmode;
17+
bv = res.bootversion;
18+
fi = res.flashchipid;
19+
ci = res.chipid;
20+
sk = res.sdkversion;
21+
22+
freememory.innerHTML = "<b>" + fm + "</b> / 64,000";
23+
flashsize.innerHTML = bytesToSize(fz) + " flash";
24+
bootmode.innerHTML = bm;
25+
bootversion.innerHTML = bv;
26+
flashid.innerHTML = fi;
27+
chipid.innerHTML = ci;
28+
sdk.innerHTML = "v." + sk;
829
});
930
}
1031

32+
function bytesToSize(bytes) {
33+
var sizes = [' bytes', 'KB', 'MB', 'GB', 'TB'];
34+
if (bytes == 0) return '0 Byte';
35+
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
36+
return Math.round(bytes / Math.pow(1024, i), 2) + '' + sizes[i];
37+
};
38+
39+
function checkUpdate() {
40+
window.open("https://samdenty99.github.io/r?https://Wi-PWN.samdd.me/update?installed="+version+"&sdk="+sk+"&freememory="+fm+"&flashsize="+fz+"&bootmode="+bm+"&bootversion="+bv+"&flashid="+fi+"&chipid="+ci,'_blank');
41+
}
42+
1143
getData();
1244
versionCell.innerHTML = version;
1345
document.getElementsByClassName('main-wrap')[0].className = 'main-wrap fadeIn'

web_server/html/main.css

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,11 @@ img, nav, td {
457457
font-size: 11px;
458458
text-transform: uppercase;
459459
}
460+
.light-text {
461+
font-weight: 400;
462+
-webkit-margin-before: 0.4em;
463+
-webkit-margin-after: 0.4em;
464+
}
460465
a, .a {
461466
cursor: pointer;
462467
text-decoration: none;
@@ -539,7 +544,7 @@ hr.small {
539544
font-size: 1rem;
540545
line-height: 36px;
541546
height: 36px;
542-
padding: 0 2rem;
547+
padding: 0 1.5rem;
543548
cursor: pointer;
544549
transition: .3s ease;
545550
transition: box-shadow .3s ease, background .3s ease;
@@ -1014,6 +1019,11 @@ footer a {
10141019
margin-top: 5px !important;
10151020
}
10161021
}
1022+
@media (min-width:1000px) {
1023+
.onsmr {
1024+
display: none !important;
1025+
}
1026+
}
10171027

10181028
/************************ Tablet & mobile only styles *************************/
10191029
@media (max-width:520px) {
@@ -1048,6 +1058,14 @@ footer a {
10481058
margin-top: 80px !important;
10491059
opacity: 1 !important;
10501060
}
1061+
.onsmr {
1062+
padding: 0 1.3rem;
1063+
}
1064+
}
1065+
@media (max-width:1000px) {
1066+
.onlgr {
1067+
display: none !important;
1068+
}
10511069
}
10521070

10531071
/***************************** Mobile only styles *****************************/
@@ -1090,7 +1108,7 @@ footer a {
10901108
margin-bottom: 15px !important;
10911109
}
10921110
}
1093-
@media (max-width:300px) {
1111+
@media (max-width:260px) {
10941112
button.button-header {
10951113
margin-bottom: 30px !important;
10961114
}
@@ -1130,6 +1148,8 @@ footer a {
11301148
border-top-left-radius: 0;
11311149
background: rgba(0, 0, 0, .1);
11321150
box-shadow: inset 0 0 15px rgba(0, 0, 0, .15);
1151+
-webkit-filter: grayscale(45%);
1152+
filter: grayscale(45%);
11331153
}
11341154
.pointUp span:nth-child(1) {
11351155
-webkit-transform: rotate(45deg);

0 commit comments

Comments
 (0)