Documentation
¶
Overview ¶
Package toolchain manages the Go compiler for building standalone exploits. Auto-downloads Go if not available on the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderToFile ¶
RenderToFile renders a template to a file.
func Scaffold ¶
func Scaffold(opts ScaffoldOpts) (string, func(), error)
Scaffold creates a temp directory with main.go and go.mod for a standalone build. Returns the dir path and a cleanup function.
Types ¶
type BuildOpts ¶
type BuildOpts struct {
Dir string // source directory (contains main.go + go.mod)
Output string // output binary path
OS string // GOOS (empty = native)
Arch string // GOARCH (empty = native)
}
BuildOpts configures a compilation.
type ScaffoldOpts ¶ added in v0.1.3
type ScaffoldOpts struct {
ImportPath string // Go import path of the module package
Proto string // Protocol to import: "http" or "tcp"
ModRoot string // Local repo root (empty = fetch from proxy)
Version string // Module version tag (used when ModRoot is empty)
}
ScaffoldOpts configures standalone scaffold generation.
Click to show internal directories.
Click to hide internal directories.