mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: tomcat agent support jdk6
This commit is contained in:
@@ -1,14 +1,4 @@
|
||||
import { UrlPatternTip } from "@/components/tips/url-pattern-tip.tsx";
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogFooter,
|
||||
AlertDialogHeader,
|
||||
AlertDialogTitle,
|
||||
} from "@/components/ui/alert-dialog";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.tsx";
|
||||
import { FormControl, FormDescription, FormField, FormItem, FormLabel } from "@/components/ui/form.tsx";
|
||||
import { Input } from "@/components/ui/input.tsx";
|
||||
@@ -44,8 +34,6 @@ export function MainConfigCard({
|
||||
const [shellToolMap, setShellToolMap] = useState<{ [toolName: string]: string[] }>();
|
||||
const [shellTools, setShellTools] = useState<string[]>([]);
|
||||
const [shellTypes, setShellTypes] = useState<string[]>([]);
|
||||
const [openAgentConfirm, setOpenAgentConfirm] = useState(false);
|
||||
const [currentShellType, setCurrentShellType] = useState<string>("");
|
||||
|
||||
const handleServerChange = (value: string) => {
|
||||
if (mainConfig) {
|
||||
@@ -247,39 +235,7 @@ export function MainConfigCard({
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>内存马挂载类型</FormLabel>
|
||||
<AlertDialog open={openAgentConfirm} onOpenChange={setOpenAgentConfirm}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Agent 注入当前仅支持 Java8 以上,是否仍要选择?</AlertDialogTitle>
|
||||
<AlertDialogDescription>确认后会将 JRE 版本改为 Java8</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
onClick={() => {
|
||||
form.setValue("targetJdkVersion", "52");
|
||||
form.setValue("shellType", currentShellType);
|
||||
}}
|
||||
>
|
||||
Confirm
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
<Select
|
||||
onValueChange={(v) => {
|
||||
if (
|
||||
v.startsWith("Agent") &&
|
||||
Number.parseInt(form.getValues("targetJdkVersion") as string) === 50
|
||||
) {
|
||||
setOpenAgentConfirm(true);
|
||||
setCurrentShellType(v);
|
||||
} else {
|
||||
field.onChange(v);
|
||||
}
|
||||
}}
|
||||
value={field.value}
|
||||
>
|
||||
<Select onValueChange={field.onChange} value={field.value}>
|
||||
<FormControl>
|
||||
<SelectTrigger className="h-8">
|
||||
<SelectValue placeholder="请选择" />
|
||||
|
||||
@@ -81,11 +81,6 @@ function IndexComponent() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (values.shellType.startsWith("Agent") && values.targetJdkVersion === "50") {
|
||||
toast.warning("Agent 注入方式当前仅支持 Java8 以上");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!values.shellType.startsWith("Agent") && values.packingMethod === "AgentJar") {
|
||||
toast.warning("Agent 注入方式当前仅支持 Tomcat,只有 Agent 注入方式才可使用 AgentJar 打包方式");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user