-
Notifications
You must be signed in to change notification settings - Fork 6
/
esp32-ps4-jailbreak.ino
62 lines (51 loc) · 1.44 KB
/
esp32-ps4-jailbreak.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include "index_htm.h"
const char * AP_SSID = "ESP32 5.05 jailbreak server";
const IPAddress AP_IP( 192, 168, 4, 1 );
const uint8_t ONBOARD_LED = 2;
void setup()
{
Serial.begin( 115200 );
Serial.println();
btStop();
// setup access point
WiFi.mode( WIFI_AP );
WiFi.softAP( AP_SSID );
WiFi.onEvent( WiFiEvent );
static AsyncWebServer server( 80 );
static const char * HTML_HEADER = "text/html";
//setup webserver
server.on( "/", HTTP_GET, [] ( AsyncWebServerRequest * request )
{
AsyncWebServerResponse *response = request->beginResponse_P( 200, HTML_HEADER, index_htm, index_htm_len );
request->send( response );
});
server.onNotFound( []( AsyncWebServerRequest * request )
{
request->send( 404, HTML_HEADER, "404 not found" );
});
server.begin();
}
void loop() {}
void WiFiEvent( WiFiEvent_t event )
{
switch ( event )
{
case SYSTEM_EVENT_AP_START:
WiFi.softAPConfig ( AP_IP, AP_IP, IPAddress( 255, 255, 255, 0 ) );
Serial.print( "1. Connect your PS4 to '" );
Serial.print( AP_SSID );
Serial.println( "' WiFi access point." );
Serial.println();
Serial.print( "2. Browse to 'http://");
Serial.print( WiFi.softAPIP() );
Serial.println( "/' to jailbreak your PS4 5.05." );
pinMode( ONBOARD_LED, OUTPUT );
digitalWrite( ONBOARD_LED, HIGH );
break;
default:
break;
}
}