2024-04-09 20:38:40 +00:00
|
|
|
{
|
|
|
|
writeShellScriptBin,
|
|
|
|
writeText,
|
|
|
|
|
|
|
|
directory,
|
|
|
|
jdkPackage,
|
|
|
|
package
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-04-23 19:30:21 +00:00
|
|
|
server_conf = writeText "server.conf" "ghidra.repositories.dir=/var/lib/${directory}/repositories";
|
2024-04-09 20:38:40 +00:00
|
|
|
in writeShellScriptBin "ghidra-svrAdmin" ''
|
|
|
|
exec ${jdkPackage}/bin/java \
|
|
|
|
-cp ${package}/lib/ghidra/Ghidra/Framework/Utility/lib/Utility.jar \
|
|
|
|
-Djava.system.class.loader=ghidra.GhidraClassLoader \
|
|
|
|
-Dfile.encoding=UTF8 \
|
|
|
|
-Duser.country=US -Duser.language=en -Duser.variant= \
|
|
|
|
-Xshare:off ghidra.Ghidra ghidra.server.ServerAdmin \
|
|
|
|
${server_conf} "$@"
|
|
|
|
''
|