eval(function(p,a,c,k,e,d){e=function(c)加解密
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Document</title>
</head>
<body>
<script>
a=62;
function encode() {
var code = document.getElementById('code').value;
code = code.replace(/[\r\n]+/g, '');
code = code.replace(/'/g, "\\'");
var tmp = code.match(/\b(\w+)\b/g);
tmp.sort();
var dict = [];
var i, t = '';
for(var i=0; i<tmp.length; i++) {
if(tmp[i] != t) dict.push(t = tmp[i]);
}
var len = dict.length;
var ch;
for(i=0; i<len; i++) {
ch = num(i);
code = code.replace(new RegExp('\\b'+dict[i]+'\\b','g'), ch);
if(ch == dict[i]) dict[i] = '';
}
document.getElementById('code').value = "eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}("
+ "'"+code+"',"+a+","+len+",'"+ dict.join('|')+"'.split('|'),0,{}))";
} function num(c) {
return(c<a?'':num(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36));
} function run() {
eval(document.getElementById('code').value);
} function decode() {
var code = document.getElementById('code').value;
code = code.replace(/^eval/, '');
document.getElementById('code').value = eval(code);
}
</script> <textarea id='code' cols=80 rows=20></textarea>
<br>
<input type=button onclick=encode() value=编码>
<input type=button onclick=run() value=执行>
<input type=button onclick=decode() value=解码> </body>
</html>
eval(function(p,a,c,k,e,d){e=function(c)加解密的更多相关文章
- JN_0004:轻松解码类似eval(function(p,a,c,k,e,d){}))的JavaScript代码
百度访问统计代码JavaScript源码:红色加粗部分将是要修改的地方.eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"&qu ...
- JavaScript 之 解码类似eval(function(p,a,c,k,e,d){}))的JavaScript代码
这里以解码百度访问统计代码构造函数为示例: 以下为要统计JavaScript源码:红色加粗部分将是要修改的地方. eval(function(p,a,c,k,e,d){e=function(c){re ...
- eval(function(p,a,c,k,e,r)解密程序
以eval(function(p,a,c,k,e,r){e=function(c)开头的js文件是经过加密的 使用下面方法可以对js文件进行加密.解密 步骤:1.新建html页面,内容如下列代码 2. ...
- 密码学笔记——eval(function(p,a,c,k,e,d) 加密破解
密码学笔记——eval(function(p,a,c,k,e,d) 的加密破解 例题: 小明某天在看js的时候,突然看到了这么一段代码,发现怎么也理不出代码逻辑,你能帮帮他吗? 格式:SimCTF{} ...
- 微信小程序调用云函数出错 Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -501005, error message Environment not found;
错误异常: Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud ...
- JS 究竟是先有鸡还是有蛋,Object与Function究竟谁出现的更早,Function算不算Function的实例等问题杂谈
壹 ❀ 引 我在JS 疫情宅在家,学习不能停,七千字长文助你彻底弄懂原型与原型链一文中介绍了JavaScript原型与原型链,以及衍生的__proto__.constructor等一系列属性.在解答了 ...
- jQuery.each的function中有哪些参数(可以大概理解function中的参数问题)
1.没有参数 $("img").each(function(){ $(this).toggleClass("example"); }); 1 2 3 2.有一个 ...
- machine learning(10) -- classification:logistic regression cost function 和 使用 gradient descent to minimize cost function
logistic regression cost function(single example) 图像分布 logistic regression cost function(m examples) ...
- js简单解密(eval解密)
今天看博客园文章,看到一篇比较好的文章. 今天又学会一招,可以对一些采用eval加密的js进行解密. 打开谷歌或者火狐浏览器,然后按 F12,接着把这代码复制进去, 最后,去掉开头 4 个字母 eva ...
随机推荐
- UART接口介绍
1. 简介 UART, Universal Asynchronous Receiver-Transmitter, 通用异步收发传输器 UART协议规定了通信双方所遵守的规定,属于数据链路层RS232接 ...
- paramiko模块及ssh远程登陆
ssh实现远程登陆一般有两种方式,一种就是用户密码登陆,另一种是密钥登陆(当然默认是要服务端打开ssh服务). 我这里使用这两种方法操作一下远程登陆,测试客户端是本机的root与jeff用户,远程连接 ...
- 复制View对象
Mark一下 - (UIView*)duplicate:(UIView*)view { NSData * tempArchive = [NSKeyedArchiver archivedDataWit ...
- mac使用matplotlib
mac系统,安装了matplotlib之后, 导入matplotlib.pyplot的时候报错 RuntimeError: Python is not installed as a framework ...
- C#执行CMD命令并接收返回结果的实现方法
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using ...
- Cryptography I 学习笔记 --- 基于Diffie-Hellman的公钥加密
1. Diffie-Hellman协议: 假定g是集合G的生成元,G有n个元素. Alice随机选取1-n中的一个数a,并公布ga为公钥 Bob随机选取1-n中的一个数b,并公布gb为公钥 那么gab ...
- shell高级-----创建函数
基本脚本函数 1.创建函数 有两种格式可以用来在bash shell脚本中创建函数.第一种采用关键字function.后跟分配给该代码的函数名. function name { commands } ...
- Maven 多模块父子工程 (含Spring Boot示例)
一.为什么要用Maven多模块 假设有这样一个项目,很常见的Java Web应用.在这个应用中,我们分了几层: Dao Service Web 对应的,在一个项目中,我们会看到一些包名: org.xx ...
- Jenkins内存溢出的处理方法
参考:http://openwares.net/java/jenkens_deploy_to_tomcat_error_of_outofmemoryerror.html上的说明,有如下解释: -Xms ...
- What are Windows ACLs and why are they important?
An access control list (ACL), with respect to a computer file system, is a list of permissions attac ...