Microsoft 脚本编码器Script Encoder介绍(4)全中文
2000-08-13 10:11:05 来源:WEB开发网核心提示:编码示例如下是一个包含需要保护的 JScript 代码的简短示例: <HTML><HEAD><TITLE>脚本编码器示例页</TITLE><SCRIPT LANGUAGE="JScript"><!--Copyright© 1
编码示例
如下是一个包含需要保护的 JScript 代码的简短示例:
<HTML>
<HEAD>
<TITLE>脚本编码器示例页</TITLE>
<SCRIPT LANGUAGE="JScript">
<!--//
//Copyright© 1998 Microsoft Corporation. All Rights Reserved.
//**开始编码**
function verifyCorrectBrowser(){
if(navigator.appName == "Microsoft Internet Explorer")
if (navigator.appVersion.indexOf ("5.") >= 0)
return(true);
else
return(false);
}
function getApPRopriatePage(){
var str1 = "Had this been an actual Web site, a page compatible with ";
var str2 = "browsers other than ";
var str3 = "Microsoft Internet Explorer 5.0 ";
var str4 = "would have been loaded.";
if (verifyCorrectBrowser())
document.write(str1 + str3 + str4);
else
document.write(str1 + str2 + str3 + str4);
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="getAppropriatePage()">
</BODY>
</HTML>
该页在经脚本编码器运行后如下所示:
<HTML>
<HEAD>
<TITLE>脚本编码器示例页</TITLE>
<SCRIPT LANGUAGE="JScript.Encode">
<!--//
//Copyright© 1998 Microsoft Corporation. All Rights Reserved.
//**开始编码**#@~^QwIAAA==@#@&0; mDkW P7nDb0zZKD.n1YAMGhk+Dvb`@#@&P,kW`UC7kLlDGDcl22gl:n~{'~Jtr1DGkW6YP&xDnD +OPA62sKD+ME#@#@&P,~~k6PvxC\rLmYGDcCwa.n.kkWU bx+X66Pcr*cJ#,@*{~!*P~P,P~.YEMU`DDEbIP,P,+s/n@#@&P~P,~PM+O;Mx`WC^/n#pN6EU1YbWx,oObaw.WaDrCD+nmL+v# @#@&~P7lMPdY.q,'~J_CN,Y4rkP4nn PCx,C1Y;mV,+(PkrY~~l,wCLPmKhwmYk(snPSkDt~JI@#@&P~\m.PkY.+,'PE8MWA/.kPGDtDPDtmUPri@#@&,P-CMP/D.&,'Pr\rmMWkWWY~( YnD nY,2a2^WDn.,* !,Ep@#@&,P7lD,/D.c,'~JSW;s9Ptm-+,4+U~VKl9+[REI,Pr0,c\DrWHZW..mOAMGS/nM`*#@#@&P,~P9W^Es+UOchDbO+v/YMq~_,/DDfPQ~kY.c*IP,+sd@#@&~~,P[W1;s+UDRSDkD+vdYMF~_,/O.yP_,dYM&P3~dYMc*iNz&R @*^#~@
//-->
</SCRIPT>
</HEAD>
<BODY onload="getAppropriatePage()">
</BODY>
</HTML>
要点 :经过编码后,如果您改动编码后的文本,哪怕只改动一个字。脚本的完整性就会丢失,从而不能再使用。
如下是一个包含需要保护的 JScript 代码的简短示例:
<HTML>
<HEAD>
<TITLE>脚本编码器示例页</TITLE>
<SCRIPT LANGUAGE="JScript">
<!--//
//Copyright© 1998 Microsoft Corporation. All Rights Reserved.
//**开始编码**
function verifyCorrectBrowser(){
if(navigator.appName == "Microsoft Internet Explorer")
if (navigator.appVersion.indexOf ("5.") >= 0)
return(true);
else
return(false);
}
function getApPRopriatePage(){
var str1 = "Had this been an actual Web site, a page compatible with ";
var str2 = "browsers other than ";
var str3 = "Microsoft Internet Explorer 5.0 ";
var str4 = "would have been loaded.";
if (verifyCorrectBrowser())
document.write(str1 + str3 + str4);
else
document.write(str1 + str2 + str3 + str4);
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="getAppropriatePage()">
</BODY>
</HTML>
该页在经脚本编码器运行后如下所示:
<HTML>
<HEAD>
<TITLE>脚本编码器示例页</TITLE>
<SCRIPT LANGUAGE="JScript.Encode">
<!--//
//Copyright© 1998 Microsoft Corporation. All Rights Reserved.
//**开始编码**#@~^QwIAAA==@#@&0; mDkW P7nDb0zZKD.n1YAMGhk+Dvb`@#@&P,kW`UC7kLlDGDcl22gl:n~{'~Jtr1DGkW6YP&xDnD +OPA62sKD+ME#@#@&P,~~k6PvxC\rLmYGDcCwa.n.kkWU bx+X66Pcr*cJ#,@*{~!*P~P,P~.YEMU`DDEbIP,P,+s/n@#@&P~P,~PM+O;Mx`WC^/n#pN6EU1YbWx,oObaw.WaDrCD+nmL+v# @#@&~P7lMPdY.q,'~J_CN,Y4rkP4nn PCx,C1Y;mV,+(PkrY~~l,wCLPmKhwmYk(snPSkDt~JI@#@&P~\m.PkY.+,'PE8MWA/.kPGDtDPDtmUPri@#@&,P-CMP/D.&,'Pr\rmMWkWWY~( YnD nY,2a2^WDn.,* !,Ep@#@&,P7lD,/D.c,'~JSW;s9Ptm-+,4+U~VKl9+[REI,Pr0,c\DrWHZW..mOAMGS/nM`*#@#@&P,~P9W^Es+UOchDbO+v/YMq~_,/DDfPQ~kY.c*IP,+sd@#@&~~,P[W1;s+UDRSDkD+vdYMF~_,/O.yP_,dYM&P3~dYMc*iNz&R @*^#~@
//-->
</SCRIPT>
</HEAD>
<BODY onload="getAppropriatePage()">
</BODY>
</HTML>
要点 :经过编码后,如果您改动编码后的文本,哪怕只改动一个字。脚本的完整性就会丢失,从而不能再使用。
[]
- ››Microsoft PowerPoint 2010介绍
- ››Microsoft ReportViewer(微软报表)项目中的应用...
- ››Microsoft APP-V 4.5使用经验之序列化工具
- ››Microsoft Access 2010的十大优势详解
- ››Microsoft数据访问技术简介
- ››Microsoft My Phone for Windows Mobile 6+ 新版发...
- ››Microsoft Security Essentials 1.0.1959.0
- ››Microsoft Office Access 2007年中选项组控件中您...
- ››Microsoft Office Communications Server 2007 R2...
- ››Microsoft Office Communications Server 2007 R2...
- ››Microsoft Office Communications Server 2007 R2...
- ››Microsoft Office Communications Server 2007 R2...
更多精彩
赞助商链接