> Never used it anywhere, but this encrypts your source code,
> yet the browser can still open it.
> http://www.iwebtoolkit.com/tools/html-encrypt/
> i'm sure there's a way to decrypt it back though
Yes that's very easy to "decrypt", or actually just unencode. All that is
doing is taking your html and doing a UrlEncodedFormat(), it decodes it and
then writes it.
Change the document.write(...), to an alert(...) and you will see your
source code.
Hiding HTML source is hardly worth the effort because if someone really
wanted to they could create your page from scratch in a few hours, or less.
But if you wanted to use that encoder to prevent the user from seeing the
code, then you can do the following...
viewPage.cfm:
<cfset session.viewPage = "key">
<script src="source.cfm">
source.cfm:
<cfif IsDefined("session.viewPage") AND session.viewPage IS "keyCode">
<cfset StructDelete(session, "viewPage")>
document.write(unescape("%3Cb%3EThis%20is%20bold%3C/b%3E"));
<cfelse>
sorry you can't view the source
</cfif>
It's still possible for someone to get around this, if JavaScript is turned
off it might not work, but its just an idea I had.
_____________________________________________
Pete Freitag
CTO, CFDEV.COM
http://www.cfdev.com/
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists