Skip to content

Commit 736d438

Browse files
committed
Address second round of feedback
Brain fart on guard clauses when I've been using them all this time... Updating the conditions made the ternary fall out of favor. Changed some wording in the doc to suggest the domain name for a particular NIS server may be different from the bootparamd client's configuration.
1 parent 1a8eb7b commit 736d438

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

documentation/modules/auxiliary/gather/nis_bootparamd_domain.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ From the `bootparamd(8)` man page:
77
The module documented within will allow a tester to disclose the NIS
88
domain name from a server running `bootparamd`. After knowing the domain
99
name, the tester can follow up with `auxiliary/gather/nis_ypserv_map` to
10-
dump a map from an NIS server (running as `ypserv`).
10+
dump a map from a compatible NIS server (running as `ypserv`).
1111

1212
## Setup
1313

@@ -62,7 +62,8 @@ msf auxiliary(gather/nis_bootparamd_domain) >
6262
```
6363

6464
After disclosing the domain name, you can use
65-
`auxiliary/gather/nis_ypserv_map` to dump a map from an NIS server.
65+
`auxiliary/gather/nis_ypserv_map` to dump a map from a compatible NIS
66+
server.
6667

6768
```
6869
msf auxiliary(gather/nis_bootparamd_domain) > use auxiliary/gather/nis_ypserv_map

modules/auxiliary/gather/nis_bootparamd_domain.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@ def parse_bootparams(res)
133133
Integer # Router Address: [redacted]
134134
)
135135

136-
if host && domain
137-
bootparams[host] = domain
138-
else
139-
break
140-
end
136+
break unless host && domain
137+
138+
bootparams[host] = domain
141139
rescue Rex::ArgumentError
142140
vprint_status("Finished XDR decoding at #{res.inspect}")
143141
break

modules/auxiliary/gather/nis_ypserv_map.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,9 @@ def parse_map(res)
136136
String # Key: [redacted]
137137
)
138138

139-
if status == 1 && key && value
140-
map[key] = value
141-
else
142-
break
143-
end
139+
break unless status == 1 && key && value
140+
141+
map[key] = value
144142
rescue Rex::ArgumentError
145143
vprint_status("Finished XDR decoding at #{res.inspect}")
146144
break

0 commit comments

Comments
 (0)