mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: support AntSword shell generate (#34)
This commit is contained in:
Binary file not shown.
+8
-8
@@ -13,10 +13,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@tanstack/router-plugin": "^1.104.1",
|
||||
"@tanstack/router-plugin": "^1.105.0",
|
||||
"@types/node": "^22.13.4",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"@types/react-copy-to-clipboard": "^5.0.7",
|
||||
"@types/react-syntax-highlighter": "^15.5.13",
|
||||
@@ -25,7 +25,7 @@
|
||||
"vite": "^6.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^4.0.0",
|
||||
"@hookform/resolvers": "^4.1.0",
|
||||
"@radix-ui/react-alert-dialog": "^1.1.6",
|
||||
"@radix-ui/react-checkbox": "^1.1.4",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
||||
@@ -38,9 +38,9 @@
|
||||
"@radix-ui/react-tabs": "^1.1.3",
|
||||
"@radix-ui/react-tooltip": "^1.1.8",
|
||||
"@tailwindcss/vite": "^4.0.6",
|
||||
"@tanstack/react-query": "^5.66.0",
|
||||
"@tanstack/react-router": "^1.104.1",
|
||||
"@tanstack/router-devtools": "^1.104.3",
|
||||
"@tanstack/react-query": "^5.66.7",
|
||||
"@tanstack/react-router": "^1.105.0",
|
||||
"@tanstack/router-devtools": "^1.105.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"i18next": "^24.2.2",
|
||||
@@ -49,7 +49,7 @@
|
||||
"react-copy-to-clipboard": "^5.1.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-hook-form": "^7.54.2",
|
||||
"react-i18next": "^15.4.0",
|
||||
"react-i18next": "^15.4.1",
|
||||
"react-syntax-highlighter": "^15.6.1",
|
||||
"sonner": "^1.7.4",
|
||||
"tailwind-merge": "^3.0.1",
|
||||
|
||||
@@ -136,7 +136,7 @@ export function MainConfigCard({
|
||||
name="server"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("mainConfig.server")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center">{t("mainConfig.server")}</FormLabel>
|
||||
<Select
|
||||
onValueChange={(v) => {
|
||||
field.onChange(v);
|
||||
@@ -176,10 +176,10 @@ export function MainConfigCard({
|
||||
control={form.control}
|
||||
name="targetJdkVersion"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex flex-col mt-1">
|
||||
<Label className="flex items-center">
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel className="h-6 flex items-center gap-1">
|
||||
{t("mainConfig.jre")} {t("optional")} <JreTip />
|
||||
</Label>
|
||||
</FormLabel>
|
||||
<Select
|
||||
onValueChange={(v) => {
|
||||
if (Number.parseInt(v) >= 53) {
|
||||
@@ -255,7 +255,7 @@ export function MainConfigCard({
|
||||
<BehinderTabContent form={form} shellTypes={shellTypes} />
|
||||
<GodzillaTabContent form={form} shellTypes={shellTypes} />
|
||||
<CommandTabContent form={form} shellTypes={shellTypes} />
|
||||
<AntSwordTabContent />
|
||||
<AntSwordTabContent form={form} shellTypes={shellTypes} />
|
||||
<Suo5TabContent form={form} shellTypes={shellTypes} />
|
||||
<NeoreGeorgTabContent />
|
||||
</Tabs>
|
||||
@@ -272,7 +272,7 @@ function ShellTypeFormField({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="shellType"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("mainConfig.shellMountType")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center">{t("mainConfig.shellMountType")}</FormLabel>
|
||||
<Select onValueChange={field.onChange} value={field.value}>
|
||||
<FormControl>
|
||||
<SelectTrigger className="h-8">
|
||||
@@ -306,10 +306,10 @@ function UrlPatternFormField({ form }: { form: UseFormReturn<FormSchema> }) {
|
||||
control={form.control}
|
||||
name="urlPattern"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex flex-col mt-1">
|
||||
<Label className="flex items-center">
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel className="h-6 flex items-center gap-1">
|
||||
{t("mainConfig.urlPattern")} <UrlPatternTip />
|
||||
</Label>
|
||||
</FormLabel>
|
||||
<Input {...field} placeholder={t("placeholders.input")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -327,7 +327,7 @@ function OptionalClassFormField({ form }: { form: UseFormReturn<FormSchema> }) {
|
||||
name="shellClassName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">
|
||||
{t("mainConfig.shellClassName")} {t("optional")}
|
||||
</FormLabel>
|
||||
<Input id="shellClassName" {...field} placeholder={t("placeholders.input")} className="h-8" />
|
||||
@@ -339,7 +339,7 @@ function OptionalClassFormField({ form }: { form: UseFormReturn<FormSchema> }) {
|
||||
name="injectorClassName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">
|
||||
{t("mainConfig.injectorClassName")} {t("optional")}
|
||||
</FormLabel>
|
||||
<Input id="injectorClassName" {...field} placeholder={t("placeholders.input")} className="h-8" />
|
||||
@@ -366,8 +366,8 @@ function BehinderTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="behinderPass"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.behinderPass")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.pass")} className="h-8" />
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.behinderPass")}</FormLabel>
|
||||
<Input {...field} placeholder={t("placeholders.input")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
@@ -377,7 +377,7 @@ function BehinderTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="headerName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerName")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -387,7 +387,7 @@ function BehinderTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="headerValue"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerValue")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -418,7 +418,7 @@ function GodzillaTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="godzillaPass"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.pass")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.pass")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.pass")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -428,7 +428,7 @@ function GodzillaTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="godzillaKey"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.key")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.key")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.key")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -438,7 +438,7 @@ function GodzillaTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="headerName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerName")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -448,7 +448,7 @@ function GodzillaTabContent({ form, shellTypes }: { form: UseFormReturn<FormSche
|
||||
name="headerValue"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerValue")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -478,7 +478,7 @@ function CommandTabContent({ form, shellTypes }: { form: UseFormReturn<FormSchem
|
||||
name="commandParamName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.paramName")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.paramName")}</FormLabel>
|
||||
<FormControl>
|
||||
<Input {...field} placeholder={t("shellToolConfig.paramName")} className="h-8" />
|
||||
</FormControl>
|
||||
@@ -493,17 +493,54 @@ function CommandTabContent({ form, shellTypes }: { form: UseFormReturn<FormSchem
|
||||
);
|
||||
}
|
||||
|
||||
function AntSwordTabContent() {
|
||||
function AntSwordTabContent({ form, shellTypes }: { form: UseFormReturn<FormSchema>; shellTypes: Array<string> }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<TabsContent value="AntSword">
|
||||
<Card>
|
||||
<CardContent className="space-y-2 mt-4">
|
||||
<div className="flex items-center justify-center">
|
||||
<span className="text-gray-500">WIP</span>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</TabsContent>
|
||||
<FormProvider {...form}>
|
||||
<TabsContent value="AntSword">
|
||||
<Card>
|
||||
<CardContent className="space-y-2 mt-4">
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<ShellTypeFormField form={form} shellTypes={shellTypes} />
|
||||
<UrlPatternFormField form={form} />
|
||||
</div>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="antSwordPass"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.antSwordPass")}</FormLabel>
|
||||
<Input {...field} placeholder={t("placeholders.input")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="headerName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerName")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="headerValue"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerValue")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<OptionalClassFormField form={form} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
</TabsContent>
|
||||
</FormProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -524,7 +561,7 @@ function Suo5TabContent({ form, shellTypes }: { form: UseFormReturn<FormSchema>;
|
||||
name="headerName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerName")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerName")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -534,7 +571,7 @@ function Suo5TabContent({ form, shellTypes }: { form: UseFormReturn<FormSchema>;
|
||||
name="headerValue"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1">
|
||||
<FormLabel>{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("shellToolConfig.headerValue")}</FormLabel>
|
||||
<Input {...field} placeholder={t("shellToolConfig.headerValue")} className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
@@ -67,7 +67,7 @@ export function PackageConfigCard({
|
||||
name="packingMethod"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-3">
|
||||
<FormLabel>{t("packageConfig.title")}</FormLabel>
|
||||
<FormLabel className="h-6 flex items-center gap-1">{t("packageConfig.title")}</FormLabel>
|
||||
<FormControl>
|
||||
<RadioGroup onValueChange={field.onChange} value={field.value} className="grid grid-cols-3">
|
||||
{options.map(({ name, value }) => (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.tsx";
|
||||
import { ScrollTextIcon } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export function QuickUsage() {
|
||||
@@ -6,7 +7,10 @@ export function QuickUsage() {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>{t("quickUsage.title")}</CardTitle>
|
||||
<CardTitle className="text-md flex items-center gap-2">
|
||||
<ScrollTextIcon className="h-5" />
|
||||
<span>{t("quickUsage.title")}</span>
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<ol className="list-decimal list-inside space-y-4 text-sm">
|
||||
|
||||
@@ -20,6 +20,7 @@ import { Separator } from "@/components/ui/separator.tsx";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs.tsx";
|
||||
import { downloadBytes } from "@/lib/utils.ts";
|
||||
import {
|
||||
AntSwordShellToolConfig,
|
||||
BehinderShellToolConfig,
|
||||
CommandShellToolConfig,
|
||||
GenerateResult,
|
||||
@@ -27,7 +28,7 @@ import {
|
||||
Suo5ShellToolConfig,
|
||||
} from "@/types/shell.ts";
|
||||
import { TFunction } from "i18next";
|
||||
import { CircleHelpIcon, TriangleAlertIcon } from "lucide-react";
|
||||
import { CircleHelpIcon, TicketCheckIcon, TriangleAlertIcon } from "lucide-react";
|
||||
import { Fragment, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { toast } from "sonner";
|
||||
@@ -143,7 +144,10 @@ function BasicInfo({ generateResult }: { generateResult?: GenerateResult }) {
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center justify-between">
|
||||
{t("generateResult.basicInfo")}
|
||||
<div className="text-md flex items-center gap-2">
|
||||
<TicketCheckIcon className="h-5" />
|
||||
<span>{t("generateResult.basicInfo")}</span>
|
||||
</div>
|
||||
<FeedbackAlert />
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
@@ -216,6 +220,20 @@ function BasicInfo({ generateResult }: { generateResult?: GenerateResult }) {
|
||||
/>
|
||||
</Fragment>
|
||||
)}
|
||||
{generateResult?.shellConfig.shellTool === "AntSword" && (
|
||||
<Fragment>
|
||||
<CopyableField
|
||||
label={t("shellToolConfig.antSwordPass")}
|
||||
text={(generateResult?.shellToolConfig as AntSwordShellToolConfig).pass}
|
||||
value={(generateResult?.shellToolConfig as AntSwordShellToolConfig).pass}
|
||||
/>
|
||||
<CopyableField
|
||||
label={t("shellToolConfig.httpHeader")}
|
||||
text={`${(generateResult?.shellToolConfig as AntSwordShellToolConfig).headerName}: ${(generateResult?.shellToolConfig as AntSwordShellToolConfig).headerValue}`}
|
||||
value={`${(generateResult?.shellToolConfig as AntSwordShellToolConfig).headerName}: ${(generateResult?.shellToolConfig as AntSwordShellToolConfig).headerValue}`}
|
||||
/>
|
||||
</Fragment>
|
||||
)}
|
||||
<CopyableField
|
||||
label={t("mainConfig.injectorClassName")}
|
||||
value={generateResult?.injectorClassName}
|
||||
@@ -337,89 +355,86 @@ export function ShellResult({
|
||||
generateResult?: GenerateResult;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
if (!generateResult) {
|
||||
return <QuickUsage />;
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
{generateResult ? (
|
||||
<Tabs defaultValue="packResult">
|
||||
<TabsList className="grid w-full grid-cols-3">
|
||||
<TabsTrigger value="packResult">{t("generateResult.title1")}</TabsTrigger>
|
||||
<TabsTrigger value="shell">{t("generateResult.title2")}</TabsTrigger>
|
||||
<TabsTrigger value="injector">{t("generateResult.title3")}</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="packResult" className="my-4">
|
||||
<div className="mb-4">
|
||||
<BasicInfo generateResult={generateResult} />
|
||||
</div>
|
||||
{renderResultComponent(packResult, allPackResults, packMethod, t, generateResult)}
|
||||
</TabsContent>
|
||||
<TabsContent value="shell" className="mt-4">
|
||||
<Alert>
|
||||
<TriangleAlertIcon className="h-4 w-4" />
|
||||
<AlertTitle>Warning</AlertTitle>
|
||||
<AlertDescription>{t("tips.decompileTip")}</AlertDescription>
|
||||
</Alert>
|
||||
<div className="gap-4 my-2 flex items-center justify-end">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="w-28"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (!generateResult?.shellBytesBase64Str) {
|
||||
toast.warning(t("tips.shellBytesEmpty"));
|
||||
return;
|
||||
}
|
||||
downloadBytes(generateResult?.shellBytesBase64Str, generateResult?.shellClassName);
|
||||
}}
|
||||
>
|
||||
{t("download")} Class
|
||||
</Button>
|
||||
</div>
|
||||
<CodeViewer
|
||||
showLineNumbers={false}
|
||||
header={<div className="text-xs">{generateResult?.shellClassName}</div>}
|
||||
wrapLongLines={true}
|
||||
height={600}
|
||||
code={generateResult?.shellBytesBase64Str ?? ""}
|
||||
language="text"
|
||||
/>
|
||||
</TabsContent>
|
||||
<TabsContent value="injector" className="mt-4">
|
||||
<Alert>
|
||||
<TriangleAlertIcon className="h-4 w-4" />
|
||||
<AlertTitle>Warning</AlertTitle>
|
||||
<AlertDescription>{t("tips.decompileTip")}</AlertDescription>
|
||||
</Alert>
|
||||
<div className="gap-4 my-2 flex items-center justify-end">
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-28"
|
||||
variant="outline"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (!generateResult?.injectorBytesBase64Str) {
|
||||
toast.warning(t("tips.shellBytesEmpty"));
|
||||
return;
|
||||
}
|
||||
downloadBytes(generateResult?.injectorBytesBase64Str, generateResult?.injectorClassName);
|
||||
}}
|
||||
>
|
||||
{t("download")} Class
|
||||
</Button>
|
||||
</div>
|
||||
<CodeViewer
|
||||
showLineNumbers={false}
|
||||
wrapLongLines={true}
|
||||
header={<div className="text-xs">{generateResult?.injectorClassName}</div>}
|
||||
height={600}
|
||||
code={generateResult?.injectorBytesBase64Str ?? ""}
|
||||
language="text"
|
||||
/>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
) : (
|
||||
<QuickUsage />
|
||||
)}
|
||||
</Fragment>
|
||||
<Tabs defaultValue="packResult">
|
||||
<TabsList className="grid w-full grid-cols-3">
|
||||
<TabsTrigger value="packResult">{t("generateResult.title1")}</TabsTrigger>
|
||||
<TabsTrigger value="shell">{t("generateResult.title2")}</TabsTrigger>
|
||||
<TabsTrigger value="injector">{t("generateResult.title3")}</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="packResult" className="my-4">
|
||||
<div className="mb-4">
|
||||
<BasicInfo generateResult={generateResult} />
|
||||
</div>
|
||||
{renderResultComponent(packResult, allPackResults, packMethod, t, generateResult)}
|
||||
</TabsContent>
|
||||
<TabsContent value="shell" className="mt-4">
|
||||
<Alert>
|
||||
<TriangleAlertIcon className="h-4 w-4" />
|
||||
<AlertTitle>Warning</AlertTitle>
|
||||
<AlertDescription>{t("tips.decompileTip")}</AlertDescription>
|
||||
</Alert>
|
||||
<div className="gap-4 my-2 flex items-center justify-end">
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className="w-28"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (!generateResult?.shellBytesBase64Str) {
|
||||
toast.warning(t("tips.shellBytesEmpty"));
|
||||
return;
|
||||
}
|
||||
downloadBytes(generateResult?.shellBytesBase64Str, generateResult?.shellClassName);
|
||||
}}
|
||||
>
|
||||
{t("download")} Class
|
||||
</Button>
|
||||
</div>
|
||||
<CodeViewer
|
||||
showLineNumbers={false}
|
||||
header={<div className="text-xs">{generateResult?.shellClassName}</div>}
|
||||
wrapLongLines={true}
|
||||
height={600}
|
||||
code={generateResult?.shellBytesBase64Str ?? ""}
|
||||
language="text"
|
||||
/>
|
||||
</TabsContent>
|
||||
<TabsContent value="injector" className="mt-4">
|
||||
<Alert>
|
||||
<TriangleAlertIcon className="h-4 w-4" />
|
||||
<AlertTitle>Warning</AlertTitle>
|
||||
<AlertDescription>{t("tips.decompileTip")}</AlertDescription>
|
||||
</Alert>
|
||||
<div className="gap-4 my-2 flex items-center justify-end">
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-28"
|
||||
variant="outline"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (!generateResult?.injectorBytesBase64Str) {
|
||||
toast.warning(t("tips.shellBytesEmpty"));
|
||||
return;
|
||||
}
|
||||
downloadBytes(generateResult?.injectorBytesBase64Str, generateResult?.injectorClassName);
|
||||
}}
|
||||
>
|
||||
{t("download")} Class
|
||||
</Button>
|
||||
</div>
|
||||
<CodeViewer
|
||||
showLineNumbers={false}
|
||||
wrapLongLines={true}
|
||||
header={<div className="text-xs">{generateResult?.injectorClassName}</div>}
|
||||
height={600}
|
||||
code={generateResult?.injectorBytesBase64Str ?? ""}
|
||||
language="text"
|
||||
/>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
"behinderEncryptType": "Encrypt Type",
|
||||
"behinderDefaultEncryptType": "Default",
|
||||
"paramName": "Param Name",
|
||||
"suo5Header": "AdvanceConfiguration -> Request Header"
|
||||
"suo5Header": "AdvanceConfiguration -> Request Header",
|
||||
"antSwordPass": "Shell pwd",
|
||||
"httpHeader": "HTTP -> HTTP HEADERS"
|
||||
},
|
||||
"packageConfig": {
|
||||
"title": "Package Method",
|
||||
@@ -57,7 +59,7 @@
|
||||
"Velocity": "Velocity",
|
||||
"Groovy": "Groovy",
|
||||
"AgentJar": "AgentJar",
|
||||
"Deserialize": "Deserialize(Only CB4, 1.9.x)",
|
||||
"JavaDeserialize": "JavaDeserialize",
|
||||
"ScriptEngine": "ScriptEngine",
|
||||
"XxlJob": "XXL-JOB Executor",
|
||||
"JinJava": "JinJava",
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
"behinderEncryptType": "加密类型",
|
||||
"behinderDefaultEncryptType": "默认",
|
||||
"paramName": "请求参数",
|
||||
"suo5Header": "高级配置 -> 请求头"
|
||||
"suo5Header": "高级配置 -> 请求头",
|
||||
"antSwordPass": "连接密码",
|
||||
"httpHeader": "请求信息 -> HTTP HEADERS"
|
||||
},
|
||||
"packageConfig": {
|
||||
"title": "打包方式",
|
||||
@@ -52,7 +54,7 @@
|
||||
"BeanShell": "BeanShell 表达式",
|
||||
"Aviator": "Aviator 表达式",
|
||||
"JXPath": "JXPath 表达式",
|
||||
"Deserialize": "反序列化(仅支持 CB4, 1.9.x)",
|
||||
"JavaDeserialize": "Java反序列化",
|
||||
"ScriptEngine": "内置脚本引擎",
|
||||
"Rhino": "Rhino 脚本引擎"
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ function RootComponent() {
|
||||
return (
|
||||
<ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
|
||||
<Toaster />
|
||||
<div className="min-h-screen">
|
||||
<header className="border-b px-4 py-3">
|
||||
<div className="flex flex-col h-screen">
|
||||
<header className="sticky top-0 z-50 border-b bg-background px-4 py-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center">
|
||||
<h2 className="text-lg font-semibold">MemShellParty - JavaWeb</h2>
|
||||
@@ -46,7 +46,9 @@ function RootComponent() {
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<Outlet />
|
||||
<main className="flex-1 overflow-auto">
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
@@ -44,6 +44,7 @@ function IndexComponent() {
|
||||
godzillaKey: "key",
|
||||
commandParamName: "cmd",
|
||||
behinderPass: "pass",
|
||||
antSwordPass: "ant",
|
||||
headerName: "User-Agent",
|
||||
headerValue: "test",
|
||||
injectorClassName: "",
|
||||
|
||||
@@ -12,6 +12,7 @@ export const formSchema = z.object({
|
||||
godzillaPass: z.optional(z.string()),
|
||||
godzillaKey: z.optional(z.string()),
|
||||
behinderPass: z.optional(z.string()),
|
||||
antSwordPass: z.optional(z.string()),
|
||||
commandParamName: z.optional(z.string()),
|
||||
headerName: z.optional(z.string()),
|
||||
headerValue: z.optional(z.string()),
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface ShellToolConfig {
|
||||
godzillaKey?: string;
|
||||
commandParamName?: string;
|
||||
behinderPass?: string;
|
||||
antSwordPass?: string;
|
||||
headerName?: string;
|
||||
headerValue?: string;
|
||||
}
|
||||
@@ -44,6 +45,13 @@ export interface Suo5ShellToolConfig {
|
||||
headerValue?: string;
|
||||
}
|
||||
|
||||
export interface AntSwordShellToolConfig {
|
||||
shellClassName?: string;
|
||||
pass?: string;
|
||||
headerName?: string;
|
||||
headerValue?: string;
|
||||
}
|
||||
|
||||
export interface InjectorConfig {
|
||||
className?: string;
|
||||
classInheritance?: string;
|
||||
@@ -82,6 +90,6 @@ export interface GenerateResult {
|
||||
injectorSize: number;
|
||||
injectorBytesBase64Str: string;
|
||||
shellConfig: ShellConfig;
|
||||
shellToolConfig: CommandShellToolConfig | GodzillaShellToolConfig | BehinderShellToolConfig;
|
||||
shellToolConfig: CommandShellToolConfig | GodzillaShellToolConfig | BehinderShellToolConfig | AntSwordShellToolConfig;
|
||||
injectorConfig: InjectorConfig;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export function transformToPostData(formValue: FormSchema) {
|
||||
godzillaKey: formValue.godzillaKey,
|
||||
commandParamName: formValue.commandParamName,
|
||||
behinderPass: formValue.behinderPass,
|
||||
antSwordPass: formValue.antSwordPass,
|
||||
headerName: formValue.headerName,
|
||||
headerValue: formValue.headerValue,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user