PDA

View Full Version : Right Click



SoulReaver
July 25th, 2001, 19:34
Hey all,

Can someone give me the right click disable script.

Thanx in advance.

niv
July 25th, 2001, 20:46
i don't think that's very effective. someone can just use the windows shortcut key, disable javascript, or look at your source code.

polestar
July 26th, 2001, 09:50
You can press the windows shortcut key? That's lame!

Also, if you disable right click nobody will be able to steal your images, which would suck! :p If I thought of all the images I right-click and save, I'd never disable right clicks on my site - sort of returning the favour.

roblev
July 26th, 2001, 10:02
I guess you guys do not have the REAL scripts to disable right click! Hahahahah! I have a script which is two words. I stole the script off of 3dsmax's authenication package. Anyways here is the code for you people who like thier work NOT to be stolen:

(Note: It is not in PHP)

<body bgcolor="black" onContextMenu="return false;">

As simple as that. And it works too! No way of disabling it. No matter what!

niv
July 26th, 2001, 10:07
what if you use the view source or better yet lynx, which AUTOMATICALLY gives you the URL to stuff like images

roblev
July 26th, 2001, 10:11
but really, if you look at stats of a normal website, it tells you the majority of people (on mine, 80% are using a windows computer with IE), so if you were crazy enough you would put a ----load of code if you wanted to secure your page.

niv
July 26th, 2001, 10:16
true, and what's the point of having images if people aren't going to steal them :D

coolblu
July 26th, 2001, 11:18
This script is a little more secure as it redirects the user to another page (perhaps you could use this for advertising or telling the user(s) not to click any of the pages

Just change "redirecturl.htm" with the location you want the user to be forwarded to when right cliking your page, and also replace the alert to the text you want the user to see.


Have fun :D

Blu :rolleyes:

NOTE: The script is in JavaScript (place under the body tag)


<script language="JavaScript">
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceIExplorer;
function noSourceIExplorer()
{
if (event.button == 2 | event.button == 3)
{
alert ("Trying to steal my source code?");
location.replace("redirecturl.htm");
}
}
</script>

roblev
July 26th, 2001, 12:11
If you actually understood anything about HTML and my coding, then you would know how to bypass that script. If you had your script and mine put together, then it would be secure, but your script is terribly insecure. Take it from a guy with experience buddy!

LastActionHero
July 26th, 2001, 13:17
I once saw a website which changed the whole god damn right click menu. Now how did the site do that?

niv
July 26th, 2001, 13:46
DHTML :confused:

el crapo
July 26th, 2001, 13:46
Originally posted by lastactionhero
I once saw a website which changed the whole god damn right click menu. Now how did the site do that?

Maybe they used a script like this (http://www.dynamicdrive.com/dynamicindex1/contextmenu.htm) or this (http://www.dynamicdrive.com/dynamicindex1/contextmenu2.htm)

polestar
July 26th, 2001, 13:48
If I built a site and I found out people were checking out the source, I'd be flattered. Anyway, if you were that desperate to view the source of a page, you'd use this little beauty:

<HEAD>
<!-- Begin
function viewSource() {
document.getSource.view.value="Please wait!";
setTimeout("document.getSource.view.value='View Source!'",6000);
window.location.href= "view-source:" + document.getSource.url.value;
return false;
}
// End -->
</script>
</HEAD>

<BODY>
<center>
Type in a full URL and click "View Source"
<br>
<br>
<form name=getSource onSubmit="return viewSource();">
<input type=text name=url value="http://">
<br>
<br>
<input type=submit name=view value="View Source">
</form>
</center>
</BODY>

Stop that one!

LastActionHero
July 26th, 2001, 13:58
Originally posted by el crapo


Maybe they used a script like this (http://www.dynamicdrive.com/dynamicindex1/contextmenu.htm) or this (http://www.dynamicdrive.com/dynamicindex1/contextmenu2.htm)

Thanks el crapo! You don't speak crap after all :D

el crapo
July 26th, 2001, 14:01
Originally posted by lastactionhero


Thanks el crapo! You don't speak crap after all :D

I DO NOT FIND THAT AMUSING!!! Take that back immediately before I report you to a mod!!

Note to Giancarlo: I'm just kidding. Don't take it seriously dude. But I have to admit, your attitude here is improving.

LastActionHero
July 26th, 2001, 14:07
uhh. I didn't get the tone of that post. Do you seriously want me to take that back?

el crapo
July 26th, 2001, 14:12
No. :)

LastActionHero
July 26th, 2001, 14:15
Good!

Thanks for the help anyways :)

el crapo
July 26th, 2001, 14:25
Your welcome :)

If I was serious would you have done it anyway?

LastActionHero
July 27th, 2001, 03:39
Yes I would have. But I would edited my post out. I wouldn't like to subtract one post from my post count ;) :D

coolblu
July 31st, 2001, 06:55
Originally posted by roblev
If you actually understood anything about HTML and my coding, then you would know how to bypass that script. If you had your script and mine put together, then it would be secure, but your script is terribly insecure. Take it from a guy with experience buddy!

i didn't say it was "Secure" I said it was a little more secure as those who right clicked where redirected to another URL. As for the HTML, I've been coding for over 2 years now, so I think I know something.

roblev
August 1st, 2001, 14:05
whatever.

niv
August 1st, 2001, 14:06
i think someone is adopting someone elses former attitude :rolleyes:

roblev
August 1st, 2001, 14:09
GC? ewe!

JonCooper
August 1st, 2001, 14:56
this whole thread is pointless

1. the right-click function is very usefull. eg I use it to open most links in a new window.

2. neither of the methods posted here stops a 'surfer' using the 'view ~ source' thats on the tool bar.

3. I know of no site anywhere that you can't see the code by typing

view-source:www.thesite.com/pageyouwanttosee.html

or something similar

of course, you'll always get the code as presented to the browser, ie it includes anything dynamically generated

lucifer
August 1st, 2001, 16:31
I agree you can make things harder to see but you can never stop people looking.

The harder it is the more of a challenge but I've always been able to look at anything I've wanted to. Sometimes It's taken a little time but It can always be done

meow
August 1st, 2001, 17:11
Yeah!:mad: This thread is totally uncool.:mad:

LastActionHero
August 2nd, 2001, 05:35
Originally posted by meow
Yeah!:mad: This thread is totally uncool.:mad:

Yeah because u posted in it :D

meow
August 2nd, 2001, 05:42
Disabling right click and full screen windows...I'm away for one night and look what happens! Uncoolness takes over! :mad:

lucifer
August 2nd, 2001, 05:50
lol

so you are to blame for it then :p

meow
August 2nd, 2001, 05:57
We are not amused. We consider to not post in this forum anymore. We will talk with Zeldman about this. You will hear from us. ~^-^~

LastActionHero
August 2nd, 2001, 06:00
Who or What the ---- is Zeldman?

lucifer
August 2nd, 2001, 06:28
great no more annoying pu55cat to contend with. I always feel like the posts round here have been sprayed. :p :D

meow
August 2nd, 2001, 06:33
:eek: Amazing, and slightly shocking. Who or What was a good question though. He's The All Time Web Guru. ALA, WASP, zeldman.com. He's everywhere. As most recent major achievement he fathered the &#70;&#117;&#99;&#107; Old Browsers Campaign.

LastActionHero
August 2nd, 2001, 06:44
I thought u said u wudn't post anymore :rolleyes:

meow
August 2nd, 2001, 06:50
I have a calling. When the Internet needs me I come. :cool:

lucifer
August 2nd, 2001, 06:57
Oh God,

you're not turning religious on us? :rolleyes:

meow
August 2nd, 2001, 07:27
I was bornwith this calling. My coolness was given to me by a coolness too great to understand. :o

jetalomar
August 2nd, 2001, 07:32
the code about the right click is cool, but people still can still your code. is there a way u can block the saves as from the file menu, if you can do that ur code will be secure and nobody will still them.

meow
August 2nd, 2001, 07:44
Heard of a little direcory in c:\windows called Temporary Internet Files? :p ;)

jetalomar
August 2nd, 2001, 07:46
What about theM?

meow
August 2nd, 2001, 07:56
It's there the files are when you see them. Just to pick'em up.

lucifer
August 2nd, 2001, 07:57
IT IS IMPOSSIBLE TO STOP PEOPLE STEALING YOUR SCORCE CODE UNLESS YOU DO NOT PUT IT ON THE INTERNET. IF PEOPLE CAN BROWSE IT THEY CAN LOOK AT THE CODE!!!!

meow
August 2nd, 2001, 08:06
And now you remember? :rolleyes:
It's true. Disabling menus only makes people (me :mad: ) pissed off and doesn't accomplish anything of what you want.

roblev
August 2nd, 2001, 08:11
the only secure way (which i have found) to secure your source code is to use Flash. There is a way in which i can set up flash so that it will only play if it was shown from my domain. If you tried it locally or on another domain. It would display an error and if you wanted crash the bastards comp.

lucifer
August 2nd, 2001, 09:36
Originally posted by roblev
the only secure way (which i have found) to secure your source code is to use Flash. There is a way in which i can set up flash so that it will only play if it was shown from my domain. If you tried it locally or on another domain. It would display an error and if you wanted crash the bastards comp. I'd just fake my HTTP_REFERER headers :D

roblev
August 2nd, 2001, 12:03
it is not that simple (from what i rememebr)

lucifer
August 2nd, 2001, 12:46
I'm sure there are flash decompilers around anyhow. Things are only secure if they stay on your server.

jetalomar
August 2nd, 2001, 14:08
what's ur website url, i guarantee you that i can get it to work. if you can disable the menu like file, edit view etc then ur code will be secure otherwise it won't be secure unless it's php, cgi, or asp etc code beside than html.

Dusty
August 2nd, 2001, 15:48
What the hell is so important about this page that you're willing to disable virtually the entire browser just so they can't look at the HTML? Here's a clue: nobody cares. The best protection for your files, short of not uploading them (even that's not foolproof, if you want to be absolutely secure you should never even make them), is realizing that if someone wants something bad enough, they'll get it, no matter what you do to prevent them, and the average person just doesn't give a damn and wouldn't take your HTML if you shoved it down their throats.

Let's just assume you did disable all the menus (how, by the way?). To get the source, all I'd have to do is press Ctrl+U. Disabled the shortcut keys? I'd just precede the URL with "view-source:" or, heaven forbid, just turn off JavaScript. Disabled "view-source:" (again, how?)? I'd just go to about:cache, your site would be there. There is no way to hide your HTML because for the browser to render it you've got to send it, and if you send it the browser'll show it.

No menus, no shortcuts, no contextual menu, full-screen... I assume to leave your visitors would have to restart their computers? You don't have to worry about HTML theft, once a visitor sees your site once, they'll never go back.

It's not that hard to fake a referrer.

meow
August 3rd, 2001, 03:50
Go Dusty! Go!
:D :D
I want to add that it aslo looks amateurish. :)

roblev
August 3rd, 2001, 10:04
haven't you forgot about the coding to make your page NOT cache in on users computer, and to also EXPIRE when the user wants it to? or am i wrong?