Portál AbcLinuxu, 2. listopadu 2025 07:14
#!/bin/bash
countDown() {
i=26
while ((--i >= 0)); do
echo -n "$i"
sleep 1
tput el1
tput cub 3
done
}
if [ $# != 1 ]; then
echo -e "\nUsage:\n\t$0 URL\n"
exit 1
fi
UA="Opera/9.12 (X11; Linux i686; U; en)"
OUTPUT=~/Desktop/"$(basename $1 | sed -r 's/_[^_]+$//' | sed -r 's/-([^-]+)$/\1/')"
DOWNLOAD="$(echo $1 | sed s/stahni/stahnout/)"
echo -n Getting SID...
SID="$(
curl -I --user-agent "$UA" "$1" 2>/dev/null | grep -Po '(?<=SID=)[^;]+'
)"
if [ -z "$SID" ]; then
echo " :("
exit 1
fi
echo " done: $SID"
countDown
curl --user-agent "$UA" \
--output "$OUTPUT" \
--cookie SID="$SID" \
--referer "$1" \
"$DOWNLOAD"
wget -c -i links.txt --http-user=USERNAME --http-password=PASSWORD
[maros@wl-500gp root]$ wc -h wc: illegal option -- h BusyBox v1.1.3 (2007.01.01-14:37+0000) multi-call binary Usage: wc [OPTION]... [FILE]...A nainstalovat plnohodnotný wget taky není žádný problém:
#ipkg install wget-sslAktuální verze je 1.10.2-3. To je myslím dost nové
Mam BusyBox v1.1.3 (2006.06.29-17:07+0000), to je trosku starsi. Myslim, ze verze firmwaru ma na konci 7f, v dobe, kdy jsem to instaloval, byla posledni stable.
Tu anabazi s wget tam mam proto, ze to bude fungovat i bez ipkg (staci jedna binarka). Je pravda, ze potom nemas ani screen a nemohl by ses jenom pripojit, pustit stahovani a zase se odpojit. Samozrejme, ze ipkg je mocny nastroj a uz se chystam zprovoznit nahravani z internetovych radii pomoci streamripper (skript mam, jenom vyzkousim, jestli funguje).
[maros@wl-500gp root]$ type wget wget is a tracked alias for /opt/bin/wget [maros@wl-500gp root]$ ipkg files wget-ssl Package wget-ssl (1.11.4-1) is installed on /opt/ and has the following files: /opt/bin/wget /opt/man/man1/wget.1 /opt/etc/wgetrc Successfully terminated. [maros@wl-500gp root]$ wget --version GNU Wget 1.11.4 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Originally written by Hrvoje Niksic . Currently maintained by Micah Cowan . [maros@wl-500gp root]$
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.