Commit b58b9465 authored by Vitaly Lipatov's avatar Vitaly Lipatov

cli: make search argument safe

parent fd969ec5
......@@ -72,9 +72,9 @@ if [ "$command" = "check" ] ; then
fi
if [ "$command" = "search" ] ; then
mask="$(echo "$1" | sed -e 's|\.|\\.|g')"
ipset list $setname | grep --color "$mask"
ipset list $setname_ipv6 | grep --color "$mask"
mask="$1"
ipset list "$setname" | grep --color=auto -F -- "$mask"
ipset list "$setname_ipv6" | grep --color=auto -F -- "$mask"
exit
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment