<html>
<title>JS/VBS 代码加密解密</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY {
BACKGROUND-COLOR: #FFFFFF; BORDER-RIGHT: #000000 0px outset; COLOR: #000000; FONT-SIZE: 9pt; LINE-HEIGHT: 14px; MARGIN-LEFT: 0px; TEXT-DECORATION: none; margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
border:2 #cccccc solid
}
.bu{
BACKGROUND-COLOR: #f7f7f7; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #000000; FONT-SIZE: 9pt; HEIGHT: 22px; WIDTH:80px
}
.tx1{font-size:12px;border:1px solid;border-color:black black #000000;color: #0000FF}
-->
</style>
</head>
<body>
<script language="javascript" type="text/javascript">
function chicks(where){
jsstr=String.fromCharCode(60)
if(where.value.indexOf('↓')!=-1)
{
where.value=where.value.replace('加密↓','解密↑')
txt1.disabled=true;txt1.style.backgroundColor='dddddd'
txt2.disabled=false;txt2.style.backgroundColor='white'
ok2.disabled=false;ok2.focus();
ok1.disabled=true;len1.disabled=true;len2.disabled=false;
if(where.id=='js1'){
txt2.value='<script>document.write(unescape(\''+escape(txt1.value)+'\'))'+jsstr+'/script>'
txt1.value=""}
else{
txt2.value='<textarea style="display:none" id=lshdic200Xpage>'+vbsstr+'</textarea>'+jsstr+'script language=vbs>document.write(strreverse(lshdic200Xpage.value))'+String.fromCharCode(60)+'/script>'
txt1.value=""}
}else{
where.value=where.value.replace('解密↑','加密↓')
txt1.disabled=false;txt1.style.backgroundColor='white'
txt2.disabled=true;txt2.style.backgroundColor='dddddd'
ok2.disabled=true;txt1.focus();ok1.disabled=false;len1.disabled=false;len2.disabled=true;
if(where.id=='js1'){txt1.value=unescape(txt2.value.replace('<script>document.write(unescape(\'','').replace('\'))'+jsstr+'/script>',''))
txt2.value=""}
else{
txt1.value=vbstr
txt2.value=""}
}}
function runpath(whattxt){
msg1=open('','','')
msg1.document.open()
msg1.document.write(whattxt)
msg1.document.close()
}
</script>
<center><font color=bule size=4>JS/VBS 代码加密解密</font><P></P>
<input type="button" id="ok1" value="加密前测试" onclick="runpath(txt1.value)" class="bu">
<input type=button value="常规字符统计" onclick="alert(txt1.value.length)" id="len1" class="bu">
<br>
<textarea cols="70" rows="10" class=tx1 id="txt1">请把你需要加密的内容粘贴在这里![由于兼容性问题,VBS转换功能只能在IE中使用,FIREFOX无效]</textarea><br />
<input type="button" id="js1" value="JS加密↓" onClick="chicks(this);vbs1.disabled=!vbs1.disabled;" class="bu">
<input type="button" id="vbs1" value="VBS加密↓" onClick="forstr();chicks(this);js1.disabled=!js1.disabled" class="bu">
<a href="#" onClick="if (txt2.disabled==false) {chicks(js1);vbs1.disabled=!vbs1.disabled;txt1.value='';txt2.value='';txt1.focus();}">需要加密</a> | <a href="#" onClick="if (txt2.disabled==true) {chicks(js1);vbs1.disabled=!vbs1.disabled;txt1.value='';txt2.value='';txt2.focus();}">需要解密</a><br />
<textarea cols="70" rows="10" class=tx1 disabled id="txt2"></textarea><br />
<input type="button" id="ok2" value="加密后测试" disabled onClick="runpath(txt2.value)" class="bu">
<input type="button" value="加密字符统计" onClick="alert(txt2.value.length)" id="len2" disabled class="bu">
</center>
<script language="vbscript">
dim vbsstr,vbstr
sub forstr
if js1.disabled=false then
vbstr=txt1.value
vbsstr=strreverse(vbstr)
end if
end sub
</script>
</body>
</html>
更多的JS/VBS 代码加密解密请到论坛查看: http://BBS.TC711.COM
【 双击滚屏 】 【 评论 】 【 收藏 】 【 打印 】 【 关闭 】
来源:
互联网
日期:2007-6-28