File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function Test-Assessment-25395 {
6666 $end = [System.Net.IPAddress ]::Parse($matches [2 ]).GetAddressBytes()
6767 [array ]::Reverse($start )
6868 [array ]::Reverse($end )
69- return (([BitConverter ]::ToUInt32($end , 0 ) - [BitConverter ]::ToUInt32($start , 0 )) -gt 255 )
69+ return (([BitConverter ]::ToUInt32($end , 0 ) - [BitConverter ]::ToUInt32($start , 0 ) + 1 ) -gt 256 )
7070 }
7171 return $false
7272 }
@@ -84,7 +84,7 @@ function Test-Assessment-25395 {
8484 $BroadPortRangeThreshold = 10
8585
8686 if ($Port -eq ' 1-65535' ) { return $true }
87- if ($Port -match ' ^(\d+)-(\d+)$' -and (([int ]$matches [2 ] - [int ]$matches [1 ]) -gt $BroadPortRangeThreshold )) { return $true }
87+ if ($Port -match ' ^(\d+)-(\d+)$' -and (([int ]$matches [2 ] - [int ]$matches [1 ] + 1 ) -gt $BroadPortRangeThreshold )) { return $true }
8888 return $false
8989 }
9090
You can’t perform that action at this time.
0 commit comments