-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathopt_os.go
More file actions
28 lines (25 loc) · 803 Bytes
/
opt_os.go
File metadata and controls
28 lines (25 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package nmap
// WithOSDetection enables OS detection.
func WithOSDetection() Option {
return func(s *Scanner) error {
s.args = append(s.args, "-O")
return nil
}
}
// WithOSScanLimit sets the scanner to not even try OS detection against
// hosts that do have at least one open TCP port, as it is unlikely to be effective.
// This can save substantial time, particularly on -Pn scans against many hosts.
// It only matters when OS detection is requested with -O or -A.
func WithOSScanLimit() Option {
return func(s *Scanner) error {
s.args = append(s.args, "--osscan-limit")
return nil
}
}
// WithOSScanGuess makes nmap attempt to guess the OS more aggressively.
func WithOSScanGuess() Option {
return func(s *Scanner) error {
s.args = append(s.args, "--osscan-guess")
return nil
}
}