/**
* Zod schemas for exploitation tools
*/
import { z } from "zod";
/**
* Searchsploit search schema
*/
export const SearchsploitSearchSchema = z.object({
query: z
.string()
.describe("Search query (software name, version, or keyword)"),
exact: z
.boolean()
.default(false)
.describe("Exact match only"),
cve: z
.string()
.optional()
.describe("Search by CVE ID (e.g., 'CVE-2021-1234')"),
platform: z
.string()
.optional()
.describe("Filter by platform (e.g., 'linux', 'windows', 'php')"),
type: z
.enum(["local", "remote", "webapps", "dos"])
.optional()
.describe("Filter by exploit type"),
});
export type SearchsploitSearchInput = z.infer<typeof SearchsploitSearchSchema>;
/**
* Searchsploit examine schema
*/
export const SearchsploitExamineSchema = z.object({
exploit_id: z
.string()
.describe("Exploit ID or path from searchsploit results"),
color: z
.boolean()
.default(false)
.describe("Enable color output"),
});
export type SearchsploitExamineInput = z.infer<typeof SearchsploitExamineSchema>;
/**
* Msfvenom payload generation schema
*/
export const MsfvenomSchema = z.object({
payload: z
.string()
.describe("Payload type (e.g., 'windows/meterpreter/reverse_tcp', 'linux/x64/shell_reverse_tcp')"),
lhost: z
.string()
.describe("Local host IP for reverse connections"),
lport: z
.number()
.int()
.min(1)
.max(65535)
.describe("Local port for reverse connections"),
format: z
.enum(["exe", "elf", "raw", "python", "powershell", "bash", "java", "war"])
.default("raw")
.describe("Output format"),
arch: z
.enum(["x86", "x64"])
.optional()
.describe("Target architecture"),
platform: z
.enum(["windows", "linux", "osx", "android"])
.optional()
.describe("Target platform"),
encoder: z
.string()
.optional()
.describe("Encoder to use (e.g., 'x86/shikata_ga_nai')"),
iterations: z
.number()
.int()
.min(1)
.max(10)
.default(1)
.describe("Number of encoding iterations"),
output_file: z
.string()
.optional()
.describe("Output file path"),
});
export type MsfvenomInput = z.infer<typeof MsfvenomSchema>;