View Full Version : HTML source code encryption problem

01-03-2007, 02:05 PM
ok i got a huge problem....

heres a java code i got from dynamicdrive that encrypts your html code source:

function generate() /* Generation of "Compilation" */
code = document.pad.text.value;
if (code)
document.pad.text.value='Compiling...Please wait!';
else alert('First enter something to compile and then press CompileIt')
function compile() /* The "Compilation" */
if (i=1) alert("Page compiled 1 time!");
else alert("Page compiled "+i+" times!");

after which you put your html code in this form with its button generate:

<textarea rows=5 name=text cols=300 style="background-color:#EBEBEB;width:95%"></textarea><br>
<input type=button value=Compile name=compileIt onClick=generate()>

my idea is to put a hidden html source inside the java code e.g:
<meta HTTP-EQUIV="REFRESH" content="0; url="+url+"">

in which all you have to do is put a url in the form e.g:http://yahoo.com and the output will be a encrypted version of
<meta HTTP-EQUIV="REFRESH" content="0; url=http://yahoo.com">

which wud look somethin like this:


I tried adding an id on the form like [id="url"] and put var
code = document.getElementById("url").value;
document.getElementById("url").value="<meta HTTP-EQUIV='REFRESH' content='0; url="+ur+l"'>;"

but still no good :(

can anyone help me with this?.. it wud really be appriciated...

Philip M
01-03-2007, 03:42 PM
a) Meta tags may only appear in the <HEAD> section of the page.

b) 'Would' is so spelled, and the personal pronoun I is capitalised, by literate people.

c) The whole idea of encyrpting your HTML (or Javascript) code is a huge waste of time as anyone with minimal knowledge can easily decrypt it. The 'encryption' simply consists of substituting the ASCII code for the characters. Anything within quotes is not 'encrypted' at all.

01-03-2007, 04:04 PM
The meta tag was just an example

The I and would thing... sorry im only 17, a typical teen that loves to chat and use shortcut msgs...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum