| skipped 1 lines |
2 | 2 | | |
3 | 3 | | import ( |
4 | 4 | | "io" |
5 | | - | "os" |
6 | | - | "strings" |
7 | 5 | | |
8 | 6 | | "github.com/edoardottt/csprecon/pkg/output" |
9 | 7 | | "github.com/projectdiscovery/goflags" |
| skipped 53 lines |
63 | 61 | | flagSet.BoolVar(&options.Silent, "s", false, `Print only results`), |
64 | 62 | | ) |
65 | 63 | | |
66 | | - | if (help() || noArgs()) && !options.Silent { |
| 64 | + | if !options.Silent { |
67 | 65 | | output.ShowBanner() |
68 | 66 | | } |
69 | 67 | | |
| skipped 12 lines |
82 | 80 | | return options |
83 | 81 | | } |
84 | 82 | | |
85 | | - | func help() bool { |
86 | | - | // help usage asked by user. |
87 | | - | for _, arg := range os.Args { |
88 | | - | argStripped := strings.Trim(arg, "-") |
89 | | - | if argStripped == "h" || argStripped == "help" { |
90 | | - | return true |
91 | | - | } |
92 | | - | } |
93 | | - | |
94 | | - | return false |
95 | | - | } |
96 | | - | |
97 | | - | func noArgs() bool { |
98 | | - | // User passed no flag. |
99 | | - | return len(os.Args) < 2 |
100 | | - | } |
101 | | - | |