Skip to content

Commit

Permalink
bug EvanAnderson#19: special-case exemption for 0 and 255
Browse files Browse the repository at this point in the history
  • Loading branch information
greatquux committed Mar 31, 2017
1 parent 5ee3652 commit 4079af9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ts_block.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,13 @@ Sub Block(IP)
Dim strRunCommand
Dim intRemoveBlockTime

' don't block special IPs
If InStr("0.0.0.0",IP) > 0 Then Exit Sub
If InStr("255.255.255.255",IP) > 0 Then Exit Sub

' don't block if IP is in whitelist (no need to log)
If InStr(strWhitelist,IP) > 0 Then Exit Sub

' Block an IP address (either by black-hole routing it or adding a firewall rule)
If (TESTING <> 1) Then
If intBlackholeStyle = BLACKHOLE_ROUTE Then strRunCommand = "route add " & IP & " mask 255.255.255.255 " & blackHoleIPAddress
Expand Down

0 comments on commit 4079af9

Please sign in to comment.