Skip to content

Commit

Permalink
change WithSourcePort argument type (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaineK00n authored Apr 6, 2021
1 parent 4e11e55 commit 59a52fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ func WithInterface(iface string) Option {
}

// WithSourcePort specifies from which port to scan.
func WithSourcePort(port int16) Option {
func WithSourcePort(port uint16) Option {
return func(s *Scanner) {
s.args = append(s.args, "--source-port")
s.args = append(s.args, fmt.Sprint(port))
Expand Down
4 changes: 2 additions & 2 deletions nmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1707,12 +1707,12 @@ func TestFirewallAndIDSEvasionAndSpoofing(t *testing.T) {
description: "set source port",

options: []Option{
WithSourcePort(4242),
WithSourcePort(65535),
},

expectedArgs: []string{
"--source-port",
"4242",
"65535",
},
},
{
Expand Down

0 comments on commit 59a52fe

Please sign in to comment.