是否可以绕过"热链接"图像保护? 我不是想把它发布在其他网站上只是为了下载。当我使用 WGET 下载以下图像时:
http://comicsbook.ru/upload/%D0%9A%D0%BE%D0%BC%D0%B8%D0%BA%D1%81-Trollface-%D0%9D%D0%B0-%D0%B1%D0%BE%D1%80%D1%82%D1%83-70813.jpg
我被重定向到:
http://comicsbook.ru/trollface/70813?na-bortu
我不知道从哪里开始。到目前为止我尝试过:
curl "http://comicsbook.ru" -s -L -b cookie.c -c cookie.c -b "$COOKIEPAR" > index.$TEMP
wget http://comicsbook.ru/upload/%D0%9A%D0%BE%D0%BC%D0%B8%D0%BA%D1%81-Trollface-%D0%9D%D0%B0-%D0%B1%D0%BE%D1%80%D1%82%D1%83-70813.jpg
您可以使用
wget
的--refer=URL
选项。也许你可以试试:
wget --referer=http://comicsbook.ru http://comicsbook.ru/upload/%D0%9A%D0%BE%D0%BC%D0%B8%D0%BA%D1%81-Trollface-%D0%9D%D0%B0-%D0%B1%D0%BE%D1%80%D1%82%D1%83-70813.jpg
要下载此映像,请运行以下 curl 命令:
curl -e 'http://comicsbook.ru/trollface/70813?na-bortu' -A "Mozilla/5.0" -L -b /tmp/c -c /tmp/c -s 'http://comicsbook.ru/upload/%D0%9A%D0%BE%D0%BC%D0%B8%D0%BA%D1%81-Trollface-%D0%9D%D0%B0-%D0%B1%D0%BE%D1%80%D1%82%D1%83-70813.jpg' > image.jpg
所有的魔力都在-e
开关中:裁判