# decrypt() { # url=$1 # pathname="/$(echo $url | cut -d '/' -f 4-)" # secrity_key="7f8faaaa468174dc1c9cd62e5f218a5b" # timestamp10=$(date '+%s') # md5hash=$(echo -n "${secrity_key}${pathname}${timestamp10}" | md5sum | cut -d " " -f 1 ) # url="$url?t=${timestamp10}&k=${md5hash}" # echo $url # } # WPS 官网 JS 代码大致逻辑如下: # function downLoad(url) { # var urlObj=new URL(url); # var uri=urlObj.pathname; # var secrityKey="7f8faaaa468174dc1c9cd62e5f218a5b"; # var timestamp10=Math.floor(new Date().getTime() / 1000); # var md5hash=CryptoJS.MD5(secrityKey + uri + timestamp10); # url += '?t=' + timestamp10 + '&k=' + md5hash # console.log(url); # } WEB_CONTENT=$(curl -fs https://linux.wps.cn/) VERSION=$(echo $WEB_CONTENT | grep -o "
" | sed 's/