Live data from Hacker News

You can't download this image

youcantdownloadthisimage.online

221–230 of 241 posts

Re: You can't download this image

#221
post #56
post #28

When you usually try to download an image, your browser opens a connection to the server and sends a GET request asking for the image. I'm not a web designer, but that seems rather ass-backwards. I'm already looking at the image, therefore the image is already residing either in my cache or in my RAM. Why it is downloaded a second time instead of just being copied onto my drive?

You can totally "download" the image in your RAM by right clicking / long pressing -> "copy image" or equivalent in most browsers. It's just not going to be a byte by byte identical file, and may be in a different format, e.g. you get a public.tiff on the clipboard when you copy an image from Chrome or Safari on macOS, even if the source image is an image/svg+xml.

That's the first thing I tried, "copy image" then, on gimp, file->create->from clipboard.

And it just worked, with no hassle.

Re: You can't download this image

#222

Other methods have been posted, but I wanted to share mine. Mac needed: 1. Secondary click image → "Copy Image" 2. Open Preview 3. File → New from Clipboard 4. Save image

Yeah, I couldn't figure what the fuzz is about at first, as I simply right-clicked, copied and pasted into mspaint. I rarely need to save an image, more often than not I just paste it into some other application.

Re: You can't download this image

#223

This sure seems like a weakness of the so-called "modern" web browser. Simpler, safer clients and proxies have no trouble dealing with a server that is (deliberately) too slow. For example, curl curl -y3 -4o 1.jpg https://youcantdownloadthisimage.online/lisa.jpg tnftp ftp -q3 -4o 1.jpg https://youcantdownloadthisimage.online/lisa.jpg links xy(){ tmux send "$@" ;}; xy "links https://youcantdownloadthisimage.online/lis…

netcat w/stunnel

   cat  1.cfg
   [ x ]
   accept=127.0.0.255:80 
   client=yes
   connect=137.135.98.207:443
   options=NO_TICKET
   options=NO_RENEGOTIATION
   renegotiation=no
   sni=
   sslVersion=TLSv1.3
   eof
   stunnel 1.cfg
 
   printf 'GET /lisa.jpg HTTP/1.0\r\nHost: youcantdownloadthisimage.online\r\nAccept-Encoding: gzip\r\n\r\n' \
   |nc -w1 -vv 127.255 80 |jpgx > 1.jpg
openssl

   printf 'GET /lisa.jpg HTTP/1.0\r\nHost: youcantdownloadthisimage.online\r\nAccept-Encoding: gzip\r\n\r\n' \
   |timeout 3 openssl s_client -tls1_3 -connect 137.135.98.207:443 -ign_eof|jpgx  > 1.jpg
jpgx (custom filter: extract JPG from stdin; foremost will not work for this image, see byte 8114, etc.)

    sed '1,3s/^ */ /;4,18s/^ *//'  jpgx.l
    int fileno(FILE *);
    #define jmp (yy_start) = 1 + 2 *
    #define echo do {if(fwrite(yytext,(size_t)yyleng,1,yyout)){}}while(0)
   xa "\xff\xd8"    
   xb "\xff\xd9"    
   %s xa 
   %option noyywrap noinput nounput
   %%
   {xa} putchar(255);putchar(216);jmp xa;
   {xb} echo;yyterminate();
   .|\n echo;
   .|\n
   %%
   int main(){ yylex();exit(0);}
   eof
   
   flex -8iCrf jpgx.l;
   cc -std=c89 -Wall -pedantic -I. -pipe lex.yy.c -static -o jpgx;

Re: You can't download this image

#224

There's another way to achieve this in a more malicious way. Granted I haven't tried it in years, but it was possible back in 2017 when I tested it. The idea is to fake the image that's being displayed in the IMG element by forcing it to show a `background-image` using `height: 0;` and `padding-top`. In theory, you could make an IMG element show a photo of puppies and if the person chose to Right-click > Save Image A…

You could also just do like we did for years and check the refer for the image request, and if it wasn't your web server you redirect the file to whatever you want, the end user has know what of knowing. and because the trick is done on the server side then viewing your source won't get around it. This is the same method used to prevent hot linking to images back in the day.

Modern browsers suppress the referrer. Relying on it for functionality is not a good idea.

Re: You can't download this image

#225
post #212

Earlier quoted context omitted.

I've always thought the same. The data is there, why go through the trouble of downloading it again?

but the data is not there! it's just displaying a partially-loaded image.

Does it matter if you want a bit for bit copy of what's on the screen?

Re: You can't download this image

#226

In Chrome, you can just do as the author says, right click and "Save Image As". Then just go to the folder where it is being downloaded, and copy/paste the file "lisa.jpeg.crdownload" to "lisa.jpeg.crdownload copy". Rename to "lisa.jpeg" and cancel the download. You now have the image. What's interesting is that you ARE actually downloading this image. It's just that they don't terminate the connection.

I just dragged and dropped it to my desktop. This was on macOS, dunno if Windows would allow that.

When I did that, macos dropped it as a .webloc rather than an image.

Re: You can't download this image

#228
post #178

Earlier quoted context omitted.

Whatever your browser shows, is shown from cache. So the picture should be in your cache, too.

(Most) browsers actually start displaying an image before it's fully downloaded. In fact, many image formats/renderers are specifically designed with this property in mind, like jpeg which will render progressively less blurry versions of an image as the browser receives progressively higher-frequency components of the Fourier transform. While the bytes are there temporarily, just like with all the other methods disc…

it would be interesting if the download stopped after the second to last progressive layer but before the last byte; then the .crdownload renaming workaround wouldn't work.

Re: You can't download this image

#229
post #155
post #123

Earlier quoted context omitted.

An image virus? Please do elaborate.

"Buffer Overrun in JPEG Processing (GDI+) Could Allow Code Execution (833987)" [0] [0] https://docs.microsoft.com/en-us/security-updates/SecurityBu...

there was a more recent case with image metadata parsing that, when the author tried to report it, the image also broke youtrack

Re: You can't download this image

#230

Earlier quoted context omitted.

You could also just do like we did for years and check the refer for the image request, and if it wasn't your web server you redirect the file to whatever you want, the end user has know what of knowing. and because the trick is done on the server side then viewing your source won't get around it. This is the same method used to prevent hot linking to images back in the day.

Modern browsers suppress the referrer. Relying on it for functionality is not a good idea.

Fair point, you can accomplish the same by comparing the ip adress that the image request came from against your servers.
Post reply on HN