feat: support appendLambdaSuffix

This commit is contained in:
ReaJason
2025-12-08 01:43:41 +08:00
parent 30dd253565
commit 36236653bd
13 changed files with 78 additions and 4 deletions
@@ -358,7 +358,7 @@ export default function MainConfigCard({
)}
/>
</div>
<div className="flex gap-4 mt-4 flex-col sm:flex-row xl:grid xl:grid-cols-2 2xl:flex 2xl:flex-row">
<div className="flex gap-4 mt-4 flex-col sm:flex-row xl:grid xl:grid-cols-2 2xl:grid 2xl:grid-cols-3">
<FormField
control={form.control}
name="debug"
@@ -391,6 +391,24 @@ export default function MainConfigCard({
</FormItem>
)}
/>
<FormField
control={form.control}
name="lambdaSuffix"
render={({ field }) => (
<FormItem className="flex items-center space-x-2 space-y-0">
<FormControl>
<Switch
id="lambdaSuffix"
checked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
<Label htmlFor="lambdaSuffix">
{t("common:lambdaSuffix")}
</Label>
</FormItem>
)}
/>
<FormField
control={form.control}
name="shrink"
@@ -279,7 +279,7 @@ export default function MainConfigCard({ form, servers }: MainConfigCardProps) {
const SwitchGroup = useMemo(
() => (
<div className="flex gap-4 mt-4 flex-col sm:flex-row">
<div className="flex gap-4 mt-4 flex-col sm:flex-row xl:grid xl:grid-cols-2 2xl:grid 2xl:grid-cols-3">
<FormField
control={form.control}
name="debug"
@@ -312,6 +312,22 @@ export default function MainConfigCard({ form, servers }: MainConfigCardProps) {
</FormItem>
)}
/>
<FormField
control={form.control}
name="lambdaSuffix"
render={({ field }) => (
<FormItem className="flex items-center space-x-2 space-y-0">
<FormControl>
<Switch
id="lambdaSuffix"
checked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
<Label htmlFor="lambdaSuffix">{t("common:lambdaSuffix")}</Label>
</FormItem>
)}
/>
<FormField
control={form.control}
name="shrink"
+3 -1
View File
@@ -35,5 +35,7 @@
"usage": "Usage",
"version.updateAvailable": "Update Available",
"version.updateAvailableTooltip": "Click to Open Github Release Page ( v{{currentVersion}} -> v{{latestVersion}})",
"shellTool": "Shell Tool"
"shellTool": "Shell Tool",
"lambdaSuffix": "LambdaSuffix",
"probe": "Probe Mode"
}
+3 -1
View File
@@ -35,5 +35,7 @@
"usage": "使用指南",
"version.updateAvailable": "有可用升级",
"version.updateAvailableTooltip": "点击前往 GitHub Release ( v{{currentVersion}} -> v{{latestVersion}})",
"shellTool": "内存马工具"
"shellTool": "内存马工具",
"lambdaSuffix": "Lambda 类名后缀",
"probe": "回显模式"
}
+2
View File
@@ -8,6 +8,8 @@ export interface ShellConfig {
byPassJavaModule?: boolean;
obfuscate?: boolean;
shrink?: boolean;
probe?: boolean;
lambdaSuffix?:boolean;
}
export interface ShellToolConfig {
+1
View File
@@ -17,6 +17,7 @@ export interface ProbeConfig {
byPassJavaModule?: boolean;
shrink?: boolean;
staticInitialize?: boolean;
lambdaSuffix?: boolean;
}
export interface ProbeContentConfig {
+3
View File
@@ -26,6 +26,8 @@ export const memShellFormSchema = yup.object({
injectorClassName: yup.string().optional(),
packingMethod: yup.string().required().min(1),
shrink: yup.boolean().optional(),
lambdaSuffix: yup.boolean().optional(),
probe: yup.boolean().optional(),
shellClassBase64: yup.string().optional(),
encryptor: yup.string().optional(),
});
@@ -165,6 +167,7 @@ export const probeShellFormSchema = yup.object().shape({
byPassJavaModule: yup.boolean().optional(),
shrink: yup.boolean().optional(),
staticInitialize: yup.boolean().optional(),
lambdaSuffix: yup.boolean().optional(),
});
type ProbeValidationResult = ResolverResult<ProbeShellFormSchema>;
+3
View File
@@ -19,6 +19,8 @@ export function transformToPostData(formValue: MemShellFormSchema) {
targetJreVersion: formValue.targetJdkVersion,
byPassJavaModule: formValue.byPassJavaModule,
shrink: formValue.shrink,
lambdaSuffix: formValue.lambdaSuffix,
probe: formValue.probe
};
const shellToolConfig: ShellToolConfig = {
shellClassName: formValue.shellClassName,
@@ -56,6 +58,7 @@ export function transformToProbePostData(formValue: ProbeShellFormSchema) {
debug: formValue.debug,
byPassJavaModule: formValue.byPassJavaModule,
staticInitialize: formValue.staticInitialize,
lambdaSuffix: formValue.lambdaSuffix,
};
const probeContentConfig: ProbeContentConfig = {
host: formValue.host,