PDA

View Full Version : No View Source Script



Timilon
July 5th, 2003, 16:59
is there a script in any language that can keep people from viewing your source, not a no right click script but 1 that completely hides it maybe like the one at sinz.net <-- may contain porn but in the view source it says

<!--- Begin IP Tracker Logging ---


IP Tracker Copyright 2001-2002 by webmaster@sinz.net

STEALING html, codes, graphics, etc. is not cool with me.

All violaters will be prosecuted to the full extent of the law.

Your IP address has been recorded and sent to me.


--- End IP Tracker Logging --->

keith
July 5th, 2003, 17:38
uh, you can view their source code fine. just scroll down a bit, all they did was hold down the enter key for a few seconds and skip a bunch of lines.

by the way, keeping people from viewing your source html is impossible.

OZzYUK
July 5th, 2003, 23:22
STEP 1 - NO RIGHT CLICK ON THE I.E MENU (I.E 6 OR ABOVE)


Open Notepad, insert this code into it:

menuItems = new Array();
menuItemNum = 0;

function addMenuItem(text, url, img){
if(img) menuItems[menuItemNum] = new Array(text, url, img);
else if(text) menuItems[menuItemNum] = new Array(text, url);
else menuItems[menuItemNum] = new Array();
menuItemNum++;
}

menuWidth = 1; //menu width
menuHeight = 1; //menu height
menuDelay = 50; //delay before menu appears
menuSpeed = 8; //speed which menu appears (lower=faster)
menuOffset = 2; //offset of menu from mouse pointer


addMenuItem("","","");
addMenuItem("","","");
addMenuItem();
addMenuItem("","","");

//--------------------------------------------------------------------------------------------

if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVe rsion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 5.5)
isIe = 1;
else
isIe = 0;

if(isIe){
menuContent = '<tr height="1"><td style="background:threedlightshadow" colspan="4"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight" colspan="2"></td><td style="background:threeddarkshadow"></td></tr><tr height="10"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"><table cellspacing="0" cellpadding="0" nowrap style="font:menu;color:menutext;cursor:hand;">';
for(m=0;m<menuItems.length;m++){
if(menuItems[m][0] && menuItems[m][2])
menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highl ighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menu text\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap><img src="' + menuItems[m][2] + '"></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
else if(menuItems[m][0])
menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highl ighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menu text\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
else
menuContent += '<tr><td colspan="5" height="4"></td></tr><tr><td colspan="5"><table cellspacing="0"><tr><td width="2" height="1"></td><td width="0" height="1" style="background:threedshadow"></td><td width="2" height="1"></td></tr><tr><td width="2" height="1"></td><td width="100%" height="1" style="background:threedhighlight"></td><td width="2" height="1"></td></tr></table></td></tr><tr><td colspan="5" height="3"></td></tr>';
}
menuContent += '</table></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedshadow" colspan="3"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threeddarkshadow" colspan="5"></td></tr></table>';

menuPopup = window.createPopup();
menuPopup.document.body.innerHTML = menuContent;
}

function showMenu(){
menuXPos = event.clientX + menuOffset;
menuYPos = event.clientY + menuOffset;

menuXIncrement = menuWidth / menuSpeed;
menuYIncrement = menuHeight / menuSpeed;

menuTimer = setTimeout("openMenu(0,0)", menuDelay);

return false;
}

function openMenu(height, width){
iHeight = height;
iWidth = width;

menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body);

if(iHeight < menuHeight)
menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1);
else
clearTimeout(menuTimer);
}

if(isIe) document.oncontextmenu = showMenu;


//---------------------------------------------------------

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}



then save that as NORIGHTCLICK.js, and upload it to your webspace, in each webpage that you have, put this code in between the head tags:

<script src="NORIGHTCLICK.js" language="Javascript"></script>


.....and once the user has tried to right click the screen and nothing comes up, they will try getting the source from the view source in the menu and it won't work. Any problems, contact me viz my site: http://www.vizzo.org/ .

OZzYUK
July 5th, 2003, 23:26
STEP 2 - NO RIGHT CLICK ON YOUR PAGE


(DO NOT INCLUDE THIS WITH THE CODE ABOVE, OR IT WILL NOT WORK AND PEOPLE WILL BE EASILY STEALING THINGS FROM YOUR SOURCE CODE!)


Put this in the head tags:-


<script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
//-->
</script>



Any problems - E-mail me via: www.vizzo.org/

kabatak
July 6th, 2003, 07:15
OZzYUK is the script suppose to disable view source in the menu? i cant right click but im still able to view source from top menu.

keith
July 6th, 2003, 12:03
like i said, it's impossible to keep visitors from viewing your html. nothing to worry about anyhow, it's just html man. if you don't want people looking at your source code, don't upload a website.

OZzYUK
July 6th, 2003, 12:37
a very good and vaild point there, but hoever, if some of us do have websites we would like to keep all our hard work away from people who might want to copy it.

OZzYUK
July 6th, 2003, 12:40
please excuse my typing errors

Loon
July 6th, 2003, 13:06
Like was already mentioned, you can't totally hide your source code from anybody that really wants to view it.

In order for you to be ale to see a web page, your browser has to be able to read the source, sure you can use a few different things to make it a little more difficult for people but you can't hide the source.

OZzYUK i can view the source of your site just fine :)

mlowery
July 7th, 2003, 11:10
Try putiting the <invisible> tag at the beginning and end of your code.

kabatak
July 7th, 2003, 11:30
that works! thanks

dawizman
July 7th, 2003, 11:46
It doesnt sem to work. Can you post an example of where to put <invisible>

Loon
July 7th, 2003, 11:50
lol :D

Canuckkev
July 7th, 2003, 12:17
Haha...this makes me think my script I made that puts a bit of JS code on a site, and when copied and left in the source, will tell the original site creator, is a good idea.

Unless...okay, here is a way to completely hide your html source. Create the page, and don't upload it. Instead, browse it locally, and take a screen capture of the site. Then just upload the image!

keith
July 7th, 2003, 22:24
yeah, make your whole website's layout and content one big image map.

wait a sec, you'll still need a no-view-source javascript anyhow to hide the coordinates you've mapped and the <img> tag you've created! well i guess that won't work.

Aquatix
July 9th, 2003, 05:00
It doesnt sem to work. Can you post an example of where to put <invisible>

LMAO! I was just about to suggest putting <nosource></nosource> around your HTML. :p

Canuckkev
July 9th, 2003, 12:18
Originally posted by keith
yeah, make your whole website's layout and content one big image map.

wait a sec, you'll still need a no-view-source javascript anyhow to hide the coordinates you've mapped and the <img> tag you've created! well i guess that won't work.

Yes, but on the plus side, no one would want to copy it!

Abush
July 9th, 2003, 16:44
there is a script that scrambles the html of your site when it is viewed but it will display it the way you want it I think I saw it in hotscripts.com or download.com anways just search for "html scrambler" or sumtin like that and am sure you'll find one. Oh but I never used this before so I don't know if it works or not.

Dean
July 12th, 2003, 03:01
How about using Flash?

Master_tee
July 19th, 2003, 02:41
Keeping people from copying your HTML will never work lol, somone will always find a way around it :(

OriginXT
August 12th, 2003, 20:34
http://www.phprulez.3kd.net/?encrypter

that might help *blink*

gamew0rld
August 12th, 2003, 21:40
Even if you were able to stop right click (a lot of the times the no right click script can be bypassed by holding the left mouse button and then right clicking) and prevent people from going to View>Source, people could easily set up a temporary link to your site on their site, right click the link, click 'Save Target As', and then save your code to their hard drive. The only way to prevent things from being stolen is to not put them on the web

OriginXT
December 24th, 2006, 01:57
http://www.phprulez.3kd.net/?encrypter

that might help *blink*
I guess the link won't work anymore

Keagle
December 29th, 2006, 19:12
Really old thread,

But: Just put a comment in your site saying, "You may use this source to *learn* from it, please do not copy it exactly". After all, I learnt HTML partly by looking at peoples sites, seeing how they fit together, and wallah, replicated it for what I wanted.

ihostdev
December 30th, 2006, 20:39
this is free and will work i think http://www.ioncube.com/html_encoder.php

webadpro
January 1st, 2007, 17:55
There's one way, do it with FLASH!