mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 15:10:43 +08:00
feat: boot-ui support behinder
This commit is contained in:
@@ -271,6 +271,43 @@ export function MainConfigCard({
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{form.getValues().shellTool === "Behinder" && (
|
||||
<div className="space-y-1">
|
||||
<Label>Behinder 配置</Label>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="behinderPass"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1 flex items-center justify-start">
|
||||
<Label className="text-xs whitespace-nowrap w-1/2">密码:</Label>
|
||||
<Input {...field} placeholder="Pass" className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="behinderHeaderName"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1 flex items-center justify-start">
|
||||
<Label className="text-xs whitespace-nowrap w-1/2">请求头键:</Label>
|
||||
<Input {...field} placeholder="Header Name" className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="behinderHeaderValue"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-1 flex items-center justify-start">
|
||||
<Label className="text-xs whitespace-nowrap w-1/2">请求头值:</Label>
|
||||
<Input {...field} placeholder="Header Value" className="h-8" />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{form.getValues().shellTool === "Command" && (
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@@ -44,6 +44,9 @@ function IndexComponent() {
|
||||
godzillaHeaderName: "User-Agent",
|
||||
godzillaHeaderValue: "test",
|
||||
commandParamName: "cmd",
|
||||
behinderPass: "pass",
|
||||
behinderHeaderName: "User-Agent",
|
||||
behinderHeaderValue: "test",
|
||||
injectorClassName: "",
|
||||
packingMethod: "Base64",
|
||||
},
|
||||
@@ -56,11 +59,16 @@ function IndexComponent() {
|
||||
|
||||
async function onSubmit(values: FormSchema) {
|
||||
startTransition(async () => {
|
||||
if (values.shellType.endsWith("Servlet") && values.urlPattern === "/*") {
|
||||
if (values.shellType.endsWith("Servlet") && (values.urlPattern === "/*" || !values.urlPattern)) {
|
||||
toast.warning("Servlet 类型的需要填写具体的 URL Pattern,例如 /hello_servlet");
|
||||
return;
|
||||
}
|
||||
|
||||
if (values.shellType.endsWith("ControllerHandler") && (values.urlPattern === "/*" || !values.urlPattern)) {
|
||||
toast.warning("ControllerHandler 类型的需要填写具体的 URL Pattern,例如 /hello_controller");
|
||||
return;
|
||||
}
|
||||
|
||||
const postData = transformToPostData(values);
|
||||
try {
|
||||
const response = await fetch(`${env.API_URL}/generate`, {
|
||||
|
||||
@@ -13,6 +13,9 @@ export const formSchema = z.object({
|
||||
godzillaKey: z.optional(z.string()),
|
||||
godzillaHeaderName: z.optional(z.string()),
|
||||
godzillaHeaderValue: z.optional(z.string()),
|
||||
behinderPass: z.optional(z.string()),
|
||||
behinderHeaderName: z.optional(z.string()),
|
||||
behinderHeaderValue: z.optional(z.string()),
|
||||
commandParamName: z.optional(z.string()),
|
||||
injectorClassName: z.optional(z.string()),
|
||||
packingMethod: z.string().min(1, { message: "请选择打包方式" }),
|
||||
|
||||
@@ -15,6 +15,9 @@ export interface ShellToolConfig {
|
||||
godzillaHeaderName?: string;
|
||||
godzillaHeaderValue?: string;
|
||||
commandParamName?: string;
|
||||
behinderPass?: string;
|
||||
behinderHeaderName?: string;
|
||||
behinderHeaderValue?: string;
|
||||
}
|
||||
|
||||
export interface CommandShellToolConfig {
|
||||
|
||||
@@ -16,6 +16,9 @@ export function transformToPostData(formValue: FormSchema) {
|
||||
godzillaHeaderName: formValue.godzillaHeaderName,
|
||||
godzillaHeaderValue: formValue.godzillaHeaderValue,
|
||||
commandParamName: formValue.commandParamName,
|
||||
behinderPass: formValue.behinderPass,
|
||||
behinderHeaderName: formValue.behinderHeaderName,
|
||||
behinderHeaderValue: formValue.behinderHeaderValue,
|
||||
};
|
||||
|
||||
const injectorConfig: InjectorConfig = {
|
||||
|
||||
Reference in New Issue
Block a user