Skip to content

Commit

Permalink
fix wps update script
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed Feb 20, 2024
1 parent 02148da commit 9ed4e31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/updates/WPS Office.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

webVer="$(wget -qO- --timeout=5 https://linux.wps.cn/ | grep -o 'wps\-office_.*_arm64\.deb' | sed 's/^wps\-office_//g' | sed 's/_arm64\.deb//g')"
webVer="$(wget -qO- --timeout=5 https://linux.wps.cn/ | grep -o 'wps\-office_.*_arm64\.deb' | sed 's/^wps\-office_//g' | sed 's/_arm64\.deb//g' | head -n1)"

#custom url 'encryption' function added by wps to prevent abuse
time="$(date +%s)"
secrityKey="$(wget -qO- https://linux.wps.cn | grep 'secrityKey =' | sed 's/.* "//g ; s/";$//g')" #lol typo
secrityKey="$(wget -qO- --timeout=5 https://linux.wps.cn | grep 'secrityKey =' | sed 's/.* "//g ; s/";$//g')" #lol typo
url="/wps/download/ep/Linux2019/$(echo $webVer | sed 's/.*\.//g')/wps-office_${webVer}_arm64.deb"
url="https://wps-linux-personal.wpscdn.cn$url?t=${time}&k=$(echo -n "$secrityKey$url$time" | md5sum | awk '{print $1}')"

Expand Down

0 comments on commit 9ed4e31

Please sign in to comment.