No description
.vscode | ||
lib | ||
src/com/kallendorf/fshook | ||
tool | ||
.gitignore | ||
README.md |
Getting Started
Dependencies
- FirstSpirit installation
- OpenJDK11 (On Windows this gets installed together with FS
C:/Users/<User>/.firstspirit/FSLauncher/jre/11.0.11/jre-win/jdk-11.0.11+9-jre/bin/java.exe
) - AspectJ https://www.eclipse.org/aspectj/ (already included)
- copy
.firstspirit/FSLauncher/jar/*
,.firstspirit_<version>/jars/*
(usually located in $HOME) of the FS installation intolib/
- Fix some FirstSpirit crap: open
.firstspirit/FSLauncher/jar/fs-isolated-client-<version>.jar
and replacede/javasoft\plaf\synthetica\SyntheticaIcon.class
withMETA-INF\versions\9\de\javasoft\plaf\synthetica\SyntheticaIcon.class
Paths
<java>
point to your (or FSs) OpenJDK11 installation<aspectjweaver.jar>
can be found inFSHook/tool
<classpath>
points tolib/*
andtool/*
- The seperator is
:
on Linux and;
on Windows.
Building
java -cp <classpath> org.aspectj.tools.ajc.Main -sourceroots 'src/' -injars lib/fs-isolated-client-*.jar -outjar bin/uploadPlugin.jar -outxml -9 -Xlintfile .vscode/ajc.properties",
What the hell?
AspectJ is a bytecode manipulation framework. In our case the method Plugins.getPlugins(ServerConnection, Class, BaseContext)
from de.espirit.firstspirit.client.plugin.Plugins
gets overriden to load the plugins registered in com.kallendorf.fshook.CustomLoader.pluginsToLoad
in addition to the default ones.
This allows th execution of arbitrary code within the FirstSprit client.