feat: support bytecode shrink

1. remove source file symbol (#46)
2. remove debug info when enable shrink (#29)
This commit is contained in:
ReaJason
2025-02-26 20:19:30 +08:00
parent e7a14bf2e3
commit 45f2bb148d
16 changed files with 94 additions and 27 deletions
+12
View File
@@ -260,6 +260,18 @@ export function MainConfigCard({
</FormItem>
)}
/>
<FormField
control={form.control}
name="shrink"
render={({ field }) => (
<FormItem className="flex items-center space-x-2 space-y-0">
<FormControl>
<Switch id="shrink" checked={field.value} onCheckedChange={field.onChange} />
</FormControl>
<Label htmlFor="shrink">{t("mainConfig.shrink")}</Label>
</FormItem>
)}
/>
</div>
</CardContent>
</Card>
+1
View File
@@ -36,6 +36,7 @@
"shellClassName": "Shell ClassName",
"shellMountType": "Shell Mount Type",
"shellTool": "Shell Tool",
"shrink": "Shrink Bytecode",
"urlPattern": "URL Pattern"
},
"optional": "(Optional)",
+1
View File
@@ -36,6 +36,7 @@
"shellClassName": "内存马类名",
"shellMountType": "内存马挂载类型",
"shellTool": "内存马功能",
"shrink": "缩小字节码",
"urlPattern": "请求路径"
},
"optional": "(可选)",
+1
View File
@@ -18,6 +18,7 @@ export const formSchema = z.object({
headerValue: z.optional(z.string()),
injectorClassName: z.optional(z.string()),
packingMethod: z.string().min(1),
shrink: z.optional(z.boolean()),
});
export type FormSchema = z.infer<typeof formSchema>;
+1
View File
@@ -6,6 +6,7 @@ export interface ShellConfig {
debug?: boolean;
byPassJavaModule?: boolean;
obfuscate?: boolean;
shrink?: boolean;
}
export interface ShellToolConfig {
+1
View File
@@ -9,6 +9,7 @@ export function transformToPostData(formValue: FormSchema) {
debug: formValue.debug,
targetJreVersion: formValue.targetJdkVersion,
byPassJavaModule: formValue.bypassJavaModule,
shrink: formValue.shrink,
};
const shellToolConfig: ShellToolConfig = {
shellClassName: formValue.shellClassName,