mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Refactor: migrate config to v2 format across examples and libagent
- examples: update config.toml to the v2 schema ([JarLoader] with Mode / InjectionDir / JarPath / EntryClass / EntryMethod) for inject-via-java-api, load-via-injector-exe and retransform-class - libagent: read JarLoader.* instead of JuiceAgent.Modules.JarLoader.*, use Config::isValid() and the new get()/getPath() accessors - libagent: rename call_java_impl to call_static_java_method
This commit is contained in:
1 parent
eb7fd31817
commit
f38a28e8b3
5 files changed
+47
-57
No files matched your search
@@ -1,14 +1,18 @@
|
||||
[JuiceAgent]
|
||||
Version = 1
|
||||
# See config.md for more information https://github.com/xiaozhou233/JuiceAgent/blob/main/docs/config.md
|
||||
|
||||
[JuiceAgent.Loader]
|
||||
[JuiceAgent]
|
||||
Version = 2
|
||||
JuiceAgentNativeLibraryPath = ""
|
||||
|
||||
[JuiceAgent.Modules]
|
||||
[JarLoader]
|
||||
# Mode: BuiltIn, CustomJar
|
||||
# BuiltIn: Use the built-in jar loader (recommended, support JuiceAgent-API ( https://github.com/xiaozhou233/JuiceAgent#juiceagent-api ))
|
||||
# CustomJar: Load the Jar directly, without using JuiceAgent-API
|
||||
# For more information, please refer to the documentation: https://github.com/xiaozhou233/JuiceAgent/blob/main/docs/advanced.md#load-custom-api--directly-load-jar
|
||||
Mode = "BuiltIn"
|
||||
|
||||
[JuiceAgent.Modules.JarLoader]
|
||||
Enabled = true
|
||||
# InjectionDir only works when Mode is BuiltIn
|
||||
InjectionDir = "./injection"
|
||||
JarPath = "./demo.jar"
|
||||
EntryClass = "Example.Main"
|
||||
EntryMethod = "run"
|
||||
EntryMethod = "run"
|
||||
@@ -1,21 +1,18 @@
|
||||
[JuiceAgent]
|
||||
Version = 1
|
||||
# See config.md for more information https://github.com/xiaozhou233/JuiceAgent/blob/main/docs/config.md
|
||||
|
||||
[JuiceAgent.Loader]
|
||||
# Path to JuiceAgent-API jar, leave empty to use the built-in API
|
||||
JuiceAgentAPIJarPath = ""
|
||||
# Path to libagent.dll, default is "./libagent.dll"
|
||||
[JuiceAgent]
|
||||
Version = 2
|
||||
JuiceAgentNativeLibraryPath = ""
|
||||
|
||||
[JuiceAgent.Modules]
|
||||
[JarLoader]
|
||||
# Mode: BuiltIn, CustomJar
|
||||
# BuiltIn: Use the built-in jar loader (recommended, support JuiceAgent-API ( https://github.com/xiaozhou233/JuiceAgent#juiceagent-api ))
|
||||
# CustomJar: Load the Jar directly, without using JuiceAgent-API
|
||||
# For more information, please refer to the documentation: https://github.com/xiaozhou233/JuiceAgent/blob/main/docs/advanced.md#load-custom-api--directly-load-jar
|
||||
Mode = "BuiltIn"
|
||||
|
||||
[JuiceAgent.Modules.JarLoader]
|
||||
Enabled = true
|
||||
# Directory containing dependency JARs to load into the JVM (put your deps here)
|
||||
# InjectionDir only works when Mode is BuiltIn
|
||||
InjectionDir = "./injection"
|
||||
# Path to the injection JAR to be loaded
|
||||
JarPath = "./demo.jar"
|
||||
# Entry class to be executed after loading the JAR
|
||||
EntryClass = "Example.Main"
|
||||
# Entry method, must be: public static void run()
|
||||
EntryMethod = "run"
|
||||
@@ -1,21 +1,18 @@
|
||||
[JuiceAgent]
|
||||
Version = 1
|
||||
# See config.md for more information https://github.com/xiaozhou233/JuiceAgent/blob/main/docs/config.md
|
||||
|
||||
[JuiceAgent.Loader]
|
||||
# Path to JuiceAgent-API jar, leave empty to use the built-in API
|
||||
JuiceAgentAPIJarPath = ""
|
||||
# Path to libagent.dll, default is "./libagent.dll"
|
||||
[JuiceAgent]
|
||||
Version = 2
|
||||
JuiceAgentNativeLibraryPath = ""
|
||||
|
||||
[JuiceAgent.Modules]
|
||||
[JarLoader]
|
||||
# Mode: BuiltIn, CustomJar
|
||||
# BuiltIn: Use the built-in jar loader (recommended, support JuiceAgent-API ( https://github.com/xiaozhou233/JuiceAgent#juiceagent-api ))
|
||||
# CustomJar: Load the Jar directly, without using JuiceAgent-API
|
||||
# For more information, please refer to the documentation: https://github.com/xiaozhou233/JuiceAgent/blob/main/docs/advanced.md#load-custom-api--directly-load-jar
|
||||
Mode = "BuiltIn"
|
||||
|
||||
[JuiceAgent.Modules.JarLoader]
|
||||
Enabled = true
|
||||
# Directory containing dependency JARs to load into the JVM (put your deps here)
|
||||
# InjectionDir only works when Mode is BuiltIn
|
||||
InjectionDir = "./injection"
|
||||
# Path to the injection JAR to be loaded
|
||||
JarPath = "./playload.jar"
|
||||
# Entry class to be executed after loading the JAR
|
||||
EntryClass = "playload"
|
||||
# Entry method, must be: public static void run()
|
||||
EntryMethod = "entry"
|
||||
Reference in new issue
Block a user