Jump to content
xisto Community
Sign in to follow this  
illusion

Wondering How To Hide Your Source Code?

Recommended Posts

Well, give up right now then, because it is absolutely impossible. "No right-click" scripts and other similar scripts will only end up annoying your users in which actually don't even want to steal your source code or images, but rather just want to casually use their browser features. Doing things like this will, indeed, drive away some users because they will be confused if once they come to your site they won't be able to use common features that they are usually able to use.

 

What it really comes down to is this: if the browser can render the page, and source code can be accessed â and there is nothing more to it. Doing things like using JavaScript to generate the the source code (and attempt to obfuscate it), you are making the page inaccessible to approximately 9% of your visitors (that includes search engines as well). As previously mentioned, "no right-click" scripts are also ineffective because there are several other ways to obtain source without the right-click context menu and moreover, JavaScript can be disabled.

 

The source code of your site will always be accessible no matter what, it simply isn't worth trying to hide. Accept that it is impossible and simply don't waste your time trying to prevent people from accessing it, because you can't. The more accessible and usable your site is, the more people will be able to use and enjoy your site.

 

In the case of images, they can also easily be taken from a site no matter what kind of "no right-click" or other scripts you have applied. However, the most practical thing to do is to watermark your images. This will not completely prevent people from attempting to steal it, but it should cut down on the number of people that try to take your images because now there is something on the image that explictly defines it as your work.

wht U guys think.. is it any possible way?

 

 

-----Copied from http://www.webdeveloper.com/forum/showthread.php?26841-Wondering-how-to-hide-your-source-code -----szupie

Edited by szupie (see edit history)

Share this post


Link to post
Share on other sites

lol, i thought this was going to be about preventing reverse engineering...Stopping people from copying your HTML code is like trying to sell a work of fiction, without letting your customers look inside the book...its never going to happen UNLESS the government gets all 1984 on your *bottom*, and passes a law saying all browsers must not have a "view source" button / feature...and even then, those of us who know a little about puters can still steal the source / images using the greatest, and yet most simple networking took of all kind... telnet.And with open source browsers like Firefox, even if the law forced them to remove such "view source" features, it wouldnt be 5 minutes untill someone wrote a patch to put the feature back in.anyways... hiding source is pointless.. lets face it, anyone who knows anything about HTML can re-create a simple html webpage.... in that sence hey are only stealing the design, not the code.but if the authos has actually put some hard work into making a web page (like the forum page here) then the html code has to be generated remotely via GCI or PHP.

Share this post


Link to post
Share on other sites

Well qwijibow, that isn't always true. Some java script can be on the source code and then you will have some trouble. Some people who password protect their sites use and inefficient javascript method. Someone could just get in by doing the wrong password and then looking in the source code for the right one.

Share this post


Link to post
Share on other sites

Well qwijibow, that isn't always true. Some java script can be on the source code and then you will have some trouble. Some people who password protect their sites use and inefficient javascript method. Someone could just get in by doing the wrong password and then looking in the source code for the right one.

<{POST_SNAPBACK}>


it suddenly occurs to me that you dont actually know what you are talking about :P

sorry, but passwords cannot be found in javascript source.. any-one who ever try's to password protect somthing on client side has obviously never seen a computer before...

 

all password authentication is always done server side, with (usually) MD5-Hashes. (or MD4 for the the few windows machines out there)

Share this post


Link to post
Share on other sites

hmmm.... i'd never tried this stuff coz of lack of time. but there is a way to hide your code

first. use flash :P

flash can embedded html :P

second. use commercial site compressor($100++) :P

third. have u try framming a php gd?

have u notice that when you view php gd snippets there is no view source on the page menu also in right click. but when in frames, right clicking on html frames view source is enable. then try flash in that frames embedded your html most likely if in php :o

 

good luck :o

Share this post


Link to post
Share on other sites

Hey r3d,This appeared cool, but you forget one common thing, that is FLASH is not a very popular medium b'coz it is not turned on in many browsers (like Firefox in mine, and I've kept it so for good measure !!).Anyway, why the hell does one need to protect the source code for ?? The content of the webpage make it good or bad, not its HTML source !! Personally, I'm against all these b'coz I learnt HTML by looking at other people's source codes only !!If you like other's not to steal your image, watermark it !!If you want people not to see your cool javascripts, use a scrambler software !! ........... These things are simple !!Buy,Bigyan

Share this post


Link to post
Share on other sites

Hi all, Not much about javascript or html can be hidden - unless you break up all your javascript and put them as functions in a separate file - and create user rights such that the .js file cannot be read by any "snooping user" - it's pretty tricky but can be done - on the other hand, if your code is in PHP you can try using Zend Safeguard Studio (http://forums.xisto.com/no_longer_exists/) to encode the PHP files to be non-human readable. Those who would like to get their hands on a fully working copy could post back here. I dont know if it's illegal but I could post a link :)Cheers....

Share this post


Link to post
Share on other sites

hmmm.... i'd never tried this stuff coz of lack of time. but there is a way to hide your code

first. use flash :)

  flash can embedded html :P

second. use commercial site compressor($100++)  :P

third. have u try framming a php gd?

have u notice that when you view php gd snippets there is no view source on the page menu also in right click. but when in frames, right clicking on html frames view source is enable. then try flash in that frames embedded your html most likely if in php  :D

 

good luck  :P

<{POST_SNAPBACK}>

Are you sure? :)http://forums.xisto.com/no_longer_exists/ it can decompile every flash sites....

The only way to "protect"(why should you do it?) that I know is PHP GD or Js, yep, Javascript is runned by the client and some anti-spam system create a little js that the client sees like a mail addres when he opens that

http://www.kenric.com/AntiSpambotMailto.html

 

'njoy

 

IMHO there is no-reason to protect the code..the code must be free..like internet IMHO

Share this post


Link to post
Share on other sites

i've found two things that work to get rid of most users from copying HTML/images ... first, there <i>are</i> services out there that will block your script (and images too, i'd assume) without using javascript ... however, these require "mucho dinero" as they say in spain (these can be very expensive) ... secondly, you can always try using redirect services, such as http://www.shorturl.com/. with these, it won't hide the coding, but it will move it to another site, and the user needs to search HTML to find the link to your original code-- bigredrosen

Share this post


Link to post
Share on other sites

I'm thinking no. Flash can be decompiled, some "no right-clicks" you can just use the Windows hover caption or hold Ctrl and click sometimes. And if you really want the graphic, you could just hit Print Screen and crop it down for yourself or see if the image is in your Temp Files.

 

... secondly, you can always try using redirect services, such as http://www.shorturl.com/. with these, it won't hide the coding, but it will move it to another site, and the user needs to search HTML to find the link to your original code

I think that if the know how to view the source, they're probably smart enough to know that those redirect sites have the original URL in the source. Also, I have a nice Firefox add-on that has a bunch of HTML tools, view soure, hide images, show image URL's, etc.

 

http://chrispederick.com/work/web-developer/

 

I'm sure that would force it's way through, or if nothing else just slip right past their scripts. Plus you can always go to File>Save Page As... and then open it in Dreamweaver or even notepad if you're hardcore.

Share this post


Link to post
Share on other sites

I agree with Ninja Munky:What your browser shows is somewhere on your computer. And therefore you can't hide it from a good user. even if you find some complicated methods there will be methods against it.And why should you want that? They can copy your text, even if they have to retype them, they can copy your images, even if they have to take screenshots.And your HTML and JS code cannot be so famously good that there is any reasonable explanation for putting so much work in protecting it. It does not contain secret data and anything else can be rewritten. it aint no creative work, it's just some tags. that's the point: theres no point in protecting your sourcecode.my opinion so far,ruben

Share this post


Link to post
Share on other sites

If you simply use PHP as your source the only parts of it that can bee seen are those that PHP echos or prints as HTML, basically the page source you are viewing is just HTML that is how all browsers are able to render the page but you could have all kinds of HTML code going on with included files and the actual main php that will never be seen. You simply can not hide HTML or the echoed result of HTML generated by PHP or Perl or any script.

Share this post


Link to post
Share on other sites

Houdini, that's not the point, hiding sourcecode is usually used to prevent people ripping off other peoples layouts and designs.Also, there are some javascript sourcecode scramblers that can give a certain degree of safety against most of the people who try to rip off. They work like this:the entire website is put in one string, that string is then encrypted by some kind of encoder. The encoder puts a decoder (java script) and the string into a html file. So if you check the source you only see a javascript code and some encrypted string, most people stop there.The thing is, isn't there any plugin available for FireFox that somehow shows the output of the javascript in the source. That would be possible wouldn't it? All you need is a javascript interpreter that displays the output.Side note.Most people don't appreciate encrypted site like that which will result in a low visitor number.

Share this post


Link to post
Share on other sites

Well qwijibow, that isn't always true. Some java script can be on the source code and then you will have some trouble. Some people who password protect their sites use and inefficient javascript method. Someone could just get in by doing the wrong password and then looking in the source code for the right one.

1064279361[/snapback]


But this is merely obfuscation not hiding.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.