mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
21 lines
558 B
Java
21 lines
558 B
Java
import java.lang.management.ManagementFactory;
|
|
|
|
public class target {
|
|
public static void say() {
|
|
System.out.println("Hello!");
|
|
}
|
|
|
|
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 + ")");
|
|
say();
|
|
Thread.sleep(1000);
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|