mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
011fafb5b0 | ||
|
|
748b118fb1 | ||
|
|
b78839a8d4 | ||
|
|
8894a819f2 | ||
|
|
e25f0c304a | ||
|
|
bbea7b72c3 |
No files matched your search
@@ -7,101 +7,97 @@ JuiceAgent — a JVMTI-based injection library for loading external JARs and tra
|
||||
|
||||
**NOTICE:** Currently only supports **Windows**, and plans to support **Linux** in the future.
|
||||
|
||||
**NOTICE:** **Version 2.3 Build 1** is the current **stable release and is no longer being updated.** Version 3.0 and later have been rewritten and may contain unknown issues.
|
||||
|
||||
**WARNING:** This project is still in the experimental stage and is not recommended for production use.
|
||||
**Use this at your own risk.**
|
||||
|
||||
## Summary
|
||||
JuiceAgent is a JVMTI-native injection framework that injects native code into a target JVM to dynamically load external JARs and perform bytecode redefinition/transformations without requiring a javaagent (works when DisableAttachMechanism=true).
|
||||
## Features
|
||||
### JuiceAgent (src/libagent)
|
||||
Low-level injection implementation for loading JuiceLoader
|
||||
- Initialize JuiceLoader
|
||||
- Lightweight Library (No Javaagent)
|
||||
- Read Config File and Load JARs
|
||||
- Invoke JuiceLoader Bootstrap API
|
||||
This project is an implementation of the JuiceAgent-API. For more details, please see [This](https://github.com/xiaozhou233/JuiceAgent-API/blob/master/src/main/java/cn/xiaozhou233/juiceagent/api/JuiceAgent.java)
|
||||
|
||||
### libinjector (src/libinjector)
|
||||
Injector, supporting **ReflectiveDLLInjection** and CreateRemoteThread Inject.
|
||||
- Provides JNI functions for injecting DLLs into target processes
|
||||
- Get PID by process name
|
||||
- addToBootstrapClassLoaderSearch
|
||||
- addToSystemClassLoaderSearch
|
||||
- addToClassLoader
|
||||
- defineClass
|
||||
- redefineClass(ByName)
|
||||
- retransformClass(ByName)
|
||||
- getLoadedClasses
|
||||
- getClassByName
|
||||
- getClassBytes(ByName)
|
||||
|
||||
### JuiceLoader Native (src/juiceloader)
|
||||
Native library for [JuiceLoader](https://github.com/xiaozhou233/JuiceLoader) , Inject Jars/ Redefine class Low-level implementation.
|
||||
- Implements JuiceLoader's native API
|
||||
- init
|
||||
- injectJar
|
||||
- redefineClass (redefineClassByName)
|
||||
- retransformClass (retransformClassByName)
|
||||
- getLoadedClasses
|
||||
- getClassBytes (getClassBytesByName)
|
||||
- getClassByName
|
||||
- AddToBootstrapClassLoaderSearch
|
||||
- AddToSystemClassLoaderSearch
|
||||
- nativeGetThreadByName* (test function, myself-use)
|
||||
- nativeInjectJarToThread (test function, myself-use)
|
||||
## How To Use (For Version 2.3 Build 1)
|
||||
## How To Use (**For Version 3.0 Build 2**)
|
||||
|
||||
### 1. Download Files
|
||||
- Download `libagent`, `libinjector`, and `libjuiceloader` from the Release to the same directory.
|
||||
- Download JARs `bootstrap-api.jar`, `JuiceLoader.jar`, and `Entry.jar` (or your own JAR) to the same directory.
|
||||
### 1. ⬇️ Download Files
|
||||
- Download `libagent.dll` `libinject.dll` `libloader.dll` `injector.exe` from [Release](https://github.com/xiaozhou233/JuiceAgent/releases) and put them in `YourDir`
|
||||
- Download JARs `JuiceAgent-API-X.X.X+build.X.jar` from [JuiceAgent-API Release] (https://github.com/xiaozhou233/JuiceAgent-API/releases) and put them in `YourDir`
|
||||
|
||||
### 2. Write Config File
|
||||
Create a config file named `AgentConfig.toml` in the same directory. Example:
|
||||
### 2. ✍️ Write Config File
|
||||
Create a config file named `config.toml` in `YourDir`
|
||||
|
||||
```toml
|
||||
# Leave empty to use default values
|
||||
# Default values: <Current Directory>/default-name
|
||||
[JuiceAgent]
|
||||
# Default value: YourDir/JuiceAgent-API.jar
|
||||
JuiceAgentAPIJarPath = ""
|
||||
# Default value: YourDir/libagent.dll
|
||||
JuiceAgentNativePath = ""
|
||||
|
||||
# Example: JuiceLoaderJarPath = "D:\\Development\\JuiceSky\\build\\libs\\JuiceLoader-1.0.jar"
|
||||
# Default: <Current Directory>/JuiceLoader.jar
|
||||
JuiceLoaderJarPath = ""
|
||||
# Default: <Current Directory>/libjuiceloader.dll
|
||||
JuiceLoaderLibraryPath = ""
|
||||
# Default: <Current Directory>/injection/
|
||||
InjectionDir = ""
|
||||
# Default: <Current Directory>/Entry.jar
|
||||
EntryJarPath = "D:\\Development\\JuiceSky\\build\\libs\\JuiceSky-1.0-Hooked.jar"
|
||||
EntryClass = "cn.xiaozhou233.juicesky.LoaderEntry"
|
||||
[Entry]
|
||||
# Default value: YourDir/Entry.jar
|
||||
EntryJarPath = ""
|
||||
# Default value: com.example.Entry
|
||||
EntryClass = ""
|
||||
# Default value: start
|
||||
EntryMethod = "start"
|
||||
|
||||
[Runtime]
|
||||
# Default value: YourDir/injection
|
||||
InjectionDir = ""
|
||||
```
|
||||
| Method| Usage|
|
||||
| - | -|
|
||||
| **Reflective Inject** | Uses `libinjector`. Pass the config directory as a parameter. </br></br> Example: config file at `<YourDir>/AgentConfig.toml`, </br></br>pass `<YourDir>` as parameter.</br></br> Example:</br>`C/C++: libinjector.dll -> inject(pid, agentpath, configpath)`</br>`Java: See 3. Invoke Inject Function`|
|
||||
| **Normal Inject** | Uses `LoadLibraryA + CreateRemoteThread`. Keep `AgentConfig.toml` and all DLLs/JARs in the same directory.</br>
|
||||
|
||||
### 3. Invoke Inject Function
|
||||
C/C++ Use libinjector and invoke inject(int pid, char* path, InjectParameters *params)
|
||||
### 3. 💉 Run Injector
|
||||
#### **Method A** : Use `injector.exe`
|
||||
Run `injector.exe`
|
||||
```
|
||||
114514 loop
|
||||
Input PID:
|
||||
```
|
||||
|
||||
Java Use `Injecor.jar`: `java -jar Injecor.jar` or
|
||||
```
|
||||
package cn.xiaozhou233.juiceagent.injector;
|
||||
Input PID of target process and press Enter
|
||||
|
||||
#### **Method B** : Use JNI to call `inject` function
|
||||
Create a file named cn/xiaozhou233/juiceagent/injector.java in your project
|
||||
```java
|
||||
package cn.xiaozhou233.juiceagent.injector;
|
||||
|
||||
public class InjectorNative {
|
||||
/*
|
||||
* @param pid target process id
|
||||
*/
|
||||
public native boolean inject(int pid, String path);
|
||||
/*
|
||||
* @param pid target process id
|
||||
*/
|
||||
public native boolean inject(int pid, String path);
|
||||
|
||||
/*
|
||||
* @param pid target process id
|
||||
* @param path injection dll path
|
||||
* @param configPath config file path
|
||||
*/
|
||||
public native boolean inject(int pid, String path, String configPath);
|
||||
/*
|
||||
* @param pid target process id
|
||||
* @param path injection dll path
|
||||
* @param configPath config file path
|
||||
*/
|
||||
public native boolean inject(int pid, String path, String configPath);
|
||||
}
|
||||
```
|
||||
```
|
||||
Then write it down somewhere
|
||||
```java
|
||||
// Your class
|
||||
import cn.xiaozhou233.juiceagent.injector.InjectorNative;
|
||||
|
||||
System.load("<path-to-libinjector>");
|
||||
System.load("<path-to-libinject>");
|
||||
InjectorNative injectorNative = new InjectorNative();
|
||||
|
||||
injectorNative.inject(<pid>, "<path-to-libagent>", "<path-to-toml-config-dir>");
|
||||
injectorNative.inject(<pid>, "<path-to-libloader>", "<path-to-toml-config-dir>");
|
||||
```
|
||||
### 4. ✅ Done!
|
||||
if injection is successful, target process will load `Entry.jar` (or `EntryClass` in config file) and run `EntryMethod` method(or `start` method in config file)
|
||||
|
||||
### 4. Done!
|
||||
If the injection is successful, EntryClass .EntryMethod() of <EntryJarPath> will be executed.
|
||||
## Hot To Build
|
||||
### Environment
|
||||
- Java 8+
|
||||
@@ -115,9 +111,10 @@ cd JuiceAgent
|
||||
mkdir -p build
|
||||
cmake --build build --
|
||||
```
|
||||
dlls: build/bin/
|
||||
|
||||
jars: see [JuiceLoader](https://github.com/xiaozhou233/JuiceLoader)
|
||||
Dlls will be generated in `build/bin` directory
|
||||
|
||||
Jars can be build or download in project [JuiceAgent-API](https://github.com/xiaozhou233/JuiceAgent-API)
|
||||
|
||||
## Full Disclaimer/ 完整免责声明
|
||||
Disclaimer: This project is intended for learning and research in controlled environments only. The author is not responsible for any consequences arising from unauthorized use, modification, cracking, or violation of any applicable agreements or laws. Users are responsible for ensuring their actions are legal and compliant.
|
||||
|
||||
+89
-116
@@ -1,173 +1,145 @@
|
||||
# JuiceAgent
|
||||
[English](https://github.com/xiaozhou233/JuiceAgent/blob/main/README.md) | [中文](https://github.com/xiaozhou233/JuiceAgent/blob/main/README_zh.md)
|
||||
|
||||
JuiceAgent —— 一个基于 **JVMTI** 的注入库,用于在 **DisableAttachMechanism 启用的情况下**,向目标 JVM 注入外部 JAR 并对 Java 字节码进行转换。
|
||||
JuiceAgent —— 一个基于 JVMTI 的注入库,用于加载外部 JAR 并对 Java 字节码进行热替换,即使在 DisableAttachMechanism 启用的情况下也可使用。
|
||||
|
||||
**注意:** 当前仅支持 **Windows**,未来计划支持 **Linux**。
|
||||
|
||||
**注意:** **Version 2.3 Build 1** 是当前的 **稳定版本且已停止更新**。3.0 及之后版本已重构,可能存在未知问题。
|
||||
|
||||
**警告:** 本项目仍处于实验阶段,不建议用于生产环境。
|
||||
**使用风险自负。**
|
||||
|
||||
---
|
||||
|
||||
## 简介(Summary)
|
||||
|
||||
JuiceAgent 是一个基于 **JVMTI 的原生注入框架**,通过向目标 JVM 注入原生代码,实现 **动态加载外部 JAR** 以及 **类重定义 / 类重转换**,并且 **无需使用 javaagent**(即使 `DisableAttachMechanism=true` 也可正常工作)。
|
||||
## 简介
|
||||
JuiceAgent 是一个基于 JVMTI 的原生注入框架,通过向目标 JVM 注入代码,实现动态加载外部 JAR 以及字节码热替换,无需使用 javaagent(在 DisableAttachMechanism=true 时仍可工作)。
|
||||
|
||||
---
|
||||
|
||||
## 特性(Features)
|
||||
## 功能特性
|
||||
|
||||
### JuiceAgent(`src/libagent`)
|
||||
用于加载 JuiceLoader 的底层注入实现:
|
||||
本项目是 JuiceAgent-API 的Native实现,详细内容请参考:
|
||||
https://github.com/xiaozhou233/JuiceAgent-API/blob/master/src/main/java/cn/xiaozhou233/juiceagent/api/JuiceAgent.java
|
||||
|
||||
- 初始化 JuiceLoader
|
||||
- 轻量级库(无需 Java Agent)
|
||||
- 读取配置文件并加载 JAR
|
||||
- 调用 JuiceLoader Bootstrap API
|
||||
- addToBootstrapClassLoaderSearch
|
||||
- addToSystemClassLoaderSearch
|
||||
- addToClassLoader
|
||||
- defineClass
|
||||
- redefineClass(ByName)
|
||||
- retransformClass(ByName)
|
||||
- getLoadedClasses
|
||||
- getClassByName
|
||||
- getClassBytes(ByName)
|
||||
|
||||
---
|
||||
|
||||
### libinjector(`src/libinjector`)
|
||||
注入器模块,支持 **ReflectiveDLLInjection** 与 **CreateRemoteThread** 注入方式:
|
||||
## 使用方法(适用于 Version 3.0 Build 2)
|
||||
|
||||
- 提供 JNI 接口,用于向目标进程注入 DLL
|
||||
- 支持通过进程名获取 PID
|
||||
### 1. ⬇️ 下载文件
|
||||
|
||||
- 从 Release 下载:
|
||||
- libagent.dll
|
||||
- libinject.dll
|
||||
- libloader.dll
|
||||
- injector.exe
|
||||
并放入 `YourDir`
|
||||
|
||||
- 从 JuiceAgent-API Release 下载:
|
||||
- JuiceAgent-API-X.X.X+build.X.jar
|
||||
并放入 `YourDir`
|
||||
|
||||
---
|
||||
|
||||
### JuiceLoader Native(`src/juiceloader`)
|
||||
[JuiceLoader](https://github.com/xiaozhou233/JuiceLoader) 的原生实现,用于 JAR 注入与类重定义的底层支持。
|
||||
### 2. ✍️ 编写配置文件
|
||||
|
||||
实现的 Native API 包括:
|
||||
|
||||
- `init`
|
||||
- `injectJar`
|
||||
- `redefineClass`(`redefineClassByName`)
|
||||
- `retransformClass`(`retransformClassByName`)
|
||||
- `getLoadedClasses`
|
||||
- `getClassBytes`(`getClassBytesByName`)
|
||||
- `getClassByName`
|
||||
- `AddToBootstrapClassLoaderSearch`
|
||||
- `AddToSystemClassLoaderSearch`
|
||||
- `nativeGetThreadByName`(测试函数,自用)
|
||||
- `nativeInjectJarToThread`(测试函数,自用)
|
||||
|
||||
---
|
||||
|
||||
## 使用方法(How To Use,Version 2.3 Build 1)
|
||||
|
||||
### 1. 下载文件
|
||||
|
||||
- 从 Release 页面下载 `libagent`、`libinjector`、`libjuiceloader`,并放置在 **同一目录**
|
||||
- 下载以下 JAR 并放置在同一目录:
|
||||
- `bootstrap-api.jar`
|
||||
- `JuiceLoader.jar`
|
||||
- `Entry.jar`(或你自己的 JAR)
|
||||
|
||||
---
|
||||
|
||||
### 2. 编写配置文件
|
||||
|
||||
在同一目录下创建 `AgentConfig.toml`,示例如下:
|
||||
在 `YourDir` 下创建 `config.toml`
|
||||
|
||||
```toml
|
||||
# 留空表示使用默认值
|
||||
# 默认值:<当前目录>/default-name
|
||||
[JuiceAgent]
|
||||
# 默认值: YourDir/JuiceAgent-API.jar
|
||||
JuiceAgentAPIJarPath = ""
|
||||
# 默认值: YourDir/libagent.dll
|
||||
JuiceAgentNativePath = ""
|
||||
|
||||
# 示例:
|
||||
# JuiceLoaderJarPath = "D:\Development\JuiceSky\build\libs\JuiceLoader-1.0.jar"
|
||||
|
||||
# 默认:<当前目录>/JuiceLoader.jar
|
||||
JuiceLoaderJarPath = ""
|
||||
|
||||
# 默认:<当前目录>/libjuiceloader.dll
|
||||
JuiceLoaderLibraryPath = ""
|
||||
|
||||
# 默认:<当前目录>/injection/
|
||||
InjectionDir = ""
|
||||
|
||||
# 默认:<当前目录>/Entry.jar
|
||||
EntryJarPath = "D:\Development\JuiceSky\build\libs\JuiceSky-1.0-Hooked.jar"
|
||||
|
||||
EntryClass = "cn.xiaozhou233.juicesky.LoaderEntry"
|
||||
[Entry]
|
||||
# 默认值: YourDir/Entry.jar
|
||||
EntryJarPath = ""
|
||||
# 默认值: com.example.Entry
|
||||
EntryClass = ""
|
||||
# 默认值: start
|
||||
EntryMethod = "start"
|
||||
|
||||
[Runtime]
|
||||
# 默认值: YourDir/injection
|
||||
InjectionDir = ""
|
||||
```
|
||||
|
||||
#### 注入方式说明
|
||||
|
||||
| 注入方式 | 说明 |
|
||||
|---------|------|
|
||||
| **Reflective 注入** | 使用 `libinjector`,将 **配置文件所在目录** 作为参数传入。<br/><br/>示例:配置文件位于 `<YourDir>/AgentConfig.toml`,则传入 `<YourDir>`。<br/><br/>调用示例:<br/>`C/C++: libinjector.dll -> inject(pid, agentPath, configPath)`<br/>`Java: 见下方步骤` |
|
||||
| **普通注入** | 使用 `LoadLibraryA + CreateRemoteThread`。<br/>要求 `AgentConfig.toml` 与所有 DLL / JAR 位于同一目录 |
|
||||
|
||||
---
|
||||
|
||||
### 3. 调用注入函数
|
||||
### 3. 💉 执行注入
|
||||
|
||||
#### C / C++
|
||||
#### 方法 A:使用 injector.exe
|
||||
|
||||
使用 `libinjector`,调用:
|
||||
运行`inject.exe`:
|
||||
|
||||
```
|
||||
inject(int pid, char* path, InjectParameters *params)
|
||||
114514 loop
|
||||
Input PID:
|
||||
```
|
||||
|
||||
#### Java
|
||||
输入目标进程 PID 后回车
|
||||
|
||||
使用 `Injecor.jar`:
|
||||
---
|
||||
|
||||
```
|
||||
java -jar Injecor.jar
|
||||
```
|
||||
#### 方法 B:使用 JNI 调用 inject
|
||||
|
||||
或通过 Native 接口:
|
||||
创建文件:
|
||||
`cn/xiaozhou233/juiceagent/injector/InjectorNative.java`
|
||||
|
||||
```java
|
||||
package cn.xiaozhou233.juiceagent.injector;
|
||||
|
||||
public class InjectorNative {
|
||||
/*
|
||||
* @param pid target process id
|
||||
*/
|
||||
public native boolean inject(int pid, String path);
|
||||
|
||||
/*
|
||||
* @param pid target process id
|
||||
*/
|
||||
public native boolean inject(int pid, String path);
|
||||
|
||||
/*
|
||||
* @param pid target process id
|
||||
* @param path injection dll path
|
||||
* @param configPath config file path
|
||||
*/
|
||||
public native boolean inject(int pid, String path, String configPath);
|
||||
/*
|
||||
* @param pid target process id
|
||||
* @param path injection dll path
|
||||
* @param configPath config file path
|
||||
*/
|
||||
public native boolean inject(int pid, String path, String configPath);
|
||||
}
|
||||
```
|
||||
|
||||
使用示例:
|
||||
调用示例:
|
||||
|
||||
```java
|
||||
import cn.xiaozhou233.juiceagent.injector.InjectorNative;
|
||||
|
||||
System.load("<path-to-libinjector>");
|
||||
System.load("<path-to-libinject>");
|
||||
InjectorNative injectorNative = new InjectorNative();
|
||||
|
||||
injectorNative.inject(<pid>, "<path-to-libagent>", "<path-to-toml-config-dir>");
|
||||
injectorNative.inject(<pid>, "<path-to-libloader>", "<path-to-toml-config-dir>");
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. 完成
|
||||
### 4. ✅ 完成
|
||||
|
||||
如果注入成功,将会执行 `<EntryJarPath>` 中配置的:
|
||||
注入成功后,目标进程将加载:
|
||||
|
||||
```
|
||||
EntryClass.EntryMethod()
|
||||
```
|
||||
- Entry.jar(或配置中的 EntryClass)
|
||||
- 并执行 EntryMethod(默认 start)
|
||||
|
||||
---
|
||||
|
||||
## 构建方式(How To Build)
|
||||
## 如何构建
|
||||
|
||||
### 构建环境
|
||||
### 环境要求
|
||||
|
||||
- Java 8+
|
||||
- MinGW
|
||||
@@ -182,23 +154,24 @@ mkdir -p build
|
||||
cmake --build build --
|
||||
```
|
||||
|
||||
- DLL 输出目录:`build/bin/`
|
||||
- JAR 文件:请参考 [JuiceLoader](https://github.com/xiaozhou233/JuiceLoader)
|
||||
生成的 DLL 位于:
|
||||
|
||||
```
|
||||
build/bin
|
||||
```
|
||||
|
||||
JAR 可在 JuiceAgent-API 项目中构建或下载。
|
||||
|
||||
---
|
||||
|
||||
## 完整免责声明(Full Disclaimer)
|
||||
## 完整免责声明
|
||||
|
||||
**免责声明(英文):**
|
||||
This project is intended for learning and research in controlled environments only. The author is not responsible for any consequences arising from unauthorized use, modification, cracking, or violation of any applicable agreements or laws. Users are responsible for ensuring their actions are legal and compliant.
|
||||
|
||||
**免责声明(中文):**
|
||||
本项目仅建议在受控环境中用于学习与研究。任何利用本项目实施破解、篡改、未经授权获取源码或其他违反目标协议或法律的行为所导致的一切后果,作者概不负责。使用者应自行确保其行为合法合规,并对相应后果承担全部责任。
|
||||
免责声明:本项目仅建议在受控环境中用于学习与研究。作者不对任何因滥用、破解、修改或违反协议/法律行为所产生的后果负责。使用者需自行确保合法合规,并承担全部责任。
|
||||
|
||||
---
|
||||
|
||||
## 致谢(Acknowledgements)
|
||||
## 致谢
|
||||
|
||||
- [ReflectiveDLLInjection](https://github.com/stephenfewer/ReflectiveDLLInjection) —— DLL 注入实现
|
||||
- [plog](https://github.com/SergiusTheBest/plog) —— 轻量级、可扩展的 C++ 日志库
|
||||
- [tinytoml](https://github.com/mayah/tinytoml) —— 仅头文件的 C++11 TOML 解析库
|
||||
- ReflectiveDLLInjection — DLL 注入实现
|
||||
- plog — 轻量级 C++ 日志库
|
||||
- tinytoml — C++11 TOML 解析库
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
// Get value by key with default
|
||||
template<typename T>
|
||||
T get_or_default(const std::string& key, const T& default_value, bool use_default_if_empty = false) const {
|
||||
T get_or_default(const std::string& key, const T& default_value, bool use_default_if_empty = false, bool is_path = false) const {
|
||||
const toml::Value* val = find_value(key);
|
||||
if (!val) return default_value;
|
||||
|
||||
@@ -99,6 +99,20 @@ public:
|
||||
if constexpr (std::is_same_v<T, std::string>) {
|
||||
std::string s = val->as<std::string>();
|
||||
if (use_default_if_empty && s.empty()) return default_value;
|
||||
// Check if string starts with '.'
|
||||
if (is_path && s.starts_with('.')) {
|
||||
// remove '.'
|
||||
s.erase(0, 1);
|
||||
|
||||
// Check if string starts with '/'
|
||||
// MUST REMOVE '/', or it will cause path error (root directory)
|
||||
if (s.starts_with('/')) {
|
||||
s.erase(0, 1);
|
||||
}
|
||||
|
||||
// runtime_dir + s
|
||||
s = (std::filesystem::path(runtime_dir) / s).string();
|
||||
}
|
||||
return s;
|
||||
} else {
|
||||
return val->as<T>();
|
||||
@@ -121,22 +135,22 @@ public:
|
||||
};
|
||||
|
||||
info.JuiceAgentAPIJarPath = get_or_default<std::string>(
|
||||
"JuiceAgent.JuiceAgentAPIJarPath", get_default_path("JuiceAgent.jar"), true);
|
||||
"JuiceAgent.JuiceAgentAPIJarPath", get_default_path("JuiceAgent-API.jar"), true, true);
|
||||
|
||||
info.JuiceAgentNativePath = get_or_default<std::string>(
|
||||
"JuiceAgent.JuiceAgentNativePath", get_default_path("libagent.dll"), true);
|
||||
"JuiceAgent.JuiceAgentNativePath", get_default_path("libagent.dll"), true, true);
|
||||
|
||||
info.EntryJarPath = get_or_default<std::string>(
|
||||
"Entry.EntryJarPath", get_default_path("entry.jar"), true);
|
||||
"Entry.EntryJarPath", get_default_path("Entry.jar"), true, true);
|
||||
|
||||
info.EntryClass = get_or_default<std::string>(
|
||||
"Entry.EntryClass", "com.example.Entry", true);
|
||||
"Entry.EntryClass", "com.example.Entry", true, false);
|
||||
|
||||
info.EntryMethod = get_or_default<std::string>(
|
||||
"Entry.EntryMethod", "start", true);
|
||||
"Entry.EntryMethod", "start", true, false);
|
||||
|
||||
info.InjectionDir = get_or_default<std::string>(
|
||||
"Runtime.InjectionDir", get_default_path("injection"), true);
|
||||
"Runtime.InjectionDir", get_default_path("injection"), true, true);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user