代码如下:
var cd, dc = '__jsl_clearance=1464241448.7|0|';
var f = [function(x) {
return function realVeal() {
var l = ('String.fromCharCode(' + x + ')')
}, (function() {
var h = document.createElement('div');
h.innerHTML = '<a href=\'/\'>x</a>';
h = h.firstChild.href;
var r = h.match(/https?:\/\//)[0];
h = h.substr(r.length).toLowerCase();
return function(x) {
for (var i = 0; i < x.length; i++) {
x[i] = h.charAt(x[i])
};
return x.join('')
}
})()
}];
cd = [
[
[(-~(+!~~[]) << -~{})] + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})]
],
[((+[]) + [![],
[]
][-~(+[])])],
[((2 ^ -~![]) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (5 + [
[]
][~~!{}]) + ((+[]) + [![],
[]
][-~(+[])]), [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]] + [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]],
[-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + ((+[]) + [![],
[]
][-~(+[])]), (5 + [
[]
][~~!{}]) + (5 + [
[]
][~~!{}]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (-~![] + [
[], !+{}
][(+[])])
],
[((2 ^ -~![]) + [] + [
[]
][(+[])])],
[
[-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + [(-~(+!~~[]) << -~{})], (-~![] + [
[], !+{}
][(+[])]) + ((+[]) + [![],
[]
][-~(+[])]) + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})], (9 + [] + []) + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})], (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (-~![] + [
[], !+{}
][(+[])]), ((2 ^ -~![]) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (5 + [
[]
][~~!{}]) + ((+[]) + [![],
[]
][-~(+[])]), [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]] + [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]],
[-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + (5 + [
[]
][~~!{}]), [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + [(-~(+!~~[]) << -~{})], (5 + [
[]
][~~!{}]) + (5 + [
[]
][~~!{}]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (5 + [
[]
][~~!{}])
],
[(9 + [] + [])],
[(9 + [] + []) + ((+[]) + [![],
[]
][-~(+[])]), [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])])],
[(-~![] + [
[], !+{}
][(+[])]) + [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]]],
[(5 + [
[]
][~~!{}]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (5 + [
[]
][~~!{}]), (-~![] + [
[], !+{}
][(+[])]) + ((+[]) + [![],
[]
][-~(+[])]) + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])]), (-~![] + [
[], !+{}
][(+[])]) + (-~![] + [
[], !+{}
][(+[])]) + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])])],
[(-~![] + [
[], !+{}
][(+[])]) + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])])],
[(-~![] + [
[], !+{}
][(+[])]) + ((+[]) + [![],
[]
][-~(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), ((2 ^ -~![]) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (5 + [
[]
][~~!{}]) + (-~![] + [
[], !+{}
][(+[])]), [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]] + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})]]
];
for (var i = 0; i < cd.length; i++) {
cd[i] = f.reverse()[(-~![] + [
[], !+{}
][(+[])])](cd[i])
};
cd = cd.join('');
dc += cd;现在我将上述代码在java中的ScriptEngine类中的eval方法运行,但是无法获得html页面中的document对象导致程序报错。。有什么办法可以模拟一个document对象或者绕开这段代码吗
var cd, dc = '__jsl_clearance=1464241448.7|0|';
var f = [function(x) {
return function realVeal() {
var l = ('String.fromCharCode(' + x + ')')
}, (function() {
var h = document.createElement('div');
h.innerHTML = '<a href=\'/\'>x</a>';
h = h.firstChild.href;
var r = h.match(/https?:\/\//)[0];
h = h.substr(r.length).toLowerCase();
return function(x) {
for (var i = 0; i < x.length; i++) {
x[i] = h.charAt(x[i])
};
return x.join('')
}
})()
}];
cd = [
[
[(-~(+!~~[]) << -~{})] + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})]
],
[((+[]) + [![],
[]
][-~(+[])])],
[((2 ^ -~![]) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (5 + [
[]
][~~!{}]) + ((+[]) + [![],
[]
][-~(+[])]), [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]] + [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]],
[-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + ((+[]) + [![],
[]
][-~(+[])]), (5 + [
[]
][~~!{}]) + (5 + [
[]
][~~!{}]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (-~![] + [
[], !+{}
][(+[])])
],
[((2 ^ -~![]) + [] + [
[]
][(+[])])],
[
[-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + [(-~(+!~~[]) << -~{})], (-~![] + [
[], !+{}
][(+[])]) + ((+[]) + [![],
[]
][-~(+[])]) + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})], (9 + [] + []) + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})], (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (-~![] + [
[], !+{}
][(+[])]), ((2 ^ -~![]) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (5 + [
[]
][~~!{}]) + ((+[]) + [![],
[]
][-~(+[])]), [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]] + [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]],
[-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + (5 + [
[]
][~~!{}]), [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + [(-~(+!~~[]) << -~{})], (5 + [
[]
][~~!{}]) + (5 + [
[]
][~~!{}]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (5 + [
[]
][~~!{}])
],
[(9 + [] + [])],
[(9 + [] + []) + ((+[]) + [![],
[]
][-~(+[])]), [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})] + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])])],
[(-~![] + [
[], !+{}
][(+[])]) + [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]]],
[(5 + [
[]
][~~!{}]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]) + (5 + [
[]
][~~!{}]), (-~![] + [
[], !+{}
][(+[])]) + ((+[]) + [![],
[]
][-~(+[])]) + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])]), (-~![] + [
[], !+{}
][(+[])]) + (-~![] + [
[], !+{}
][(+[])]) + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])])],
[(-~![] + [
[], !+{}
][(+[])]) + ((+!~~[]) + (+!~~[]) + [] + [
[]
][(+[])])],
[(-~![] + [
[], !+{}
][(+[])]) + ((+[]) + [![],
[]
][-~(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), ((2 ^ -~![]) + [] + [
[]
][(+[])]) + (((+!~~[]) + [(-~(+!~~[]) << -~{})] >> (+!~~[])) + [] + [
[]
][(+[])]), (5 + [
[]
][~~!{}]) + (-~![] + [
[], !+{}
][(+[])]), [(-~(+[]) + [(-~[] << -~[])]) / [(-~[] << -~[])]] + [-~(+!~~[]) + (+!~~[]) + (+!~~[]) + (-~(+!~~[]) << -~{})]]
];
for (var i = 0; i < cd.length; i++) {
cd[i] = f.reverse()[(-~![] + [
[], !+{}
][(+[])])](cd[i])
};
cd = cd.join('');
dc += cd;现在我将上述代码在java中的ScriptEngine类中的eval方法运行,但是无法获得html页面中的document对象导致程序报错。。有什么办法可以模拟一个document对象或者绕开这段代码吗
解决方案 »
- 如何做网址加密
- postgreSQL简单问题
- ibatis如何操作oracle的大字段blob和clob?
- 你能行吗?
- javabean连接数据库?
- 求WEBSERVICE的实例
- String到Class类型怎么样转换?希望尽快帮我解决.
- 在myeclipse中用struts tomcat 出现这个信息: Internal Error: File /WEB-INF/web.xml not found?
- 关于weblogic中连接池的问题
- SpringSecurity自定义过滤器之后Session会话控制失效!!求大神指点
- oracle触发器调用java代码出错,求助!!
- spring事务问题,请大牛围观
使用jsoup模拟document代码如下:
js代码:
function test(document) {
var h = document.getElementById('container');
return h+"test";
}java代码:
public static void main(String[] args) {
// 创建空页面
Document doc = Document.createShell(""); Element body = doc.body();
body.append("<div id=\"container\" style=\"width:480px; height:100px;\"></div>"); ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("javascript");
FileReader reader = null; try {
reader = new FileReader("src/demo.js");
engine.eval(reader);
if (engine instanceof Invocable) {
Invocable invoke = (Invocable) engine;
Object obj = invoke.invokeFunction("test", doc);
System.out.println(obj.toString());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}运行结果如下:
<div id="container" style="width:480px; height:100px;"></div>test