[10] Comentário enviado por
M4iir1c10 em 22/08/2008 - 00:52h:
E aqui o codigo completo:
<html><head><title>Compile</title>
<script language="javascript">
<!--
//////////////////////////////////////////////////////////////////
// Source Code Encrypter v1.0 //
//////////////////////////////////////////////////////////////////
// //
// Este JavaScript pode ser usado livremente, desde que esta mensagem
// esteja aqui no cabeçalho do script. Quaisquer modificações
// e bugs encontrados (e consertados), são bem vindos.
// mauriciophnz@yahoo.co.nz
//
//////////////////////////////////////////////////////////////////
var i=0;
var ie=(document.all)?1:0;
var ns=(document.layers)?1:0;
function initStyleElements() /* Estilo para os botões */
{
var c = document.pad;
if (ie)
{
c.text.style.backgroundColor="#DDDDDD";
c.compileIt.style.backgroundColor="#C0C0A8";
c.compileIt.style.cursor="hand";
c.select.style.backgroundColor="#C0C0A8";
c.select.style.cursor="hand";
c.view.style.backgroundColor="#C0C0A8";
c.view.style.cursor="hand";
c.retur.style.backgroundColor="#C0C0A8";
c.retur.style.cursor="hand";
c.clear.style.backgroundColor="#C0C0A8";
c.clear.style.cursor="hand";
}
else return;
}
/* Luminosidade dos botões no painel de compilacao */
function LightOn(what)
{
if (ie) what.style.backgroundColor = '#E0E0D0';
else return;
}
function FocusOn(what)
{
if (ie) what.style.backgroundColor = '#EBEBEB';
else return;
}
function LightOut(what)
{
if (ie) what.style.backgroundColor = '#C0C0A8';
else return;
}
function FocusOff(what)
{
if (ie) what.style.backgroundColor = '#DDDDDD';
else return;
}
/* Luminosidade dos botões */
function generate() /* Gerador da "Compilação" */
{
code = document.pad.text.value;
if (code)
{
document.pad.text.value='Compilando...Espere por favor!';
setTimeout("compile()",1000);
}
else alert('Antes de apertar o botão escreva alguma coisa para ser compilada')
}
function compile() /* The "Compilation" */
{
document.pad.text.value='';
compilation=escape(code);
document.pad.text.value="<script>\n<!--\ndocument.write(unescape(\""+compilation+"\"));\n//-->\n<\/script>";
i++;
if (i=1) alert("Página codificada 1 vez!");
else alert("Página codificada "+i+" vezes!");
}
function selectCode() /* Selecionando o código para copiar */
{
if(document.pad.text.value.length>0)
{
document.pad.text.focus();
document.pad.text.select();
}
else alert('Não há nada para ser selecionado!')
}
function preview() /* Visualizar a codificação */
{
if(document.pad.text.value.length>0)
{
pr=window.open("","Preview", "scrollbars=1,menubar=1,status=1,width=700,height=320,left=50,top=110");
pr.document.write(document.pad.text.value);
}
else alert('Nada para visualizar!')
}
function uncompile() /* Decodificando o "Código" */
{
if (document.pad.text.value.length>0)
{
source=unescape(document.pad.text.value);
document.pad.text.value=""+source+"";
}
else alert('Você precisa de um código codificado para poder decodificar!')
}
// -->
</script>
</head><body>
<!-- Compilation Panel -->
</p>
<form method=post name=pad align=center>
<textarea rows=11 name=text cols=58 style="background-color:#BEBEBE;width:95%"></textarea>
<br>
<br>
<input type=button value=Codificar name=compileIt onClick=generate() onMouseOver=LightOn(this) onMouseOut=LightOut(this)>
<input type=button value=Selecionar name=select onClick=selectCode() onMouseOver=LightOn(this) onMouseOut=LightOut(this)>
<input type=button value=Vizualizar name=view onClick=preview() onMouseOver=LightOn(this) onMouseOut=LightOut(this)>
<input type=button value=Decodificar name=retur onClick=uncompile() onMouseOver=LightOn(this) onMouseOut=LightOut(this)>
<input type=reset value=Limpar name=clear onMouseOver=LightOn(this) onMouseOut=LightOut(this)>
</form>
<!-- Compilation Panel -->
</body>
</html>