mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
blockcheck: windows compatible nslookup
This commit is contained in:
parent
3e1cd91b74
commit
4c0b7f630f
@ -1384,6 +1384,7 @@ lookup4()
|
|||||||
case "$LOOKUP" in
|
case "$LOOKUP" in
|
||||||
nslookup)
|
nslookup)
|
||||||
nslookup $1 $2 2>/dev/null | sed -n '/Name:/,$p' | sed -nre 's/^.*(([0-9]{1,3}\.){3}[0-9]{1,3}).*$/\1/p'
|
nslookup $1 $2 2>/dev/null | sed -n '/Name:/,$p' | sed -nre 's/^.*(([0-9]{1,3}\.){3}[0-9]{1,3}).*$/\1/p'
|
||||||
|
nslookup lenta.ru 1.1.1.1 2>/dev/null | sed -ne '1,3d' -nre 's/^Address: (([0-9]{1,3}\.){3}[0-9]{1,3}).*$/\1/p'
|
||||||
;;
|
;;
|
||||||
host)
|
host)
|
||||||
host -t A $1 $2 | grep "has address" | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}'
|
host -t A $1 $2 | grep "has address" | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}'
|
||||||
|
Loading…
Reference in New Issue
Block a user