mirror of
https://github.com/byReqz/conn.git
synced 2024-11-22 17:11:16 +00:00
Compare commits
No commits in common. "198d8beb9114502c94a4947cde2ececee2cf523a" and "44b684e721f2ddcb957b835cc9ea183e8f010835" have entirely different histories.
198d8beb91
...
44b684e721
7
conn.sh
7
conn.sh
@ -86,12 +86,7 @@ function set_argvars {
|
|||||||
|
|
||||||
function validate {
|
function validate {
|
||||||
for arg in $@; do
|
for arg in $@; do
|
||||||
if [[ ! "$arg" =~ : ]];then
|
if ip route show " $arg" 2&> /dev/null;then
|
||||||
arg=" $arg" # fixes issue with leading space on ipv6 adresses
|
|
||||||
else
|
|
||||||
only="-6" # enable ipv6, this needs a more complex function to avoid treating every argument as v6
|
|
||||||
fi
|
|
||||||
if ip route show "$arg" 2&> /dev/null;then
|
|
||||||
hosts="$hosts $arg"
|
hosts="$hosts $arg"
|
||||||
elif nslookup "$arg" > /dev/null;then
|
elif nslookup "$arg" > /dev/null;then
|
||||||
hosts="$hosts $arg"
|
hosts="$hosts $arg"
|
||||||
|
Loading…
Reference in New Issue
Block a user