Skip to content

Commit

Permalink
Silenced grepcidr.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgmdev committed Nov 11, 2018
1 parent c334796 commit a0522d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ddos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ ban_incoming_and_outgoing()
# Strip port and [ ] brackets
sed -E "s/\\[//g; s/\\]//g; s/:[0-9]+$//g" | \
# Only leave non whitelisted, we add ::1 to ensure -v works for ipv6
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" | \
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" 2>/dev/null | \
# Sort addresses for uniq to work correctly
sort | \
# Group same occurrences of ip and prepend amount of occurences found
Expand Down Expand Up @@ -319,7 +319,7 @@ ban_only_incoming()
# Strip port and [ ] brackets
sed -E "s/\\[//g; s/\\]//g; s/:[0-9]+$//g" | \
# Only leave non whitelisted, we add ::1 to ensure -v works
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" | \
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" 2>/dev/null | \
# Sort addresses for uniq to work correctly
sort | \
# Group same occurrences of ip and prepend amount of occurences found
Expand Down Expand Up @@ -447,7 +447,7 @@ view_connections()
# Sort addresses for uniq to work correctly
sort | \
# Only leave non whitelisted
grepcidr -v -e "$SERVER_IP_LIST $whitelist" | \
grepcidr -v -e "$SERVER_IP_LIST $whitelist" 2>/dev/null | \
# Group same occurrences of ip and prepend amount of occurences found
uniq -c | \
# Numerical sort in reverse order
Expand All @@ -464,7 +464,7 @@ view_connections()
# Sort addresses for uniq to work correctly
sort | \
# Only leave non whitelisted, we add ::1 to ensure -v works
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" | \
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" 2>/dev/null | \
# Group same occurrences of ip and prepend amount of occurences found
uniq -c | \
# Numerical sort in reverse order
Expand Down Expand Up @@ -499,7 +499,7 @@ view_connections_port()
# Sort addresses for uniq to work correctly
sort | \
# Only leave non whitelisted
grepcidr -v -e "$SERVER_IP_LIST $whitelist" | \
grepcidr -v -e "$SERVER_IP_LIST $whitelist" 2>/dev/null | \
# Group same occurrences of ip and prepend amount of occurences found
uniq -c | \
# Numerical sort in reverse order
Expand All @@ -516,7 +516,7 @@ view_connections_port()
# Sort addresses for uniq to work correctly
sort | \
# Only leave non whitelisted, we add ::1 to ensure -v works
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" | \
grepcidr -v -e "$SERVER_IP_LIST $whitelist ::1" 2>/dev/null | \
# Group same occurrences of ip and prepend amount of occurences found
uniq -c | \
# Numerical sort in reverse order
Expand Down

0 comments on commit a0522d0

Please sign in to comment.