From 16baaa253c638b4e124e41609c2e54e22f82ec36 Mon Sep 17 00:00:00 2001 From: syscats Date: Sun, 4 Feb 2024 14:08:39 +0100 Subject: [PATCH] feat: handle API flag --- pkg/config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index 4f64b54..99aa618 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -21,6 +21,7 @@ type Settings struct { Timeout time.Duration URLs goflags.StringSlice File string + ApiMode bool } const ( @@ -66,6 +67,10 @@ func Parse() *Settings { flagSet.IntVar(&settings.Threads, "threads", 10, "Number of threads to run scans on"), ) + flagSet.CreateGroup("api", "API", + flagSet.BoolVar(&settings.ApiMode, "api", false, "Enable API mode. Only useful for internal lunchcat usage"), + ) + if err := flagSet.Parse(); err != nil { log.Fatalf("Could not parse flags: %s", err) }