Forum Moderators: open
'La propriété c'est le vol'.
Proudhon;)
birdbrain
Ok, if I can't hide it, if I encrypt it using an HTML encrypting program will anyone be able to unencrypt the code?
You don't have to. Just open the file in your browser and save the page -- voila! The browser has decrypted it for you!
It's just one of those things you can't do anything about!
Unless you print the page on paper, burn the paper, and store the ashes in a vault...
Reasons to hide your code
1. "My HTML is great, I put a lot of time into it and it will be stolen by the teeming masses that can't do this themselves."
In other words, you have you discovered some fantastic new code that has valid XHTML and CSS and does something so novel and amazing that nobody else could duplicate it just by looking at your page and without having access to your code? I don't think so.
2. "My competitor is stealing my code every time I do an update and making his site look just like mine." This has come up a bunch of times in the copywrite forum. If your competitor is really stupid (which might well be the case in this situation) encryption might actually stop this or make it hard enough that he would resort to other methods. Mostly, though, to really stop this, you will have to keep careful documentation, screenshots, notes, all dated, over a long time and then take the guy to court.
3. "I have sensitive password information on my page." This is a reason to take your page offline immediately and destroy it; it is not a reason to encrypt it.
Tom
You don't have to. Just open the file in your browser and save the page -- voila! The browser has decrypted it for you!
Actually, Doc, it's not quite that simple. There are encryption programs out there that prevent this in the sense that even the saved source code is not human readable. Basically, they run some sort of hash that encrypts the page and then have just enough Javascript code to get the Javascript rolling and decrypting itself. Even this can be made to look encrypted to a neophyte by using, say, Unicode entities throughout for every character.
That then decrypts the page and the browser is happy, but when you save and view the file, it's still a hash of the original. In order to make it less simple, they will use a sequence of hashes so that you can't just try all obvious algorithms to decrypt, but will also have to try combinations. This will in fact be beyond the skill of many people out there.
That said, the point is, what are the chances that I, in my incredible wisdom, have come up with some layout so innovative that it could not be duplicated by some guy with Frontpage and a couple of hours? Of course, his code might be table-heavy and not valid to any known W3C Rec, but would this sort of person care? Not a chance.
If someone is consistently stealing your code, you have to document and take him to court.
Unfortunately, you still have to output the decoded string. And it's very simple to send that string to an alert window or just post it in the browser. It might fool the average html user, but not a programmer.
Your time would probably be better spent making improvements to your site.
I have a web based application in ASP. The plain HTML markup is meaningless to encrypt, but the business login, queries, database structure, and other real programing tasks are proprietary and I don't want those stolen.
Now ASP (and php and jsp, etc) is processed server side, translated into HTML and sent to the browser. The user never sees the actual ASP codes.
However, if I want to deliver an "off-line" version of the web application that will run in the browser on the users local machine without connection to the Internet, the user will have access to all my ASP code.
That's not acceptable.
So, I'm investigating methods of encrypting the business logic. The HTML markup is meaningless. People can steal the layout all they want.
But the business logic is priceless.
I did find an IIS emulator which allows me to run ASP pages without having to install the PWS on client machines. But I want to encrypt before I deploy.
I might use the idea of the obfuscator to make my own encryption routine.