1
1
NMAP Scan Result: {{ .NMAPRun.StartStr }}
2
2
==========================================
3
- {{ $displayDownHosts := not .OutputOptions.MarkdownOptions.SkipDownHosts }}
3
+ {{ $skipDownHosts := .OutputOptions.MarkdownOptions.SkipDownHosts }}
4
4
{{ $skipSummary := .OutputOptions.MarkdownOptions.SkipSummary }}
5
5
{{ $skipPortScripts := .OutputOptions.MarkdownOptions.SkipPortScripts }}
6
6
{{ $skipMetrics := .OutputOptions.MarkdownOptions.SkipMetrics }}
@@ -12,9 +12,9 @@ NMAP Scan Result: {{ .NMAPRun.StartStr }}
12
12
* [Scan Summary](#scan-summary)
13
13
{{- end }}{{/* if $skipSummary */}}
14
14
{{- range .NMAPRun.Host -}}
15
- {{- if or ($displayDownHosts) (eq .Status.State "up") }}
15
+ {{- if .ShouldNotSkipHost $skipDownHosts }}
16
16
* [{{ md_title . }}](#{{ md_link . }})
17
- {{- end -}}{{/* if or ($displayDownHosts) (eq .Status.State "up") */}}
17
+ {{- end -}}{{/* .ShouldNotSkipHost $skipDownHosts */}}
18
18
{{- end -}}{{/* range .Host */}}
19
19
20
20
{{- if not $skipSummary }}
@@ -60,11 +60,11 @@ NMAP Scan Result: {{ .NMAPRun.StartStr }}
60
60
----
61
61
62
62
{{ range .NMAPRun.Host -}}
63
- {{- if or ($displayDownHosts) (eq .Status.State "up") }}
63
+ {{- if .ShouldNotSkipHost $skipDownHosts }}
64
64
65
65
## {{ md_title . }}
66
66
67
- {{- if eq .Status.State "up" }}
67
+ {{- if .ShouldNotSkipHost $skipDownHosts }}
68
68
### Info:
69
69
70
70
| Name | Value |
@@ -134,10 +134,10 @@ NMAP Scan Result: {{ .NMAPRun.StartStr }}
134
134
{{- end -}}{{/* if .Script */}}
135
135
{{ end -}}{{/* if not $skipPortScripts */}}
136
136
{{ end -}}{{/* range .Port */}}
137
- {{- end -}}{{/* if eq .Status.State "up" */}}
137
+ {{- end -}}{{/* if .ShouldNotSkipHost $skipDownHosts */}}
138
138
139
139
----
140
140
141
- {{- end -}}{{/* if or ($displayDownHosts) (eq .Status.State "up") */}}
141
+ {{- end -}}{{/* if .ShouldNotSkipHost $skipDownHosts */}}
142
142
143
143
{{- end -}}{{/* range .NMAPRun.Host */}}
0 commit comments