You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,10 @@ More examples can be found on [Usage Wiki page](https://github.com/vdjagilev/nma
86
86
87
87
### Flags
88
88
89
-
*`-f, --file [filename]` outputs result to the file (by default output goes to STDOUT)
90
-
*`--help` display help message
91
-
*`--version` display version (also can be used: `./nmap-formatter version`)
89
+
-`-f, --file [filename]` outputs result to the file (by default output goes to STDOUT)
90
+
-`--help` display help message
91
+
-`--version` display version (also can be used: `./nmap-formatter version`)
92
+
-`--skip-down-hosts` skip hosts that are down (by default `true`)
92
93
93
94
It's also possible to change various output options. More examples on [Usage Wiki Page - Flags](https://github.com/vdjagilev/nmap-formatter/wiki/Usage#flags-and-output-options).
Copy file name to clipboardexpand all lines: cmd/root.go
+7-5
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ var config = formatter.Config{
43
43
},
44
44
ShowVersion: false,
45
45
CurrentVersion: VERSION,
46
+
SkipDownHosts: true,
46
47
FilterExpressions: []string{},
47
48
}
48
49
@@ -83,10 +84,10 @@ func init() {
83
84
84
85
// Some options related to the output
85
86
// Skip hosts that are down, so they won't be listed in the output
86
-
rootCmd.Flags().BoolVar(&config.OutputOptions.HTMLOptions.SkipDownHosts, "html-skip-down-hosts", true, "--html-skip-down-hosts=false, would print all hosts that are offline in HTML output")
87
-
rootCmd.Flags().BoolVar(&config.OutputOptions.MarkdownOptions.SkipDownHosts, "md-skip-down-hosts", true, "--md-skip-down-hosts=false, would print all hosts that are offline in Markdown output")
88
-
rootCmd.Flags().BoolVar(&config.OutputOptions.CSVOptions.SkipDownHosts, "csv-skip-down-hosts", true, "--csv-skip-down-hosts=false, would print all hosts that are offline in CSV output")
89
-
rootCmd.Flags().BoolVar(&config.OutputOptions.ExcelOptions.SkipDownHosts, "excel-skip-down-hosts", true, "--excel-skip-down-hosts=false, would print all hosts that are offline in Excel file")
87
+
// rootCmd.Flags().BoolVar(&config.OutputOptions.HTMLOptions.SkipDownHosts, "html-skip-down-hosts", true, "--html-skip-down-hosts=false, would print all hosts that are offline in HTML output")
88
+
// rootCmd.Flags().BoolVar(&config.OutputOptions.MarkdownOptions.SkipDownHosts, "md-skip-down-hosts", true, "--md-skip-down-hosts=false, would print all hosts that are offline in Markdown output")
89
+
// rootCmd.Flags().BoolVar(&config.OutputOptions.CSVOptions.SkipDownHosts, "csv-skip-down-hosts", true, "--csv-skip-down-hosts=false, would print all hosts that are offline in CSV output")
90
+
// rootCmd.Flags().BoolVar(&config.OutputOptions.ExcelOptions.SkipDownHosts, "excel-skip-down-hosts", true, "--excel-skip-down-hosts=false, would print all hosts that are offline in Excel file")
90
91
91
92
// Skip header information (overall meta information from the scan)
92
93
rootCmd.Flags().BoolVar(&config.OutputOptions.HTMLOptions.SkipHeader, "html-skip-header", false, "--html-skip-header, skips header in HTML output")
rootCmd.Flags().BoolVar(&config.OutputOptions.D2LangOptions.SkipDownHosts, "d2-skip-down-hosts", true, "--d2-skip-down-hosts=false, would print all hosts that are offline in D2 language output")
128
+
// rootCmd.Flags().BoolVar(&config.OutputOptions.D2LangOptions.SkipDownHosts, "d2-skip-down-hosts", true, "--d2-skip-down-hosts=false, would print all hosts that are offline in D2 language output")
129
+
rootCmd.Flags().BoolVar(&config.SkipDownHosts, "skip-down-hosts", false, "--skip-down-hosts=true, skips hosts that are offline")
0 commit comments