- Impact
- 1
Ok, here is what you do for the best possible defense against annoying source stealers -
First, add this to the page you want to protect or link your files to an external JS file:
<SCRIPT LANGUAGE="JavaScript">
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
if (self.location == top.location)
{
top.location.replace("index.htm");
}
//-->
</SCRIPT>
After you have that, put your pages in a frames page (if you are worried people won't support frams then you are outta luck), and that will stop basic stealers.
There are still ways to view the source so, to stop that - 2 more steps.
To stop newbs put this at the top of every page or write it in with a server side script:
<!--------------------------------->
<!--------------------------------->
<!-- Information Secure -->
<!--------------------------------->
<!--------------------------------->
[ Add 2600 Enter Keys here]
Most people will close the window at first glance because on any resolution, the scrollbar is the smallest it goes.
And, for the final precaution, submit the sensitive part of your source code to the form in the following page.
http://www.angelfire.com/ny5/consigliere/encrypter.html
Happy Programming!
P.S this way is not foolproof, since data is stored on the clients computer in the temporary internet files folder, there is no true way to save your source code.
First, add this to the page you want to protect or link your files to an external JS file:
<SCRIPT LANGUAGE="JavaScript">
<!--
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
if (self.location == top.location)
{
top.location.replace("index.htm");
}
//-->
</SCRIPT>
After you have that, put your pages in a frames page (if you are worried people won't support frams then you are outta luck), and that will stop basic stealers.
There are still ways to view the source so, to stop that - 2 more steps.
To stop newbs put this at the top of every page or write it in with a server side script:
<!--------------------------------->
<!--------------------------------->
<!-- Information Secure -->
<!--------------------------------->
<!--------------------------------->
[ Add 2600 Enter Keys here]
Most people will close the window at first glance because on any resolution, the scrollbar is the smallest it goes.
And, for the final precaution, submit the sensitive part of your source code to the form in the following page.
http://www.angelfire.com/ny5/consigliere/encrypter.html
Happy Programming!
P.S this way is not foolproof, since data is stored on the clients computer in the temporary internet files folder, there is no true way to save your source code.