mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
feat: add tooltip for paramName
This commit is contained in:
@@ -26,6 +26,7 @@ export default function ShellResult({
|
|||||||
if (!generateResult) {
|
if (!generateResult) {
|
||||||
return <QuickUsage />;
|
return <QuickUsage />;
|
||||||
}
|
}
|
||||||
|
const height = 800;
|
||||||
return (
|
return (
|
||||||
<Tabs defaultValue="packResult">
|
<Tabs defaultValue="packResult">
|
||||||
<TabsList className="grid w-full grid-cols-3">
|
<TabsList className="grid w-full grid-cols-3">
|
||||||
@@ -37,7 +38,7 @@ export default function ShellResult({
|
|||||||
{t("memshell:injectorClass")}
|
{t("memshell:injectorClass")}
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
<TabsContent value="packResult" className="my-2 space-y-4">
|
<TabsContent value="packResult" className="space-y-2">
|
||||||
<BasicInfo generateResult={generateResult} />
|
<BasicInfo generateResult={generateResult} />
|
||||||
<ResultComponent
|
<ResultComponent
|
||||||
packResult={packResult}
|
packResult={packResult}
|
||||||
@@ -75,7 +76,7 @@ export default function ShellResult({
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
wrapLongLines={true}
|
wrapLongLines={true}
|
||||||
height={600}
|
height={height}
|
||||||
code={generateResult?.shellBytesBase64Str ?? ""}
|
code={generateResult?.shellBytesBase64Str ?? ""}
|
||||||
language="text"
|
language="text"
|
||||||
/>
|
/>
|
||||||
@@ -107,7 +108,7 @@ export default function ShellResult({
|
|||||||
<DownloadIcon className="h-4 w-4" />
|
<DownloadIcon className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
height={600}
|
height={height}
|
||||||
code={generateResult?.injectorBytesBase64Str ?? ""}
|
code={generateResult?.injectorBytesBase64Str ?? ""}
|
||||||
language="text"
|
language="text"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { ChevronDown, ChevronRight } from "lucide-react";
|
import { ChevronDown, ChevronRight, InfoIcon } from "lucide-react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { FormProvider, type UseFormReturn } from "react-hook-form";
|
import { FormProvider, type UseFormReturn } from "react-hook-form";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -24,6 +24,11 @@ import {
|
|||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
import { TabsContent } from "@/components/ui/tabs";
|
import { TabsContent } from "@/components/ui/tabs";
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
import { env } from "@/config";
|
import { env } from "@/config";
|
||||||
import type { MemShellFormSchema } from "@/types/schema";
|
import type { MemShellFormSchema } from "@/types/schema";
|
||||||
import { OptionalClassFormField } from "./classname-field";
|
import { OptionalClassFormField } from "./classname-field";
|
||||||
@@ -64,9 +69,19 @@ export function CommandTabContent({
|
|||||||
name="commandParamName"
|
name="commandParamName"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormFieldItem>
|
<FormFieldItem>
|
||||||
<FormFieldLabel>
|
<div className="flex items-center gap-1">
|
||||||
{t("common:paramName")} {t("common:optional")}
|
<FormFieldLabel>
|
||||||
</FormFieldLabel>
|
{t("common:paramName")} {t("common:optional")}
|
||||||
|
</FormFieldLabel>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<InfoIcon className="h-3.5 w-3.5 text-muted-foreground cursor-help" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>{t("common:paramName.description")}</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
{...field}
|
{...field}
|
||||||
|
|||||||
@@ -147,9 +147,19 @@ export default function MainConfigCard({ form, servers }: MainConfigCardProps) {
|
|||||||
name="reqParamName"
|
name="reqParamName"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormFieldItem>
|
<FormFieldItem>
|
||||||
<FormFieldLabel>
|
<div className="flex items-center gap-1">
|
||||||
{t("common:paramName")} {t("common:optional")}
|
<FormFieldLabel>
|
||||||
</FormFieldLabel>
|
{t("common:paramName")} {t("common:optional")}
|
||||||
|
</FormFieldLabel>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<InfoIcon className="h-3.5 w-3.5 text-muted-foreground cursor-help" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>{t("common:paramName.description")}</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input placeholder={t("placeholders.input")} {...field} />
|
<Input placeholder={t("placeholders.input")} {...field} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default function ShellResult({
|
|||||||
return <QuickUsage />;
|
return <QuickUsage />;
|
||||||
}
|
}
|
||||||
const showCode = packMethod === "JSP";
|
const showCode = packMethod === "JSP";
|
||||||
const height = 550;
|
const height = 600;
|
||||||
return (
|
return (
|
||||||
<Tabs defaultValue="packResult">
|
<Tabs defaultValue="packResult">
|
||||||
<TabsList className="grid w-full grid-cols-1">
|
<TabsList className="grid w-full grid-cols-1">
|
||||||
@@ -30,7 +30,7 @@ export default function ShellResult({
|
|||||||
{t("common:generateResult")}
|
{t("common:generateResult")}
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
<TabsContent value="packResult" className="my-2 space-y-4">
|
<TabsContent value="packResult" className="space-y-2">
|
||||||
<BasicInfo generateResult={generateResult} />
|
<BasicInfo generateResult={generateResult} />
|
||||||
{allPackResults && (
|
{allPackResults && (
|
||||||
<MultiPackResult
|
<MultiPackResult
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"packerConfig.title": "Package Config",
|
"packerConfig.title": "Package Config",
|
||||||
"packerMethod": "Package Method",
|
"packerMethod": "Package Method",
|
||||||
"paramName": "ParamName",
|
"paramName": "ParamName",
|
||||||
|
"paramName.description": "Supports passing values via request parameter (param) or request header (header)",
|
||||||
"placeholders.input": "Please input",
|
"placeholders.input": "Please input",
|
||||||
"placeholders.select": "Please select",
|
"placeholders.select": "Please select",
|
||||||
"ProbeShellGenerator": "ProbeShellGenerator",
|
"ProbeShellGenerator": "ProbeShellGenerator",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"packerConfig.title": "打包配置",
|
"packerConfig.title": "打包配置",
|
||||||
"packerMethod": "打包方式",
|
"packerMethod": "打包方式",
|
||||||
"paramName": "参数名称",
|
"paramName": "参数名称",
|
||||||
|
"paramName.description": "支持请求参数 param 或请求头 header 传值",
|
||||||
"placeholders.input": "请输入",
|
"placeholders.input": "请输入",
|
||||||
"placeholders.select": "请选择",
|
"placeholders.select": "请选择",
|
||||||
"ProbeShellGenerator": "探测马生成器",
|
"ProbeShellGenerator": "探测马生成器",
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export default function MemShellPage() {
|
|||||||
{t("memshell:buttons.generate")}
|
{t("memshell:buttons.generate")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-2">
|
||||||
<ShellResult
|
<ShellResult
|
||||||
packMethod={packMethod}
|
packMethod={packMethod}
|
||||||
generateResult={generateResult}
|
generateResult={generateResult}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default function ProbeShellGenerator() {
|
|||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
className="flex flex-col xl:flex-row gap-6"
|
className="flex flex-col xl:flex-row gap-6"
|
||||||
>
|
>
|
||||||
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-2">
|
||||||
<MainConfigCard form={form} servers={serverConfig} />
|
<MainConfigCard form={form} servers={serverConfig} />
|
||||||
<PackageConfigCard form={form} packerConfig={packerConfig} />
|
<PackageConfigCard form={form} packerConfig={packerConfig} />
|
||||||
<Button
|
<Button
|
||||||
@@ -126,7 +126,7 @@ export default function ProbeShellGenerator() {
|
|||||||
{t("probeshell:buttons.generate")}
|
{t("probeshell:buttons.generate")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-2">
|
||||||
<ShellResult
|
<ShellResult
|
||||||
packMethod={packMethod}
|
packMethod={packMethod}
|
||||||
generateResult={generateResult}
|
generateResult={generateResult}
|
||||||
|
|||||||
Reference in New Issue
Block a user