{"modulePath":"github.com/Method-Security/methodwebtest","version":"v0.0.25","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmd\n\nPackage cmd implements the CobraCLI commands for the methodwebtest CLI. Subcommands for the CLI should all live within this package. Logic should be delegated to internal packages and functions to keep the CLI commands clean and focused on CLI I/O.\n\n## Functions\n\n```go\nfunc LoadBodyXMLRPCFunctionAuthConfig(targets []string, timeout int, retries int, sleep int) *methodwebtest.BodyXmlRpcFunctionAuthConfig\n```\n\n```go\nfunc LoadHeaderBufferOverflowConfig(targets []string, bodySize int, timeout int, sleep int, retries int) *methodwebtest.HeaderBufferOverflowConfig\n```\n\n```go\nfunc LoadHeaderMisconfigurationConfig(targets []string, HeaderEvent methodwebtest.HeaderEvent, timeout int, sleep int, retries int) *methodwebtest.HeaderMisconfigurationConfig\n```\nLoadHeaderMisconfigurationConfig loads the configuration for a path-based fuzzing run.\n\n```go\nfunc LoadHeaderOptionsBleedConfig(targets []string, timeout int, sleep int, retries int) *methodwebtest.HeaderOptionsBleedConfig\n```\n\n```go\nfunc LoadHeaderServerOverloadConfig(targets, headerNames []string, payloadSize int, timeout int, sleep int, retries int) *methodwebtest.HeaderServerOverloadConfig\n```\nLoadHeaderServerOverloadConfig loads the configuration for a path-based fuzzing run.\n\n```go\nfunc LoadHeaderUserAgentConfig(targets []string, agentheader string, timeout int, sleep int, retries int) *methodwebtest.HeaderUserAgentConfig\n```\nLoadHeaderUserAgentConfig loads the configuration for a path-based fuzzing run.\n\n```go\nfunc LoadMultiInjectionConfig(targets []string, method methodwebtest.HttpMethod, injectionLocation methodwebtest.InjectionLocation, eventType methodwebtest.MultiEvent, variableData map[string]string, timeout int, retries int, sleep int) *methodwebtest.MultiInjectionConfig\n```\nLoadMultiInjectionConfig loads the configuration for a multi location injection run.\n\n```go\nfunc LoadPathCrlfConfig(targets []string, headerName string, headerValue string, timeout int, sleep int, retries int) *methodwebtest.PathCrlfConfig\n```\nLoadPathCrlfConfig loads the configuration for a path-based fuzzing run.\n\n```go\nfunc LoadPathModFileConfig(targets []string, timeout int, sleep int, retries int) *methodwebtest.PathModFileConfig\n```\n\n```go\nfunc LoadPathTraversalConfig(targets, paths []string, pathlists []string, queryParam string, responseCodes string, ignoreBaseContent bool, timeout, sleep, retries int, successfulOnly bool, threshold float64, maxRunTime *int) *methodwebtest.PathTraversalConfig\n```\nLoadPathTraversalConfig loads the configuration for a path-based fuzzing run.\n\n```go\nfunc LoadQueryReverseProxyConfig(targets []string, redirectAddress string, timeout int, retries int, sleep int) *methodwebtest.QueryReverseProxyConfig\n```\n\n## Types\n\n```go\ntype MethodWebTest struct {\n\tVersion      string\n\tRootFlags    config.RootFlags\n\tOutputConfig writer.OutputConfig\n\tOutputSignal signal.Signal\n\tRootCmd      *cobra.Command\n\tVersionCmd   *cobra.Command\n}\n```\nMethodWebTest is the main struct for the methodwebtest CLI. It contains both the root command and all subcommands that can be invoked during the execution of the CLI. It also is responsible for managing the output configuration as well as the output signal itself, which will be written after the execution of the invoked command's Run function.\n\n```go\nfunc NewMethodWebTest(version string) *MethodWebTest\n```\nNewMethodWebTest creates a new MethodWebTest struct with the provided version string. The Methodwebtest struct is used throughout the subcommands as a contex within which output results and configuration values can be stored. We pass the version value in from the main.go file, where we set the version string during the build process.\n\n```go\nfunc (a *MethodWebTest) InitApacheCommand()\n```\nInitApacheCommand initializes the apache command for the methodwebtest CLI.\n\n```go\nfunc (a *MethodWebTest) InitGeneralCommand()\n```\nInitGeneralCommand initializes the general command for the methodwebtest CLI.\n\n```go\nfunc (a *MethodWebTest) InitNginxCommand()\n```\nInitNginxCommand initializes the nginx command for the methodwebtest CLI.\n\n```go\nfunc (a *MethodWebTest) InitRootCommand()\n```\nInitRootCommand initializes the root command for the methodwebtest CLI. This command is the parent command for all other subcommands that can be invoked. It also sets up the version command, which prints the version of the CLI when invoked. The root command also sets up the output configuration and signal, which are used to write the output of the subcommands to the appropriate location (file or stdout). Here, we set the PersistentPreRunE and PersistentPostRunE functions that are propagated to all subcommands. These functions are used to set up the output configuration and signal before the command is run, and to write the output signal after the command has completed.\n\n```go\nfunc (a *MethodWebTest) InitWordpressCommand()\n```\nInitWordpressCommand initializes the apache command for the methodwebtest CLI.\n\n","path":"github.com/Method-Security/methodwebtest/cmd","name":"cmd","synopsis":"Package cmd implements the CobraCLI commands for the methodwebtest CLI.","isRedistributable":true}
