mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 15:10:43 +08:00
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { FormSchema } from "@/types/schema.ts";
|
|
import { InjectorConfig, ShellConfig, ShellToolConfig } from "@/types/shell.ts";
|
|
|
|
export function transformToPostData(formValue: FormSchema) {
|
|
const shellConfig: ShellConfig = {
|
|
server: formValue.server,
|
|
shellTool: formValue.shellTool,
|
|
shellType: formValue.shellType,
|
|
debug: formValue.debug,
|
|
targetJreVersion: formValue.targetJdkVersion,
|
|
byPassJavaModule: formValue.bypassJavaModule,
|
|
shrink: formValue.shrink,
|
|
};
|
|
const shellToolConfig: ShellToolConfig = {
|
|
shellClassName: formValue.shellClassName,
|
|
godzillaPass: formValue.godzillaPass,
|
|
godzillaKey: formValue.godzillaKey,
|
|
commandParamName: formValue.commandParamName,
|
|
behinderPass: formValue.behinderPass,
|
|
antSwordPass: formValue.antSwordPass,
|
|
headerName: formValue.headerName,
|
|
headerValue: formValue.headerValue,
|
|
shellClassBase64: formValue.shellClassBase64,
|
|
};
|
|
|
|
const injectorConfig: InjectorConfig = {
|
|
urlPattern: formValue.urlPattern,
|
|
injectorClassName: formValue.injectorClassName,
|
|
};
|
|
return {
|
|
shellConfig,
|
|
shellToolConfig,
|
|
injectorConfig,
|
|
packer: formValue.packingMethod,
|
|
};
|
|
}
|