实践探索:桌面版和移动版Chrome浏览器中的window对象各有什么特有属性.

工具介绍:

Chrome移动版(android 4.3)

Chrome桌面版(LinuxMint 15)

在线文档工具: notepad.cc 

在线文档工具: Channely.github.io/js_console

过程介绍:

首先通过代码:

1.

分别在桌面版和移动版的chrome浏览器上打开 notepad.cc/20140825 和 Channely.github.io/js_console两个页面

在桌面网页notepad.cc/20140825中敲入下列代码:

var i=[];
function findVulnerableObject(){
	for(var num in window){
		try{
			window[num].getClass();
			alert(num);
			return window[num];
		}
		catch(err){
			i.push(num)
		}
	}
	console.log(JSON.stringify(i));
	return null;
}
findVulnerableObject();

将上面代码分别在两个浏览器的 js_console页面中运行

将window对象属性值的数组分别记录下来,

将移动浏览器的结果存放到 notepad.cc/20140824 将结果赋值给 var array_1;

将移动浏览器的结果存放到 notepad.cc/20140828 将结果赋值给 var array_2;

2.

将以上两页结果在浏览器中存于新的页面 notepad.cc/20140827

并加入以下代码

var x=0;
for(var i =0;i<array_1.length;i++){
	var y=0;
	for(var j =0;j<array_2.length;j++){
		if(array_1[i]!=array_2[j]){
			y++;
		}
	}
	if(y == array_2.length){
		x++;
		console.log('array_1 has ++++> '+array_1[i])
	}
}
console.log("diff num ---->"+x);

并将本页所有代码在js_console 页面运行

记录所得结果到 http://notepad.cc/20140829

3.

交换array_1 和 array_2的值,

再次进行运算

再次记录所得结果到 http://notepad.cc/20140829

4.

观察可知

DeskChrome window special key:动画属性

array_2 has ++++> jQuery1111021986535703763366
array_2 has ++++> onanimationstart
array_2 has ++++> onanimationiteration
array_2 has ++++> onanimationend

diff num ---->4


MobileChrome window special key:手势属性

array_1 has ++++> jQuery1111007801071531139314
array_1 has ++++> orientation
array_1 has ++++> onautocompleteerror
array_1 has ++++> onautocomplete
array_1 has ++++> ontouchstart
array_1 has ++++> ontouchmove
array_1 has ++++> ontouchend
array_1 has ++++> ontouchcancel
array_1 has ++++> onorientationchange
array_1 has ++++> ontoggle

diff num ---->10

转载于:https://my.oschina.net/coderman/blog/305928

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值