Hacker News new | comments | show | ask | jobs | submit login
Show HN: ShotBlocker - iOS screenshot detector a la Snapchat/Poke (github.com)
35 points by 10char on Dec 27, 2012 | hide | past | web | favorite | 30 comments



Seems misleading to call this "ShotBlocker" when it doesn't actually block anything.


What about when people need to take a screen shot of something sent to them for evidence of a crime committed against them?

Also this all hearkens back to the "How do I prevent right clicking on my website with jQuery?" days.


I think the (semi) hidden subtext of both of the applications is the sending of naked pictures or "sexting". I read through the reviews of Snapchat in the app store and it's pretty clear. That may clarify the desire for knowing when a screen cap has been grabbed.


This is also useful for the generalized digital-restrictions-management problem, such as sending someone confidential documents and making sure they don't copy it and send it elsewhere. (Well, insofar as anything is actually useful for DRM, but you can do a reasonably good job on a non-jailbroken platform with iOS's security properties.)


I don't believe anybody is under the impression that Snapchat is for anything other than sexting.


If you're trying to block screenshots, AirPlay mirroring is something else you'll likely want to watch for. It's possible to send a separate feed to the AirPlay display; but not an iOS dev myself so I can't speak to how difficult this is to do.

On the Android side there's also DDMS; unsure if this is detectable or not.


Just out of curiosity, has anyone tried having a set of rapidly switching masks to prevent screenshots, so that at any single point of time, all the app can make a screenshot of is a few semi-random (but small) portions of the image? Get it up past 60 frames per second, with something like a noise pattern on the masks, and a screenshot may be pretty indistinguishable, while giving the image only slightly less quality for the end user.

Would require quite a bit of tweaking to get just right, but there is clearly a demand


What, something like this (temporal dithering)?

https://news.ycombinator.com/item?id=4955639


similar, but with better syncing between frames to eliminate the stroboscopic effect that causes the mask to flutter too long randomly. Something has to smooth the mask switching based on delta time so that slowing of the processing doesn't cause overlaps.

But conceptually, yeah, thats what I was talking about. Interesting read, thank you


Is Apple approving spyware applications now? Is it the app's business what core OS functionality you're using behind its back?


I assume this won't last long, much like how the address book got locked down after it was demonstrated to being abused.


I'm not an iOS user, but what is to stop the user from taking a screenshot and storing it somewhere else? Or posting it to a remote server?

Since the image on the screen is in video memory on the device, surely it is impossible to prevent screenshots from being taken?


Yup, it's impossible to prevent or delete screenshots before they're taken (and you could also do something like take a photo of the device with another camera, if you really wanted). Screenshots are always saved to the Camera Roll on iOS, though, and they can't be taken with or redirected to another location immediately.

Apps like Snapchat and Poke use a detection mechanism just for a better UX, to alert other users after a screenshot happens.


I'm not sure it's impossible, but it would take a great amount of timing and probably some luck. If you can detect a screenshot and throw up a new view quick enough, that's what the screenshot would be. But, I haven't tested that theory, and the timing is probably way too tight to actually work. It'd be more like how Netflix throws up the red screen as soon as it leaves foreground, or the WiFi list in Settings disappears.


It seems like these things would be easy to get around by opening the message, disconnecting from the Internet, snapping a screenshot, and installing the app. Sure, a PITA, but digital is forever.


Would it not be so much easier to simply show images with some steganographic message ("I was displayed in SnapChat") in it, and just check for this rather than checking for "Screenshot-looking" pics?

Just sayin'


"Screenshot-looking" appears to mean "the same size as the screen." Stenography would be significantly more complex.

https://github.com/clayallsopp/ShotBlocker/blob/master/ShotB...


Can someone elaborate on why this is an issue? Why would you need to block screenshots of your app?


With apps like Facebook Poke or SnapChat the content you're sending is ephemeral (it won't be around forever).

Developers of these types of apps can't necessarily prevent a screenshot from happening but you they can at least notify the user who sent the content that a screenshot was taken, which in turn lets them know not to trust the receiver.


which in turn lets them know not to trust the receiver.

Which is why I find this stuff sort of funny.


With apps like Facebook Poke or SnapChat the content you're sending is ephemeral (it won't be around forever).

My camera says otherwise.


they can at least notify the user who sent the content that a screenshot was taken, which in turn lets them know not to trust the receiver.

Why, because they are being held accountable for something they said?


It's not issue of being held accountable for something they said:

http://www.vice.com/en_ca/read/cowards-are-blackmailing-youn...

Its an issue of protecting users who are using apps like these believing their privacy is safeguarded.

Whether this problem can be fixed with a technological solution, rather than a more dramatic social change, is doubtful, but since the can of worms has been opened, its worth trying.


I don't deny there are issues, but they are societal/educational ones. People need to learn that when you send someone something, that's it, it's out of the bag, even if you trust that person. Due to backdoors, security holes and just general warrantless wiretapping, there's almost no way you can guarantee that what you send won't be snooped by a third party, sooner or later. Add to that that people are far too trusting, and society is sick (between treating sex and nakedness as "dirty" and misogynistic predators like the ones mentioned in your link), and yes there will be problems. But things like ShotBlocker won't solve the problem, it will only exacerbate the already tenuous control people have over their property (what right does anyone have telling people they can't make screen caps on their hardware?).

No, it's not worth trying, because a) it won't work, and b) it will have unintended consequences.


I'm pretty sure Snapchat actually does this by just checking to see if you hit the shortcut for taking a screenshot (home button + power button)


Apparently they check for something else: http://blog.chpwn.com/post/38491252231


I do not believe the iOS SDK has access to these buttons. As other users have pointed out, screenshot detection is a hacky method of checking if touch interaction is temporarily disabled (which only(?) occurs during a screenshot).


iOS gives no access to these buttons. It looks as though this code just polls the photo library and checks if a new photo was created.

There was a different version going around earlier which checked for touches being disabled, which happens during a screenshot (but this not the only time iOS does this, I know it happens during the standard navigation "push" animation, and wouldn't be surprised if there were quite a few other standard system actions which disable touches)


While this may be nice - it's only a partial solution. Anybody can take a photo of screen from device #1 with camera from device #2. Nothing can prevent that.


Nothing would stop a second phone with its camera recording the footage of the first camera.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: