Click to See Complete Forum and Search --> : Ban right click - Stop pics stealers : java code
[Mystik_Cool]
06-15-2002, 01:48 PM
Before, we only had to add this little java code in the code of the webpage, and nobody could right-click to save the pics of your website on his HD :
<script language="JavaScript">
<!--
var message1="Your message here";function stop_au_vol(e) {
if (document.all) {
if (event.button == 2) {
alert(message1);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message1);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=stop_au_vol;
// --></script>
But, as maybe some of you noticed, with the new version of IE (installed by default under win XP), no need of right click : when the visitor let the cursor of the mouse a few seconds above the pic on your website, some icons appear and he can save the pic without using right button of the mouse.
Is there any other solution to keep our creations for us only... ? Ban left click maybe ? :D
(I know that there is no real solution to stop stealers, if someone really wants a pic, he will have a look at the HTML source code of the page to get the location of the pic and then d/l it. Or even, he will make a "Print Screen" ! lol)
[ 15 June 2002: Message edited by: [Mystik_Cool] ]
jscott
06-15-2002, 02:41 PM
Or if they disable javascript, as I do to lose some pop-ups, this script will be ignored. If you don't want to share something, just keep it off the net.
X_console
06-15-2002, 02:53 PM
Just for the record, Java and Javascript are two totally different languages. What you have is Javascript. And no, there really isn't a way to stop people from stealing images that you've made available to the public. I've been able to get the HTML source and pictures from some sites that have disabled right-click. Like jscott said, if you don't want it stolen, don't put it on the Net.
Strogian
06-15-2002, 05:30 PM
I think Microsoft added that feature just so people would quit disabling the right click on their websites.. It's just too annoying. :)
[Mystik_Cool]
06-16-2002, 05:53 AM
Ok thanx a lot ! (sorry for java and javascript, please accept all my appologies...).
I know there is always a way to "steal" the images but, as Strogian said, ban left click is really annoying and it can discourage a lot of people :)
Oh, by the way... Is it true ? Is there ALWAYS a way to steal pics ?
I think that, with Flash for example (the macromedia product), it is possible to check the adress of the website and then print or no the pic. The adress of the pic would be hidden (erm... I don't know how... lol) and the "Print Screen" would be forbidden (I don't know how anymore...)
Do you think that's possible ?
[ 16 June 2002: Message edited by: [Mystik_Cool] ]
[Mystik_Cool]
06-16-2002, 07:23 AM
I tried to do so here, with Flash (so the code is ActionScript)
You can test it here (http://www.chez.com/mystikcool/test1.html).
When the 'movie' is loading, I check the adress of the website like this :
adress = _root.photo._url;
realadress = "http://www.chez.com/mystikcool/test1.swf";
if (adress!=realadress) {
gotoAndStop (5);
}
And at the frame 5, there is the message "you may not have this pic". Else, if you are on the right website with the right adress, this will print the first frame, with the picture.
This works fine. So, even if you download the movie or go back in your navigator's temporary folder to get this file, you won't be able to see the pic.
Then, to disable "Print Screen", I naively tried this :
onClipEvent (keyDown) {
gotoAndStop (5);
}
Of course, this work with all the keys EXCEPT "Print Screen", "Scroll lock" and "Break". I don't know how these keys work, but I presume it is different then others :-)
If you have any suggestion, or if you know that what I want to do is impossible, please feel free to explain !
PS: I know that it printing every pic with Flash is really heavy, and certainly not a good solution.
And also, a few days ago, I read a post where someone said same goes for audio; how can you copy protect it if you can listen to it? i'll hold a d@mn tape recorder up to the speakers if i have to
Of course, same here, you will always be able to put a digital camera in front of your screen... lol
But, in fact, I don't even want to protect pics on my website, that's simply curiosity :D
PPS: maybe you'll have a problem in opening the weblink I posted here... I certainly made a mistake somewhere in the code... But it doesn't matter, the goal is to see if it is possible to avoid the "Print Screen"...
[ 16 June 2002: Message edited by: [Mystik_Cool] ]
TacKat
06-16-2002, 11:11 AM
It is ALWAYS possible to steal a pic if they can view it. If someone wants it bad enough, they can always read it out of the video buffer. In order for someone to listen/view/whatever to some data, that data has to pass through their machine somehow, from there it's just a matter of reading it in whatever way is convenient.
Gnu/Vince
06-16-2002, 11:49 AM
If you put a pic on the web, it's 100% sure someone will be able to copy it. Be it by right-clicking, getting the link in wget, taking a screenshot, etc.
[Mystik_Cool]
06-16-2002, 11:51 AM
You are totally right, and I don't forget this point. I said myself : there is always a solution, even if it consists in taking photos of your screen.
Simply, imagine the common computer user, he will never think about tortuous ways like this only to get an image ! So if you can prevent the "Print Screen", for 99% of the users, the image will be inviolable.
And now, even if I don't have to protect any pic, to be able to prevent the "Print Screen" (or to understand that it is impossible to prevent it) became a little challenge, that's all. :D
saithan
06-16-2002, 01:14 PM
lets not forget that all images on the web are stored in the veiwers cache meaning that if they are using windows all they need to do is look in their windows\temp folder and copy the images from there. nix stores them ~/.browser_name/cache
so really there is absloutlly no way to keep internet images from being copied if a person really wants to steal them.
[Mystik_Cool]
06-16-2002, 01:34 PM
Yeah I know that but with the system I explained with Flash (see upper), even if someone has the file with the picture on his drive, he cannot do anything with it.
My real problem is the "Print Screen" option.
PS: of course, I agree that it is totally impossible to protect a simple jpg or bmp picture.
one more PS : some problems with the link I posted upper, sorry about that, I'll try to fix it as soon as I have the time...
If you want to check that on your HD, you won't be able to see the pic, here is the adress of the file : http://www.chez.com/mystikcool/test1.swf
[ 16 June 2002: Message edited by: [Mystik_Cool] ]