mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
28 lines
879 B
Java
28 lines
879 B
Java
package com.reajason.javaweb.integration;
|
|
|
|
import com.reajason.javaweb.memshell.config.GodzillaConfig;
|
|
import com.reajason.javaweb.godzilla.GodzillaManager;
|
|
|
|
import java.io.IOException;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
/**
|
|
* @author ReaJason
|
|
* @since 2024/11/30
|
|
*/
|
|
public class GodzillaShellTool {
|
|
|
|
public static void testIsOk(String entrypoint, GodzillaConfig shellConfig) {
|
|
try (GodzillaManager godzillaManager = GodzillaManager.builder()
|
|
.entrypoint(entrypoint).pass(shellConfig.getPass())
|
|
.key(shellConfig.getKey()).header(shellConfig.getHeaderName()
|
|
, shellConfig.getHeaderValue()).build()) {
|
|
assertTrue(godzillaManager.start());
|
|
assertTrue(godzillaManager.test());
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|