![David Adrian](/assets/img/avatar_default.png)
Move ZGrab2's main function to a library, and call it in cmd/zgrab2 after importing all of our modules. Consumes of ZGrab2 as a library can use the same approach to provide custom sets of modules, without having to hack the build system or reimplement main. https://github.com/zmap/zgrab2/pull/224
13 lines
222 B
Go
13 lines
222 B
Go
package main
|
|
|
|
import (
|
|
"github.com/zmap/zgrab2/bin"
|
|
_ "github.com/zmap/zgrab2/modules"
|
|
)
|
|
|
|
// main wraps the "true" main, bin.ZGrab2Main(), after importing all scan
|
|
// modules in ZGrab2.
|
|
func main() {
|
|
bin.ZGrab2Main()
|
|
}
|