mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
- Rename JNI class from InjectorNative to Injector in libinject.c - Add JNI header for cn.xiaozhou233.juiceagent.injector.Injector - Add inject-via-java-api example with HowToUse.txt and 如何使用.txt
16 lines
459 B
Java
16 lines
459 B
Java
import java.lang.management.ManagementFactory;
|
|
|
|
public class target {
|
|
public static void main(String[] args) {
|
|
String pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
|
|
try {
|
|
while (true) {
|
|
System.out.println("[Target] I am the target JVM (PID: " + pid + ")");
|
|
Thread.sleep(1000);
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|