...

View Full Version : help for disable Ctrl + C



Sysop_Neo
10-20-2005, 08:33 PM
Hi all,

I have searched for a way to disable the ctrl + c but i dont have found ... someone know the HTML code or a javascript code for disable that please?

Thanks and sorry for my english

Bye
Neo

Lerura
10-20-2005, 09:04 PM
You cannot prevent that users copy'n'paste from your page.

Even if it's possible (i don't know) there several other ways for the user to obtain what they want:

Amongst many way they can just download and modify you document
so that they get a version where nothing is disabled.

As said by many people:
If you wan't to secure your data, then don't put it on the web;

oracleguy
10-20-2005, 09:06 PM
It isn't possible, that is why you haven't found anything. A webpage can't interact with a user's computer to that level and rightly so. Why are you wanting to disable it?

felgall
10-21-2005, 12:11 AM
That shortcut is handled by the operating system. It never reaches the browser and so the browser has no opportunity to pass it to the web page.

Nightfire
10-21-2005, 12:47 AM
IE only:

Add the following code to your BODY tag:

ondragstart="return false" onselectstart="return false"

Sysop_Neo
10-21-2005, 01:05 AM
smart move :D thanks night :thumbsup:

i want to add a foto of my daughter to my profile but i want to prevent that someone use the foto :)

Thanks e bye all

Neo

Nightfire
10-21-2005, 01:08 AM
Just to add, it's not a fail-safe way of preventing people getting the image. If they want it, they'll get it one way or another. Just thought I'd give you what you wanted, rather than say you can't do this or that :)

Sysop_Neo
10-21-2005, 02:13 AM
that and right click disabled i think thats its impossible to get the image (exception for the software that use FTP etc etc ) i think :cool:

for the "normal surfer" i think its 100% protected off course for the gurus etc they have allways a way to get what they want ...


Bye e thanks one more time (y))))

Neo

PS: i remender know :eek: the print screen need to be disabled also. im gonna search for that code but if someone know how we disabled i apreciate :p Bye (y))))

oracleguy
10-21-2005, 07:23 AM
that and right click disabled i think thats its impossible to get the image (exception for the software that use FTP etc etc ) i think :cool:

for the "normal surfer" i think its 100% protected off course for the gurus etc they have allways a way to get what they want ...

Not to rain on your parade but not even close. And print screen is the same as control + c, it is something the OS handles.

ronaldb66
10-21-2005, 08:05 AM
Amazing how this topic manages to rear its ugly head time and time again:

How to protect my source code (http://www.codingforums.com/showthread.php?t=4437), or images, scripts, etc.
Answer: you can't. If you don't want people to use your image, tell them so and pray for their decency (or attempt to sue them), or don't put it out on the web. Period.

Sysop_Neo
10-21-2005, 10:31 PM
you can't. If you don't want people to use your image, tell them so and pray for their decency (or attempt to sue them), or don't put it out on the web. Period.

Why I can't? Its against the law? Off course not. Is Win Server 2003 a Open Source Operating System? Its true i have the Evaluation Copy but i think not.

As someone as say "all who up down" so if we can add we can protect.

Call for decency!? You know as i that at the real world infortunly that's dont work.

Don't put it out on the web!? Web is a paid service so i have some right's and add what i want (with limitations off course) with my ouwn rules is one of them.

But ...

Thank you for your research of that topic that is useful :thumbsup: and other thing the idea is share opinions and points of view for prevent problems and learn with who know, so i have one lerd question .... what is handles? Their work is for what etc etc ? I know is something of OS but how we use that? Example ... How we use "handles" to get a image, script etc etc on a website? :confused:

Thanks,

Neo

Rocket Boy
10-28-2005, 01:28 PM
Actually there is a way to protect images from right clicks etc although it wouldn't be fullproof if the person REALLy wanted the pic.

You can create a transparent mask in your paint program and place it over the image you are protecting. All right clicks and CTRL+C's will copy the mask and not the image. :thumbsup:

SpirtOfGrandeur
10-28-2005, 02:20 PM
Actually there is a way to protect images from right clicks etc although it wouldn't be fullproof if the person REALLy wanted the pic.

You can create a transparent mask in your paint program and place it over the image you are protecting. All right clicks and CTRL+C's will copy the mask and not the image. :thumbsup:


But again all it takes is looking at the code on the page to see where the image resides and downloading it that way. Or checking the date in your temp directory for the time you accessed the page. That will give you a list of images from the page.

pb&j
10-28-2005, 06:41 PM
saw this a while back. putting this into the url bar will get all the images on the webpage and display them...

javascript:Ai7Mg6P='';for (i7M1bQz=0;i7M1bQz<document.images.length;i7M1bQz++){Ai7Mg6P+='<img src='+document.images[i7M1bQz].src+'><br>'};if(Ai7Mg6P!=''){document.write('<center>'+Ai7Mg6P+'</center>');void(document.close())}else{alert('No images!')}

mw2005
10-28-2005, 06:51 PM
If you want to stop somebody using/copying the picture just place a simple watermark on it.

zro@rtv
10-28-2005, 09:49 PM
@pb&j:
thats a cool little js !

@topic:
another idea on image protection:
slice the graphic up excessively and put the tiny slices into a table....
won't stop a print-screen, but trying to just dl the whole image is thwarted.

(strange how people think you can protect these types of things...
I can''t believe this comes up so often.)

felgall
10-28-2005, 11:33 PM
A screen capture of a sliced image can quickly reassemble it. Watermarking is the only way that can't be undone or bypassed in seconds.

oracleguy
10-28-2005, 11:47 PM
@topic:
another idea on image protection:
slice the graphic up excessively and put the tiny slices into a table....
won't stop a print-screen, but trying to just dl the whole image is thwarted.

Plus bloats the code a ton.

Rocket Boy
10-29-2005, 02:06 AM
But again all it takes is looking at the code on the page to see where the image resides and downloading it that way. Or checking the date in your temp directory for the time you accessed the page. That will give you a list of images from the page.


This is true, the transparent mask idea isn;t full proof but it can be quite confusing to open up your freshly auired image to fnd that it is blank. I can see how it would put some people off.

I know that not everyone agrees with FrontPage but there is an excellent little plugin for it that compresses all the code in every page down to about 3 or 4 lines of gibberish. Just thought of that and how it contributes to solving this problem, hope it helps... somebody... somehwere :)

Naz
10-29-2005, 02:44 PM
The following code prevents people from selecting anything on your site, so it makes it harder for them to copy stuff:


<script language="JavaScript1.2">

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>



You can prevent people from right clicking and saving images by using the following code: ( I don't recommend 'no right click scripts' though)


<script language=JavaScript>
<!--
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;}else{document.
onmouseup=clickNS;document.oncontextmenu=clickIE;}
// -->
</script>


And last but not least, you can put a watermark on the pictures.

pb&j
10-29-2005, 04:34 PM
@pb&j:thats a cool little js !
thanks, but no credit to me. came from one of the cool coders on this forum. :thumbsup:

i have it as a bookmark, so i just click to activate it.

felgall
10-29-2005, 10:21 PM
So anyone wanting to take yout text would either just SAVE the whole page or would use the Opera web browser which doesn't allow for such nonsense.

darkmage784
11-01-2005, 03:34 AM
You might be able to do it (make it more difficult) with Data URIs (http://www.howtocreate.co.uk/wrongWithIE/?chapter=Data%3A+URIs), however that terrible browser with 90% of the market share doesn't support them.

missing-score
11-01-2005, 04:28 AM
The data URI is little protection... Base 64 encoded data can be decoded instantly with base64_decode(), and the mime type is ready and waiting..

Addressed to the poster, please dont think that you are protecting your image by the things that have been posted. If you are concerned about showing the image on the web, then dont.. there is no way to protect it.

The Print screen shortcut will work every time, so I can get the image If I wanted it anyway, and as for annoying right-click blockers I use:


javascript:void(delete document.oncontextmenu);void(delete document.onmousedown);void(delete document.onmouseup);

which means I can right click and save your image like any other.

It still amazes me that people think they can protect images on the web... Please trust me and the others who have said the same, that it is impossible, and if you are seriously concerned, do NOT put your image on the web.

mw2005
11-01-2005, 05:20 PM
Im even surprised that a site like argos think that they can stop poeple using images by using a right click alert (go and see for yourself). The only option that i would use is watermarking and that is the option that i would reccomend.

missing-score
11-01-2005, 05:23 PM
The thing is though... A right click will stop many amateurs.. I mean, if my step dad sees a popup he usually tells me about it later... so he's like "this came up and said this, is the computer going to explode".. But the thing is, people who do know what they are doing will bypass it easily.

wildtrk
11-02-2005, 10:17 PM
The thing is though... A right click will stop many amateurs.. I mean, if my step dad sees a popup he usually tells me about it later... so he's like "this came up and said this, is the computer going to explode".. But the thing is, people who do know what they are doing will bypass it easily.
Bingo!

The majority of users will get stumped by using the simple scripts that have already been mentioned. But anyone that is motivated and has a little bit of techie smarts will grab the image with no problem.

felgall
11-03-2005, 09:57 PM
Those people trying to steal images know all the tricks and how to get around them so nothing will stop them from taking the images if they want them.

A lot of web novices use the context menu for site navigation. Blocking the menu will stop them from being able to navigate your site as they don't know any other way to do it.

So blocking the context menu is making your site unusable to some legitimate visitors while not impacting the thieves at all. A good reason to not block the menu.

magickwolf
10-24-2007, 06:32 AM
Disable the ctrl key on a site put this in the body of your sites source code


<script>
function validateKey (evt)
{
if (evt.keyCode == '17')
{
alert("You may not cut and paste text here.")
return false
}
return true
}
</script>


This should do it for you.

error792
10-24-2007, 06:57 AM
Way to reply to a thread 25 months late. Moreover your "solution" doesn't work at all. I can just turn off Javascript temporarily.

oracleguy
10-24-2007, 08:23 AM
I'm just going to close this thread. Most of these discussions are the same old thing, people post solutions and then others point out how easily they can be circumvented.

If you don't want people to be able to copy something, don't put it on the Internet. It is as simple as that.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum