-
Notifications
You must be signed in to change notification settings - Fork 3
/
pom.xml
178 lines (170 loc) · 7.72 KB
/
pom.xml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ps5jb</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.ps5jb</groupId>
<artifactId>xploit</artifactId>
<packaging>jar</packaging>
<description>
This module contains the code that gets sent to the listener Xlet.
It contains both the part that gets executed as well as the utility that performs the sending.
Executing the JAR using "-jar" switch sends it to the target PS5 and executes the desired code.
</description>
<properties>
<bdjstack.dir>${project.basedir}/../lib</bdjstack.dir>
<!-- Class name of the payload that will be executed when JAR is loaded. -->
<xploit.payload></xploit.payload>
</properties>
<dependencies>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>bdj-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>javatv-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>gem-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>xlet</artifactId>
<version>${xlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>stubs</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>sdk</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- When compiling, make sure to patch base JDK modules with BD-J classes in order to not use newer API, not available on PS5 runtime. -->
<!-- The code also does Unsafe and Classloader manipulation so it's necessary to declare access to them. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>--patch-module</arg>
<arg>java.base=${bdjstack.dir}/pbp-base.jar</arg>
<arg>--patch-module</arg>
<arg>java.desktop=${bdjstack.dir}/pbp-desktop.jar</arg>
<arg>--patch-module</arg>
<arg>java.rmi=${bdjstack.dir}/pbp-rmi.jar</arg>
<arg>--limit-modules</arg>
<arg>java.base,java.desktop,java.rmi</arg>
<arg>--add-exports</arg>
<arg>java.base/jdk.internal.loader=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
<!-- Generate the JAR with the main class in the manifest. Main class is needed by the JAR loader -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifest>
<mainClass>org.ps5jb.client.JarMain</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Class-Path>stubs-${project.version}.jar xlet-${xlet.version}.jar gem-api-${project.version}.jar javatv-api-${project.version}.jar bdj-api-${project.version}.jar</Class-Path>
<PS5JB-Client-Payload>${xploit.payload}</PS5JB-Client-Payload>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy dependent JARs so that it's possible to execute it on a local development machine -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<includeScope>compile</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<!-- Embed all the dependent classes directly inside the final JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>default-shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>org.ps5jb:sdk</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
</filters>
<outputFile>${project.build.directory}/${project.build.finalName}.jar</outputFile>
</configuration>
</plugin>
<!-- Generate Javadoc for this project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>default-javadoc</id>
<phase>verify</phase>
<goals>
<goal>javadoc-no-fork</goal>
</goals>
<configuration>
<additionalJOptions>
<additionalJOption>--add-exports</additionalJOption>
<additionalJOption>java.base/jdk.internal.loader=ALL-UNNAMED</additionalJOption>
</additionalJOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>