Skip to content

Instantly share code, notes, and snippets.

@karlcow
Created May 22, 2014 22:27
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save karlcow/f694f876641bb47676e0 to your computer and use it in GitHub Desktop.
Save karlcow/f694f876641bb47676e0 to your computer and use it in GitHub Desktop.
People trying to put copy protection on their content.
<!-- WP Content Copy Protection script by Rynaldo Stoltz Starts - http://securiilock.com -->
<div align="center"><noscript>
<div style="position:fixed; top:0px; left:0px; z-index:3000; height:100%; width:100%; background-color:#FFFFFF">
<div style="font-family: Tahoma; font-size: 14px; background-color:#FFF000; padding: 10pt;">Please enable your Javascript to see this page as it is meant to appear!</div></div>
</noscript></div>
<script type="text/javascript">
window.onload = function() {
disableSelection(document.body)
}
function disableSelection(target){
if (typeof target.onselectstart!="undefined")
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined")
target.style.MozUserSelect="none"
else
target.onmousedown=function() {return false}
target.style.cursor = "default"
}
</script>
<script type="text/javascript">
function mousedwn(e) {
try { if (event.button == 2||event.button == 3) return false; }
catch (e) { if (e.which == 3) return false; }
}
document.oncontextmenu = function() { return false; }
document.ondragstart = function() { return false; }
document.onmousedown = mousedwn;
</script>
<style type="text/css">
* : (input, textarea) {
-webkit-touch-callout: none;
-webkit-user-select: none;
}
</style>
<style type="text/css">
img {
-webkit-touch-callout: none;
-webkit-user-select: none;
}
</style>
<script type="text/javascript">
window.addEventListener("keydown",function (e) {
if (e.ctrlKey && (e.which == 65 || e.which == 66 || e.which == 67 || e.which == 80 || e.which == 83 || e.which == 85)) {
e.preventDefault();
}
})
document.keypress = function(e) {
if (e.ctrlKey && (e.which == 65 || e.which == 66 || e.which == 67 || e.which == 80 || e.which == 83 || e.which == 85)) {
}
return false;
};
</script>
<script type="text/javascript">
document.onkeydown = function (event) {
event = (event || window.event);
if (event.keyCode == 123 || event.keyCode == 18)
{
return false;
}
}
</script>
<!-- WP Content Copy Protection script by Rynaldo Stoltz Ends - http://securiilock.com -->
@Tyler-H
Copy link

Tyler-H commented Nov 12, 2015

Just came across a site with this script today... talk about harming the web

@sippylabs
Copy link

That web address just takes you to spamland now.

@stanwmusic
Copy link

stanwmusic commented May 30, 2016

I just came across this script on a site, or a Very similar script .

There is only see a Blank page with an alert when I turned Javascript off. I wanted to see for sure if it was a Wordpress site because I'd never seen a very similar theme before, it was.
The link goes to a site ( ooplugins dot com) that has this script as a plugin, and sells usage licenses. It is a proprietary plugin , So I did not copy their code. Like I'd want to! :) Although ... it could possibly be useful for some business niches perhaps such as media content protection (photos) from the average web surfer, maybe.. But I'd much rather only display heavily watermarked images or something.

No Javascript, No website at All !

@McCauliflower
Copy link

McCauliflower commented Jul 7, 2016

A plugin needs to be built very soon to counter-act this kind of script..ridiculous!
FYI It can be disabled on a per page basic by blocking all javascript, then going into your inspector and deleting the css below (which is blocking the display of the page)

div style="position:fixed; top:0px; left:0px; z-index:3000; height:100%; width:100%; background-color:#FFFFFF">
div style="font-family: Tahoma; font-size: 14px; background-color:#FFF000; padding: 10pt;">Please enable your Javascript to see this page as it is meant to appear!

@predavlad
Copy link

On Chrome you can bypass this easily. Settings -> More tools -> Developer tools.

Copy link

ghost commented Feb 9, 2018

not everyone knows this. F12 is the shortcut in most browsers to activate developer mode.

@zoolbia
Copy link

zoolbia commented Jun 3, 2018

what happened to Rynaldo Stoltz from YOOPlugins???

@AzureCrimson
Copy link

AzureCrimson commented May 7, 2019

I found a similar version on https://www.officetally.com/. Here's a list of "features" in the "improved" version:

  1. Creates a div to cover the page if javascript is disabled
  2. Disables text selection
  3. Disables the right click context menu (unless you're right clicking on an anchor tag, how benevolent of them)
  4. Disables drag and drop
  5. Disables iOS text selection/touch+hold menu
  6. Disables the {a,b,c,f,i,p,s,u,v} keys if the {Ctrl,Meta} key is pressed (including Ctrl+Shift+I)
  7. Disables the F12 and Alt keys

Absolutely ridiculous, it turned a quick Ctrl+f search into 5 minutes of using dev tools to bypass the checks.

@aghontpi
Copy link

aghontpi commented May 4, 2020

@AzureCrimson, the source is here script.js

@spacecabbie
Copy link

spacecabbie commented Nov 15, 2020

I found a similar version on https://www.officetally.com/. Here's a list of "features" in the "improved" version:

  1. Creates a div to cover the page if javascript is disabled
  2. Disables text selection
  3. Disables the right click context menu (unless you're right clicking on an anchor tag, how benevolent of them)
  4. Disables drag and drop
  5. Disables iOS text selection/touch+hold menu
  6. Disables the {a,b,c,f,i,p,s,u,v} keys if the {Ctrl,Meta} key is pressed (including Ctrl+Shift+I)
  7. Disables the F12 and Alt keys

Absolutely ridiculous, it turned a quick Ctrl+f search into 5 minutes of using dev tools to bypass the checks.
Brilliant just what I was looking for.

@AzureCrimson, the source is here script.js
Thank you !

ps.
I do not understand the issue if you want to protect your contend I have a client who used it. Of course nothing is foolproof but you can make it harder for them. Besides, if you encounter this script and bypass it means your trying to copy something you shouldn't...

@karlcow
Copy link
Author

karlcow commented Nov 15, 2020

@spacecabbie Protect the content from what. What do you prevent by protecting?

The people who would supposedly trying to make money from a content on another webpage knows how to bypass these pseudo-protection And the people who just want
to share the information, hence making the site/the brand/etc more known are having a bad user experience.

@spacecabbie
Copy link

@spacecabbie Protect the content from what. What do you prevent by protecting?

In this case an exam training site to prefer for the examn

The people who would supposedly trying to make money from a content on another webpage knows how to bypass these pseudo-protection And the people who just want
to share the information, hence making the site/the brand/etc more known are having a bad user experience.

It's not for us to decide if someone else should do it or not....
Also yes they might bypass it of course but then your courtcase just became 100% solid where they could have said We din';t know etc etc. (judges in holland are pussy's)

@karlcow
Copy link
Author

karlcow commented Nov 19, 2020

screenshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment