News for hackers. Stuff that matters.
Re:Send Self Destructing E-mails by laumars on Tuesday October 22, 2013 @09:06AM (#6591548)
You can't easily stop wget. It's impossible to distinguish between Firefox accessing the image, and wget / curl / whatever accessing the image with Firefox's user agent string (and changing the user agent string in these utilities is just a simple flag)
Re:Send Self Destructing E-mails by eli on Tuesday October 22, 2013 @09:27AM (#6591664)
You could get clever by testing on the server whether the other headers are consistent with the User Agent (e.g. Accept).

But yeah, ultimately it's a losing game because you're trusting the client not to be compromised.

Re:Send Self Destructing E-mails by brey on Tuesday October 22, 2013 @09:39AM (#6591759)
neat tool: chrome developer tools > network > rightclick a resource > copy as Curl > paste on command line

allows you to replay a request, complete with all cookies and the exact same headers.

yeah, aware this isn't what's wanted here, single request image etc etc ... but relevant.

Re:Send Self Destructing E-mails by GhotiFish on Tuesday October 22, 2013 @09:51AM (#6591856)
OH! You wonderful wonderful man!
Re:Send Self Destructing E-mails by brey on Tuesday October 22, 2013 @11:07AM (#6592377)
handy, ain't it? :)
Re:Send Self Destructing E-mails by laumars on Tuesday October 22, 2013 @10:06AM (#6591940)
> You could get clever by testing on the server whether the other headers are consistent with the User Agent (e.g. Accept).

Those headers can vary from machine to machine even when using the same browser. So you'd have a huge amount of testing, plus the big risk of braking legitimate requests. I just cant see how you could pull that off successfully.

> But yeah, ultimately it's a losing game because you're trusting the client not to be compromised.

Totally. Even if your solution did work, it's trivial to break again as you just add the appropriate headers to wget / curl as well as changing the user agent string.