瀏覽代碼

Update redirectCmd.sh

MoeClub 3 年之前
父節點
當前提交
882e837f74
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AnyConnect/redirect/redirectCmd.sh

+ 1 - 1
AnyConnect/redirect/redirectCmd.sh

@@ -19,7 +19,7 @@ function getInterface(){
 
 echo "${RemoteAddress}" |grep -q "[0-9a-zA-Z\.]\+:[0-9]\{1,5\}"
 [ "$?" -ne 0 ] && echo "Invalid RemoteAddress(Host:Port)" && exit 1
-RemoteHost="$(host $(echo ${RemoteAddress} |cut -d: -f1) |grep -o '[0-9\.]\{1,3\}\.[0-9\.]\{1,3\}\.[0-9\.]\{1,3\}\.[0-9\.]\{1,3\}')"
+RemoteHost="$(echo ${RemoteAddress} |cut -d: -f1 |grep -o '[0-9\.]\{1,3\}\.[0-9\.]\{1,3\}\.[0-9\.]\{1,3\}\.[0-9\.]\{1,3\}')"
 RemotePort="$(echo ${RemoteAddress} |cut -d: -f2 |grep -o '[0-9]\{1,5\}')"
 
 [ ! -n "${RemoteHost}" ] && echo "Invalid RemoteHost" && exit 1