Skip to content

Commit c561f5c

Browse files
Removed SPIFFS partition and DNS server.
1 parent c7509d7 commit c561f5c

File tree

3 files changed

+3056
-18
lines changed

3 files changed

+3056
-18
lines changed

esp32-ps4-jailbreak.ino

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,59 @@
1-
#include <SPIFFS.h>
21
#include <WiFi.h>
3-
#include <DNSServer.h>
42
#include <AsyncTCP.h>
53
#include <ESPAsyncWebServer.h>
4+
#include "index_htm.h"
65

7-
//don't forget to upload the data folder to SPIFFS!!
6+
const char * AP_SSID = "ESP32 5.05 jailbreak server";
87

9-
IPAddress apIP( 192,168,4,1 );
8+
IPAddress apIP( 192, 168, 4, 1 );
109

11-
DNSServer dnsServer;
12-
AsyncWebServer server(80);
10+
AsyncWebServer server( 80 );
11+
12+
bool accessPointIsStarted = false;
1313

1414
void setup()
1515
{
16-
Serial.begin(115200);
16+
Serial.begin( 115200 );
1717
Serial.println();
1818
btStop();
1919

20-
SPIFFS.begin();
2120
// setup access point
22-
WiFi.mode(WIFI_AP);
23-
WiFi.softAPConfig (apIP, apIP, IPAddress( 255, 255, 255, 0 ) );
24-
WiFi.softAP("ESP32 5.05 jailbreak server");
21+
WiFi.mode( WIFI_AP );
22+
WiFi.softAP( "ESP32 5.05 jailbreak server" );
2523

26-
//setup dns server to send all traffic to esp32
27-
dnsServer.start( 53, "*", apIP);
24+
WiFi.onEvent( WiFiEvent );
2825

2926
//setup webserver
30-
server.serveStatic( "/", SPIFFS, "/" );
27+
server.on( "/", HTTP_GET, [] ( AsyncWebServerRequest * request )
28+
{
29+
AsyncWebServerResponse *response = request->beginResponse_P( 200, "text/html", index_htm, index_htm_len );
30+
request->send( response );
31+
});
3132

3233
server.begin();
3334

35+
while ( !accessPointIsStarted )
36+
{
37+
delay(10);
38+
};
39+
40+
Serial.println( "Ready." );
3441
Serial.print( "Browse to 'http://");
3542
Serial.print( WiFi.softAPIP() );
36-
Serial.print( "/index.html' to jailbreak your PS4 5.05." );
43+
Serial.println( "/' to jailbreak your PS4 5.05." );
3744
}
3845

39-
void loop() {
40-
dnsServer.processNextRequest();
46+
void loop() {}
47+
48+
void WiFiEvent( WiFiEvent_t event )
49+
{
50+
switch ( event )
51+
{
52+
case SYSTEM_EVENT_AP_START:
53+
WiFi.softAPConfig ( apIP, apIP, IPAddress( 255, 255, 255, 0 ) );
54+
accessPointIsStarted = true;
55+
break;
56+
default:
57+
break;
58+
}
4159
}

0 commit comments

Comments
 (0)