소스 검색

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