Last active
November 1, 2023 20:18
-
-
Save iolloyd/2159181 to your computer and use it in GitHub Desktop.
Script to download from easynews
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
USER=god | |
PASS=allyourbasearebelongtous | |
FILE=`echo "$1" | sed 's_\(https://\)\(.*\)\(secure\.\)\(.*\)\(/.*\)_\2\4\5_'` | |
FILE=`echo "$1" | sed 's_\(https://\)\(boost4-\)*\(.*\)\(secure\.\)\(.*\)\(/.*\)_\3\5\6_'` | |
CMD='curl -Y 12800 -y 5 -C - -O http://'$USER':'$PASS'@'$FILE | |
echo $CMD | |
go=true | |
while $go; do | |
$CMD | |
# curl: (28) Operation too slow. Less than 12800 bytes/sec transferred the last 5 seconds | |
# curl: (6) Couldn't resolve host | |
if [ $? != 28 -a $? != 6 ]; then | |
go=false | |
fi | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment