js加密页面代码生成器

作者:Svetlin Staev 时间:2007-10-12 13:40:00 

把你想加密的文档的源代码拷贝到下面的文本框内,按下生成按钮就可以得到一段加密了的页面代码,把代码复制到新的页面就可以了. [注意:可重复加密啊!]

为了方便大家研究贴出部分js代码如下,呵呵:


      <script language=JavaScript>
<!--
//////////////////////////////////////////////////////////////////
//           Source Code Encrypter v1.0       //
//////////////////////////////////////////////////////////////////
//                               //
// This JavaScript can be freely used as long as this message //
// stays here in the header of the script. Any modifications  //
// and bugs found (and fixed) are appreciated.         //
// Script submitted/featured on Dynamicdrive.com        //
// Visit http://www.dynamicdrive.com for source code      //
//     Svetlin Staev, thewebmonster@altavista.com     //
//////////////////////////////////////////////////////////////////

var i=0;
var ie=(document.all)?1:0;
var ns=(document.layers)?1:0;

function initStyleElements() /* Styles for Buttons Init */
{
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;
}

/* Buttons Enlightment of "Compilation" panel */
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;
}
/* Buttons Enlightment of "Compilation" panel */

function generate() /* Generation of "Compilation" */
{
code = document.pad.text.value;
if (code)
{
document.pad.text.value='正在生成加密代码,请稍后!';
setTimeout("compile()",1000);
}
else alert('请输入源文件代码')
}
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++;
alert("页面被加密了 "+i+" 次!");
}
function selectCode() /* Selecting "Compilation" for Copying */
{
if(document.pad.text.value.length>0)
{
document.pad.text.focus();
document.pad.text.select();
}
else alert('没有可以选择的文本内容!')
}
function preview() /* Preview for the "Compilation" */
{
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('没有可以预浏览的文本内容!')
}
function uncompile() /* Decompiling a "Compilation" */
{
if (document.pad.text.value.length>0)
{
source=unescape(document.pad.text.value);
document.pad.text.value=""+source+"";
}
else alert('你需要生成被加密的代码后才能取回源代码!')
}
// -->
</script>



标签:加密,代码,js
0
投稿

猜你喜欢

  • MYSQL各字段的长度是多少?

    2009-10-28 18:32:00
  • 滑动门代码 兼容IE7 IE6 FireFox Opera

    2008-06-07 13:56:00
  • css学习笔记:表格隔行点击变色

    2009-04-30 13:15:00
  • 最小asp后门程序

    2011-04-03 10:35:00
  • asp 分页函数,可以显示 1,2,3,4,5... 前十页,后十页,下一页,上一页

    2009-07-05 18:34:00
  • 在SQL Server中处理空值时涉及的三个问题

    2009-02-05 15:30:00
  • asp如何制作一个小巧的购物车?

    2010-07-07 12:25:00
  • asp如何用FileSystemObject组件来做一个站内搜索?

    2010-06-12 12:47:00
  • asp程序定义变量比不定义变量速度快一倍

    2012-12-04 20:06:32
  • 显示ASP页面源码的代码

    2008-10-12 13:05:00
  • sqlserver 巧妙的自关联运用

    2012-07-21 14:55:12
  • CSS像素图制作攻略

    2009-05-19 19:32:00
  • 解决在Dreamweaver中不支持中文文件名的方法

    2010-09-02 12:35:00
  • 如何利用SysOjects来获知数据库的信息?

    2010-01-01 15:43:00
  • 像聪明女孩穿衣服那样设计网页文字

    2007-11-06 16:45:00
  • MySQL 连接与管理

    2011-09-10 15:52:42
  • 如何把图片也存到数据库中去?

    2009-11-06 13:56:00
  • asp如何读取Windows的信息文件(.ini)?

    2009-11-20 18:27:00
  • 自己写的一个PJBlog中可以双击输入验证码的修改

    2009-05-17 10:51:00
  • ASP XML制作菜单管理程序

    2011-04-04 11:15:00
  • asp之家 网络编程 m.aspxhome.com