Wget: How to bypass "hotlinking" protected image

bash, hotlinking, linux, web, wget

Solution

You can use the `--refer=URL` option of `wget`. Perhaps you could try:

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

Problem

Is it possible to bypass "hotlink" image protection? i'm not trying to post it on other sites just to download. when i download the following image, using 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 ``` I'm getting redirected to: ``` http://comicsbook.ru/trollface/70813?na-bortu ``` I have no idea where to start. What I've tried so far: ``` 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 ```

Original source