Skip to content

Commit

Permalink
fixed issue with ports opening
Browse files Browse the repository at this point in the history
  • Loading branch information
RicYaben committed Jul 24, 2024
1 parent 2ed5d17 commit 9bc35e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ func (target *ScanTarget) OpenTLS(baseFlags *BaseFlags, tlsFlags *TLSFlags) (*TL
// OpenUDP connects to the ScanTarget using the configured flags, and returns a net.Conn that uses the configured timeouts for Read/Write operations.
// Note that the UDP "connection" does not have an associated timeout.
func (target *ScanTarget) OpenUDP(flags *BaseFlags, udp *UDPFlags) (net.Conn, error) {
var port uint = *target.Port | flags.Port
var port uint
// If the port is supplied in ScanTarget, let that override the cmdline option
if target.Port != nil {
port = *target.Port
} else {
port = flags.Port
}

address := net.JoinHostPort(target.Host(), fmt.Sprintf("%d", port))
var local *net.UDPAddr
Expand Down

0 comments on commit 9bc35e6

Please sign in to comment.