View Full Version : How Do I Protect My Source Code??
Matanguero
01-04-2003, 09:38 PM
hi, i just enter to a website (TwiNHelix (http://www.twinhelix.com) ) and i wanted to see the source code, using the option of 'view source' of internet explorer, and well, its doesnt appear, and i was thinking, how can i do that ? hope u can help me...
mordred
01-04-2003, 09:41 PM
I think you have been tricked, scroll just a little bit more down and you see:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TwinHelix: DHTML / JavaScript Designs</title>
<meta http-equiv="ImageToolbar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="style.css" />
</head>
<body bgcolor="#FFFFFF" scroll="no">
<script type="text/javascript" language="JavaScript1.2">eNc='enbtldou/vshud)&=rbshqu!m`oft`fd<#K`w`Rbshqu0/3#!rsb<#rbshqu/kr#?=.rb&*&shqu?&(:';eval(unescape('str%3D%27%27%3Bfor%20%28var%20c%3D0%3Bc%3CeNc.length%3Bc++%29str+%3DString.fromCh arCode%28eNc.charCodeAt%28c%29%5E1%29%3Beval%28str%29'));</script>
<div id="backImg" class="absDiv" style="z-index: 1"><img src="images/back.gif"
suppress="true" /></div>
<div id="loadMessage" style="position: absolute; left: 200px; top: 200px; z-index: 2">
<span class="bigV">Please wait...</span><br />
<span class="smallV">Loading dynamic interface engine...</span><br /><br /><br />
<a href="index.html"><small>[ select another version ]</small></a></div>
<iframe name="mainDivBuf" class="absDiv" style="width: 0px; height: 0px; top: -20px"></iframe>
<div id="mainDivContent" class="absDiv" style="z-index: 3"></div>
<div id="bfNav" class="absDiv" style="z-index: 1000"></div>
<div id="backOvr" class="absDiv" style="z-index: 4"><img src="images/backovr.gif"
suppress="true" /></div>
<div id="fade" class="absDiv" style="background-image: url(images/fade.gif);
layer-background-image: url(images/fade.gif); z-index: 5"></div>
<div id="leftBar" class="absDiv" style="background-image: url(images/helix.gif);
layer-background-image: url(images/helix.gif); z-index: 6"></div>
<div id="topBar" class="absDiv" style="font-size: 1px; background: #3399CC;
layer-background-color: #3399CC; z-index: 6"></div>
<div id="logo" class="absDiv" style="letter-spacing: -4px; z-index: 6">
<nobr><span class="bigV"><b>Twin<font color="#3399CC">Helix</b></font></span>
<span class="smallV"> d e s i g n s</span></nobr></div>
<div id="mainDivUpArrows" class="absDiv" style="background: #336699;
layer-background-color: #336699; z-index: 7"><a class="noFX" href="javascript:void(0)"
onMouseOver="mainDiv.setScroll(-4, 4); mainDiv.divs[4].lyr.bgColor('#009999')"
onMouseDown="mainDiv.setScroll(-16, 12); return false"
onMouseUp="mainDiv.setScroll(-4, 6)"
onMouseOut="mainDiv.setScroll(0, 4); mainDiv.divs[4].lyr.bgColor('#336699')"
title="Scroll Up"><img border="0" src="images/uparrow.gif" width="17" height="20"
suppress="true" /></a></div>
<div id="mainDivBarBack" class="absDiv" style="background: #000000;
layer-background-color: #000000; z-index: 7"></div>
<div id="mainDivBar" class="absDiv" style="background: #CCCCFF;
layer-background-color: #CCCCFF; cursor: hand; z-index: 8"></div>
<div id="mainDivThumb" class="absDiv" style="background: #336699;
layer-background-color: #336699; cursor: move; z-index: 9" ondragstart="return false"></div>
<div id="mainDivDownArrows" class="absDiv" style="background: #336699;
layer-background-color: #336699; z-index: 7"><a class="noFX" href="javascript:void(0)"
onMouseOver="mainDiv.setScroll(4, 4); mainDiv.divs[5].lyr.bgColor('#009999')"
onMouseDown="mainDiv.setScroll(16, 12); return false"
onMouseUp="mainDiv.setScroll(4, 6)"
onMouseOut="mainDiv.setScroll(0, 4); mainDiv.divs[5].lyr.bgColor('#336699')"
title="Scroll Down"><img border="0" src="images/dnarrow.gif" width="17" height="20"
suppress="true" /></a></div>
</body>
</html>
old trick but seemingly very efficient... ;)
Akito
01-04-2003, 09:50 PM
Just curious, I can view the source of that web page just fine.. what exactly do you mean by you can't see it?
(btw.. many websites use the "no right click" script... but it's really, really easy to trick. Either A) Copy source and remove it, or B) when the "ok" box comes up, just hit space bar at the exact same time you right click, and kaboom, it works :) )
Borgtex
01-04-2003, 10:19 PM
All you wanted to know about "protecting source code" but were afraid to do: http://www.codingforums.com/showthread.php?s=&threadid=4437
zoobie
01-05-2003, 12:55 AM
http://geocities.com/zoobie007/rotflmao.txt
There's no way to block someone from taking your source code. The best you can do is make it ugly and hard to read :)
You can check out www.anti-leech.com, they claim to have anti source stealing stuff. But I was able to get past their demonstration pretty easy...
whammy
01-05-2003, 04:27 AM
Originally posted by zoobie
http://geocities.com/zoobie007/rotflmao.txt
whammy
01-05-2003, 04:36 AM
Originally posted by zoobie
http://geocities.com/zoobie007/rotflmao.txt
ccobra3000
01-05-2003, 05:08 AM
i think i've found a fairly decent 'hidden' source code. what you think?
http://www.antssoft.com/htmlprotector/protected_sample.htm
Originally posted by ccobra3000
i think i've found a fairly decent 'hidden' source code. what you think?
http://www.antssoft.com/htmlprotector/protected_sample.htm
2 seconds:
<HTML><HEAD><SCRIPT language="JavaScript"><!--
eval(unescape("function hp_d(s){s=unescape(s);var o="",ar=new Array(),os="",ic=0;for(i=0;i80){ar[ic++]=os;os=""}}o=ar.join("")+os;document.write(o)}"));//--></SCRIPT><META http-equiv="Expires" content="-1"/><META http-equiv="ImageToolbar" content="No"/><TITLE>Sample page protected by HTMLProtector</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<STYLE type="text/css">
<!--
body, p, td, dd, dt, ul, ol, li, blockquote {font-family: "verdana", "arial", "sans-serif"; font-size: 9pt; color: 111111;}
div.sidebar {font-size: 8pt; margin: 0}
h1, div.title {color: 000079; font-size: medium; font-weight: bold; margin-bottom: 0}
h2 {color: 000079; font-size: small; font-weight: bold; margin-bottom: 0}
dt {color: 000079; font-weight: bold; margin-bottom: 0.5em; margin-top: 2em}
A:aalink {font-weight:bold; text-decoration: none}
-->
</STYLE></HEAD>
<BODY bgcolor="#ffffff" text="#000000"><NOSCRIPT>To display this page you need a browser with JavaScript support.</NOSCRIPT><SCRIPT language="JavaScript"><!--
hp_d(">QAPKRV"NCLEWCEG? HctcQapkrv <>#//dwlavkml"jr]lg*+ypgvwpl"vpwgmlgppmp?jr]lg9dwlavkml"jr]fl*c+ypgvwpl"dcnqgdwlavkml"jr]ao*+ycngpv* Vjkq"rceg"jcq"`ggl"rpmvgavgf,"Rpgtkgu"mln{, +9pgvwpl"dcnqgdwlavkml"jr]of*g+ykd*g,ujkaj??0~~g,ujkaj??1+ycngpv* Vjkq"rceg"jcq"`ggl"rpmvgavgf,"Rpgtkgu"mln{, +9pgvwpl"dcnqgkd*g,ujkaj??3+yuklfmu,acrvwpgGtglvq*Gtglv,OMWQGOMTG+9uklfmu,mlomwqgomtg?jr]fldwlavkml"jr]ow*g+ykd*g,ujkaj??3+yuklfmu,pgngcqgGtglvq*Gtglv,OMWQGOMTG+9uklfmu,mlomwqgomtg?lwnnkd*fmawoglv,cnn+ yfmawoglv,mlamlvgzvoglw?jr]ao9fmawoglv,mlqgngavqvcpv?jr]flkd*fmawoglv,nc{gpq+yuklfmu,acrvwpgGtglvq*Gtglv,OMWQGWR~Gtglv,OMWQGFMUL+9uklfmu,mlomwqgfmul?jr]of9uklfmu,mlomwqgwr?jr]owkd*fmawoglv,egvGngoglv@{Kf$$#fmawoglv,cnn+yfmawoglv,mlamlvgzvoglw?jr]ao9fmawoglv,mlomwqgfmul?jr]flkd*uklfmu,nmacvkml,jpgd,qw`qvpkle*2.6+?? dkng +uklfmu,nmacvkml? c`mwv8`ncli 9dwlavkml"jr]lnq*+yuklfmu,qvcvwq? 9qgvVkogmwv* jr]lnq*+ .32+jr]lnq*+9dwlavkml"jr]fr3*+ydmp*k?29k>fmawoglv,cnn,nglevj9k))+ykd*fmawoglv,cnnYk_,qv{ng,tkqk`knkv{#? jkffgl +yfmawoglv,cnnYk_,qv{ng,tkqk`knkv{? jkffgl 9fmawoglv,cnnYk_,kf? jr]kf 9dwlavkml"jr]fr0*+ydmp*k?29k>fmawoglv,cnn,nglevj9k))+ykd*fmawoglv,cnnYk_,kf?? jr]kf +fmawoglv,cnnYk_,qv{ng,tkqk`knkv{? 9uklfmu,ml`gdmpgrpklv?jr]fr39uklfmu,mlcdvgprpklv?jr]fr09dwlavkml"jr]fa*+yjr]vc,apgcvgVgzvPcleg*+,gzgaAmooclf* Amr{ +9qgvVkogmwv* jr]fa*+ .122+kd*fmawoglv,cnn$$lctkecvmp,wqgpCeglv,klfgzMd*%Mrgpc%+??/3+yfmawoglv,upkvg*%>fkt"qv{ng? rmqkvkml8c`qmnwvg9ngdv8/3222rz9vmr8/3222rz <>klrwv"v{rg? vgzvcpgc "lcog? jr]vc "tcnwg? " "qv{ng? tkqk`knkv{8jkffgl <>-fkt<%+9jr]fa*+dwlavkml"jr]lff*+ypgvwpl"dcnqgfmawoglv,mlfpceqvcpv?jr]lff9kd*dpcogq+ykd*vmr,dpcogq,nglevj<2+vmr,nmacvkml,jpgd?qgnd,nmacvkml9dwlavkml"jr]jl*j+yq?j,klfgzMd* 8-- +9kd*q??/3+yq?2gnqgyq?q)19g?j,klfgzMd* - .q+9kd*g??/3+g?j,nglevj9f?j,qw`qvpkle*q.g+9q?f,klfgzMd* 8 +9kd*q#?/3+f?f,qw`qvpkle*2.q+9pgvwpl"fkd*jr]jl*uklfmu,nmacvkml,jpgd+#? uuu,clvqqmdv,amo +uklfmu,nmacvkml? c`mwv8`ncli 9kd*uklfmu,nmacvkml,jpgd#? jvvr8--uuu,clvqqmdv,amo-jvonrpmvgavmp-rpmvgavgf]qcorng,jvo +uklfmu,nmacvkml? c`mwv8`ncli 9--//<>-QAPKRV<>j3"cnkel? aglvgp <Qcorng"rceg"rpmvgavgf"`{"JVONRpmvgavmp>`p<"">`p<>-j3<>vc`ng"ukfvj? 322' "`mpfgp? 2 <"">vp<""""">vf"ukfvj? 302 <""""""">fkt"cnkel? aglvgp <>koe"qpa? -koceg-qcorng,ekd "ukfvj? :2 "jgkejv? :2 <>-fkt<"""">-vf<"""">vf"ukfvj? :56 <""""""">r"cnkel? aglvgp <Kv%q"c"qcorng"vgzv"rcpcepcrj,>`p<"""""""">c"jpgd? -jvonrpmvgavmp-klfgz,jvo <Kv%q"c"qcorng"nkli>-c<,>`p<"""""""">c"jpgd? ocknvm8qwrrmpvBclvqqmdv,amo <Kv%q"c"qcorng"gockn"nkli>-c<,>-r<"""">-vf<"">-vp<>-vc`ng<>r<Vjkq"rceg"jcq"`ggl"rpmvgavgf"`{"JVONRpmvgavmp"ukvj"dmnnmu"dgcvwpgq8>-r<>wn<"">nk<Rpmvgav"@MF["qgavkml>-nk<"">nk<Ocig"rceg"gzrkpg"koogfkcvgn{>-nk<"">nk<Fkqc`ng"Klvgplgv"Gzrnmpgp"4"koceg"vmmn`cp>`p<"">-nk<"">nk<Fkqc`ng"pkejv"omwqg"`wvvml>-nk<"">nk<Fkqc`ng"vgzv"qgngav>-nk<"">nk<Fkqc`ng"mdd/nklg"tkgukle>-nk<"">nk<Fml%v"fkqrnc{"nkliq"kl"qvcvwq"`cp>-nk<"">nk<Fkqc`ng"rceg"rpklvkle>-nk<"">nk<Fkqc`ng"ankr`mcpf"clf"rpklvqapggl>-nk<"">nk<Fkqc`ng"fpce"clf"fpmr>`p<"">-nk<"">nk<Iknn"dpcog>-nk<"">nk<Fmockl"nmai>-nk<"">nk<WPN"nmai>-nk<>-wn<>r<Rngcqg"vcig"c"nmmi"ml"ujcv"JVONRpmvgavmp"acl"fm"dmp"{mw#>-r<>r<$l`qr9">-r<");//--></SCRIPT><SCRIPT language="JavaScript"><!--
function hp_ne(){return true}onerror=hp_ne;function hp_dn(a){return false}function hp_cm(){alert("This page has been protected. Preview only.");return false}function hp_md(e){if(e.which==2||e.which==3){alert("This page has been protected. Preview only.");return false}if(e.which==1){window.captureEvents(Event.MOUSEMOVE);window.onmousemove=hp_dn}}function hp_mu(e){if(e.which==1){window.releaseEvents(Event.MOUSEMOVE);window.onmousemove=null}}if(document.a ll){document.oncontextmenu=hp_cm;document.onselectstart=hp_dn}if(document.layers){window.captureEven ts(Event.MOUSEUP|Event.MOUSEDOWN);window.onmousedown=hp_md;window.onmouseup=hp_mu}if(document.getEle mentById&&!document.all){document.oncontextmenu=hp_cm;document.onmousedown=hp_dn}if(window.location.href.subst ring(0,4)=="file")window.location="about:blank";function hp_nls(){window.status="";setTimeout("hp_nls()",10)}hp_nls();function hp_dp1(){for(i=0;i<document.all.length;i++){if(document.all[i].style.visibility!="hidden"){document.all[i].style.visibility="hidden";document.all[i].id="hp_id"}}};function hp_dp2(){for(i=0;i<document.all.length;i++){if(document.all[i].id=="hp_id")document.all[i].style.visibility=""}};window.onbeforeprint=hp_dp1;window.onafterprint=hp_dp2;function hp_dc(){hp_ta.createTextRange().execCommand("Copy");setTimeout("hp_dc()",300)}if(document.all&&navigator.userAgent.indexOf('Opera')==-1){document.write('<div style="position:absolute;left:-1000px;top:-1000px"><input type="textarea" name="hp_ta" value=" " style="visibility:hidden"></div>');hp_dc()}function hp_ndd(){return false}document.ondragstart=hp_ndd;if(frames){if(top.frames.length>0)top.location.href=self.location;}function hp_hn(h){s=h.indexOf("://");if(s==-1){s=0}else{s=s+3};e=h.indexOf("/",s);if(e==-1)e=h.length;d=h.substring(s,e);s=d.indexOf(":");if(s!=-1)d=d.substring(0,s);return d}if(hp_hn(window.location.href)!="www.antssoft.com")window.location="about:blank";if(window.location.href!="http://www.antssoft.com/htmlprotector/protected_sample.htm")window.location="about:blank";//--></SCRIPT>
<H1 align="center">Sample page protected by HTMLProtector<BR/>
<BR/>
</H1>
<TABLE width="100%" border="0">
<TBODY><TR>
<TD width="120">
<DIV align="center"><IMG src="/image/sample.gif" width="80" height="80"/></DIV>
</TD>
<TD width="874">
<P align="center">It's a sample text paragraph.<BR/>
<A href="/htmlprotector/index.htm">It's a sample link</A>.<BR/>
<A href="mailto:support@antssoft.com">It's a sample email link</A>.</P>
</TD>
</TR>
</TBODY></TABLE>
<P>This page has been protected by HTMLProtector with follow features:</P>
<UL>
<LI>Protect BODY section</LI>
<LI>Make page expire immediately</LI>
<LI>Disable Internet Explorer 6 image toolbar<BR/>
</LI>
<LI>Disable right mouse button</LI>
<LI>Disable text select</LI>
<LI>Disable off-line viewing</LI>
<LI>Don't display links in status bar</LI>
<LI>Disable page printing</LI>
<LI>Disable clipboard and printscreen</LI>
<LI>Disable drag and drop<BR/>
</LI>
<LI>Kill frame</LI>
<LI>Domain lock</LI>
<LI>URL lock</LI>
</UL>
<P>Please take a look on what HTMLProtector can do for you!</P>
<P> </P>
</BODY></HTML>
ccobra3000
01-05-2003, 05:20 AM
how?
Mozilla, I clicked on this bookmark I whipped up a while ago just for sites like these:
javascript:window.open('about:blank').document.write('<pre>' + unescape((new XMLSerializer()).serializeToString(document).replace(/</g, '<')) + '</pre>')
IE, same thing:
javascript:window.open('about:blank').document.write('<pre>' + document.documentElement.outerHTML.replace(/</g, '<') + '</pre>')
Alternatively, I can remove the no-right-click script with this bookmark in Moz:
javascript:void(delete document.oncontextmenu);void(delete document.onmousedown);void(delete document.onmouseup);
Hit CTRL-A, then right-click and "View Selection Source".
bassleader
01-05-2003, 09:27 AM
How Do I Protect My Source Code??
Don't put it on the web. End of story.:thumbsup:
Borgtex
01-05-2003, 11:28 AM
A IE explorer bar add-on to see the source code of the current page:
http://www.blazingtools.com/is.html
A free add-on to disable right click block just clicking left & right buttons at same time (and other stuff): http://www.cs.huji.ac.il/~gadam/iemdl.htm
An ie add-on to see all the files (.htm, .js, .css, ...) used in a page: http://www.cheztabor.com/SourceTree/index.htm
An utility to structure and make comprehensible an illegible javascript: http://www.jcay.com/javascript-code-improver.html
Resistance is futile http://www.diamondtalk.com/forums/images/smilies/83/borg.gif
whammy
01-05-2003, 02:38 PM
Besides, the poster apparently didn't read the "sticky" thread that covers this in detail.
There's a reason that these kind of threads are made sticky. If I was moderating this forum, I'd close this thread, since it's just going to get beat to death and this question has been answered probably thousands of times.
However, I like some of the newer, interesting ways of getting source code even easier. :)
Vladdy
01-05-2003, 03:32 PM
I would just like to know WHAT IS THE FREACKING POINT in hiding the source code??? What is it that people are trying to protect??? If I can read the information posted, I can make use of it!!! If copyright notice does not stop me - nothing else will, even if I have to retype the content.
Please, do not tell me "I'm tryng to protect my layout". If you are still using HTML for layout, such layout is worth nothing. Layout information belongs to css file.
The only valid reason I can think of to hide source code is: it is so fugly, owner is ashamed of it.
ccobra3000
01-05-2003, 07:09 PM
well there are pictures and encrypted logins that are in my source.
Vladdy
01-05-2003, 07:18 PM
Logins belong to the server side. If you are trying to do some javascripting put it in an external file.
There is not much you can do about PrtScr or other screen capturing utilities. If you want to deter the ignorant from right-clicking on your images there are better ways that do not affect the rest of the users:
http://www.codingforums.com/showthread.php?s=&threadid=9254
boywonder
01-06-2003, 04:09 AM
Originally posted by Vladdy
I would just like to know WHAT IS THE FREACKING POINT in hiding the source code??? What is it that people are trying to protect???
The only valid reason I can think of to hide source code is: it is so fugly, owner is ashamed of it.
Many want to learn how to hide source immediately after they figure out how to steal it... Most I would say - why would a knowledgable web developer bother? There's few inept ones (that I know personally) who steal scripts and then have stupid no right click scripts in the pages.
This is not to accuse ccobra3000 of that. Protecting images is a big concern for a lot of people... however if you serve them on the web, consider them public property.
Skyzyx
01-06-2003, 08:34 AM
Heh... this seems awfully familiar... ;)
Tails
01-08-2003, 08:22 PM
I don't see any reason to hide the source. As long as the browser has read it, there will be programs that can reproduce the sources (including external files). For every "no-right-clicking" image that popped up with an annoying message and an email which you never get a reply from, you get pissed and find ways around the right clicking just for the fun of it. There's no stopping anyone.
brothercake
01-09-2003, 12:05 AM
Code is just output of the mind; they can't steal your mind so who gives a rat's?
Let em have it I say; use philosophically-interesting variable names and make it easy to steal - like writing zen poetry inside your hifi;
Do it on the server so all they see is the output, not the actual program.
It doesn't matter because a creative mind is boundless - you can create anything, but a plagiarist can only steal what already exists ;)
whammy
01-09-2003, 12:26 AM
Wow, that's a very accurate and elegant way to put it, brothercake. And so true. :)
I've said many similar things in the past, but I'm a bit more long-winded than you are. ;)
A plagiarist can steal your code, but if you're any good your code will improve, you will be using dynamic data, etc. - and there's no way a theif could ever keep up with that, since it would be a 24/7 job (and if you're using databases, they don't have access to the data that truly makes your site/application dynamic!).
That's why the internet is "open-source", anyway, is to share knowledge and ideas, not hide them! - and it's one of the things that truly makes this forum one of the best resources on the internet.
:D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.