mirror of
https://git.oceanpay.cc/danial/kami_ticket_slide_server.git
synced 2025-12-18 22:42:40 +00:00
1317 lines
50 KiB
JavaScript
1317 lines
50 KiB
JavaScript
window = global;
|
||
|
||
// 全局存储器
|
||
memory = {
|
||
'setProxy': false, // 是否进行代理(代理的对象是补的环境对象的每一个对象)
|
||
'setLog':true, // 是否输出 set捕获的日志
|
||
'getLog': true, // 是否输出 get捕获的日志
|
||
'setDebugger': false, // 是否断点 set捕获
|
||
'getDebugger':false, // 是否断点 get捕获
|
||
'funTostringDebugger':false, // 函数tostring检测 正常代码谁toString啊
|
||
'callFunDebugger': true, // 调用了补的函数是否断点
|
||
'node':[], // 存放运行中window的undefined变量 最后直接去node遍历里面输出是否undefined 突破node检测
|
||
'nodes':{}, // 存放undefined
|
||
'order':0, // 日志的输出排序号码 (便于查看位置)
|
||
'log':0, // 插桩输出序号定位
|
||
'passOrder':0 , // 跳过低于这个序号的代理断点
|
||
'random':0.5, // hook随机数
|
||
'timestamp': false, // hooks时间戳
|
||
'data':{}, // 存放本地模拟的对象
|
||
'cookies': {}, // 存放cookie
|
||
'EventListener':{}, // 存放事件
|
||
'attachEvent': {}, // 存放事件
|
||
'create_element': {}, // 存放创建dom的元素方法
|
||
'objects': {}, // 存放一些对象
|
||
'domElement' : {'body':{}}, // 存放html的dom层级关系
|
||
'promise':{},
|
||
'tree':{},
|
||
};
|
||
|
||
// 突破node检测 应用在python的execjs
|
||
memory.delete = function(obj,prop){delete prop || Object.defineProperty(obj,prop, {get:function() {return undefined;}})};
|
||
node_obj = ['global']; // 这里用上面的node 在最后运行代码结束时拿出来node填充的进行替换 在vm2运行这个不用搞
|
||
node_obj.map((x)=>{memory.delete(window,x)});
|
||
|
||
if(memory.random){Math.random = function(){return memory.random}}
|
||
if(memory.timestamp){Date.prototype.getTime = function (){return memory.timestamp}}
|
||
|
||
// 调用后给对象挂上代理
|
||
memory.proxy = function(name){
|
||
let paramObj = memory.data[name] || window[name]
|
||
if(memory.setProxy == false)return paramObj
|
||
const handler1 = {
|
||
set(obj, prop, value) {
|
||
if(memory.setLog){
|
||
if(typeof(value) == 'function'){
|
||
zhi = 'function'
|
||
}else{
|
||
zhi = obj[prop]
|
||
}
|
||
console.log('方法 : set\t序号 : '+ (++memory.order) + '\t对象 : '+obj.SHENzhi + '\t属性 : ',prop,'\t值 : ',value)
|
||
}
|
||
if(memory.setDebugger && memory.passOrder<=memory.order){debugger}
|
||
return Reflect.set(...arguments)
|
||
},
|
||
get(obj, prop){
|
||
if(obj.SHENzhi=='window'){return obj[prop]}
|
||
if(memory.getLog){
|
||
if(typeof(obj[prop]) == 'function'){
|
||
zhi = 'function'
|
||
}else{
|
||
zhi = obj[prop]
|
||
}
|
||
console.log('方法 : get\t序号 : ' + (++memory.order) + '\t对象 : ' + obj.SHENzhi + '\t属性 : ' , prop ,'\t值 : ', zhi)
|
||
}
|
||
if(obj.SHENzhi=='window' && obj[prop]==undefined){memory.node.push(prop)};
|
||
if(obj[prop]==undefined){memory.nodes[obj.SHENzhi]? memory.nodes[obj.SHENzhi].push(prop):memory.nodes[obj.SHENzhi]=[],memory.nodes[obj.SHENzhi].push(prop)}
|
||
if(memory.getDebugger && memory.passOrder<=memory.order){debugger}
|
||
return obj[prop]
|
||
|
||
}};
|
||
return new Proxy(paramObj, handler1);
|
||
};
|
||
|
||
|
||
// 调用后方法tostring保护
|
||
memory.protect = (function() {
|
||
"use strict";
|
||
//原函数
|
||
const $toString = Function.toString;
|
||
const myFunction_toString_symbol = Symbol('('.concat('',')_',(Math.random() + '').toString(36)));
|
||
//自定义函数
|
||
const myTostring = function(){
|
||
if(memory.funTostringDebugger){debugger}
|
||
|
||
// return '=this;=this,=module;=module,arguments'
|
||
return typeof this == 'function' && this[myFunction_toString_symbol] || $toString.call(this);
|
||
};
|
||
function set_native(func,key,value){
|
||
Object.defineProperty(func,key,{
|
||
"enumerable":false,
|
||
"configurable":true,
|
||
"writable":true,
|
||
"value":value
|
||
})
|
||
}
|
||
delete Function.prototype['toString']; //删除原型是toString
|
||
set_native(Function.prototype,"toString",myTostring);
|
||
set_native(Function.prototype.toString,myFunction_toString_symbol,"function toString() { [native code] }");
|
||
function protect(func){
|
||
if(typeof(func) == 'function'){
|
||
set_native(func,myFunction_toString_symbol,'function '+func.name+'() { [native code] }')
|
||
|
||
}};
|
||
return protect
|
||
})();
|
||
|
||
// 调用后对象的名字改变
|
||
memory.rename = function (target,name){
|
||
Object.defineProperties(target,{
|
||
[Symbol.toStringTag]:{
|
||
value:name,
|
||
configurable:true
|
||
}
|
||
})
|
||
};
|
||
|
||
// 设置对象为不可枚举 模拟浏览器的那些灰色暗淡的变量名
|
||
memory.NO_enumerable = function(obj,pro){
|
||
Object.defineProperty(obj,pro,{
|
||
enumerable:false
|
||
})
|
||
};
|
||
|
||
// 调用后组成对象原型链
|
||
memory.make_chain = function(target,obj){
|
||
let fff;
|
||
if(obj){
|
||
first = obj;
|
||
fff = 0;
|
||
memory.rename(obj,target[0])
|
||
}else{
|
||
firstName = target[0]
|
||
first = memory.data[firstName] || window[firstName] || memory.create_element[firstName];
|
||
first.SHENzhi = firstName;
|
||
memory.rename(first,target[1]); //先把对象的名字改变 如: window的名字为 Window
|
||
fff = 1
|
||
}
|
||
first.chain = target;
|
||
for(let i=0;i<target.length-1;i++){
|
||
let nextName = target[i + fff];
|
||
let second = window[nextName] || memory.data[nextName];
|
||
// 要么对象构造 要么函数构造
|
||
if(typeof second == "object"){
|
||
memory.rename(second,nextName);
|
||
first.__proto__ = second;
|
||
}else if(typeof second == "function"){
|
||
memory.rename(second.prototype,nextName);
|
||
first.__proto__ = second.prototype;
|
||
}else{
|
||
// 这种情况只能是获取到的是 undefined
|
||
throw new TypeError('原型链的组成时没有在全局window或者全局缓存找到该变量:'+nextName);
|
||
}
|
||
first = first.__proto__;
|
||
}
|
||
};
|
||
|
||
// 调用后会创建一个挂了代理的对象
|
||
memory.createProxyObject = function(name,obj){
|
||
if(obj){
|
||
memory.data[name] = obj;
|
||
}else{
|
||
memory.data[name] = {};
|
||
}
|
||
memory.data[name].SHENzhi = name;
|
||
memory.rename(memory.data[name],name)
|
||
return memory.proxy(name)
|
||
}
|
||
|
||
// 深拷贝
|
||
memory.deepCopy = function deepCopy(p, c) {
|
||
var c = c || {};
|
||
for (var i in p) {
|
||
if (typeof p[i] === 'object') {
|
||
c[i] = (p[i].constructor === Array) ? [] : {};
|
||
deepCopy(p[i], c[i]);
|
||
} else {
|
||
c[i] = p[i];
|
||
}
|
||
};
|
||
memory.make_chain(p.chain,c)
|
||
return c;
|
||
};
|
||
|
||
|
||
// 浅拷贝
|
||
memory.extendCopy = function extendCopy(p) {
|
||
var c = {};
|
||
for (var i in p) {
|
||
c[i] = p[i];
|
||
}
|
||
c.uber = p;
|
||
memory.make_chain(p.chain,c);
|
||
return c;
|
||
};
|
||
|
||
|
||
// dom标签构建
|
||
memory.domStr = function domStr(x){
|
||
let zhi = '<'+x.SHENzhi;
|
||
if(x.class){
|
||
zhi += ' class="'+x.class+'"'
|
||
}
|
||
if(x.id && x.id != "50000000"){
|
||
zhi += ' id="'+x.id+'"'
|
||
}
|
||
if(x.content){
|
||
zhi += x.content;
|
||
}
|
||
zhi += '>'
|
||
|
||
if(x.childNodes && x.childNodes.length){
|
||
for(let sx of x.childNodes){
|
||
zhi += domStr(sx);
|
||
}
|
||
};
|
||
zhi += '</'+x.SHENzhi+'>';
|
||
if(x.siblingNode && x.siblingNode.length){
|
||
for(let sx of x.siblingNode){
|
||
zhi += domStr(sx);
|
||
}
|
||
};
|
||
return zhi;
|
||
};
|
||
|
||
|
||
memory.domForObj = function domForObj(a,y){
|
||
for(let x of a.childNodes){
|
||
if(x.id == y){
|
||
return x
|
||
}
|
||
if(x.childNodes.length>0){
|
||
let zhi = domForObj(x,y)
|
||
if(zhi){
|
||
return zhi
|
||
}
|
||
}
|
||
|
||
}
|
||
};
|
||
|
||
memory.domForObj_2 = function domForObj(a,y){
|
||
for(let x of a.childNodes){
|
||
if(x == y){
|
||
return a
|
||
}
|
||
if(x.childNodes.length>0){
|
||
let zhi = domForObj(x,y)
|
||
if(zhi){
|
||
return zhi
|
||
}
|
||
}
|
||
|
||
}
|
||
};
|
||
;
|
||
memory.objects.RTCPeerConnection = memory.createProxyObject('RTCPeerConnection');
|
||
|
||
memory.objects.RTCPeerConnection.localDescription = {
|
||
"sdp":"v=0\r\no=- 627758748607417531 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS\r\nm=application 1961 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 117.152.145.34\r\na=candidate:3539891574 1 udp 2113937151 a3198269-2c6e-4adc-828e-b7f9c949277d.local 49812 typ host generation 0 network-cost 999\r\na=candidate:842163049 1 udp 1677729535 117.152.145.34 1961 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999\r\na=ice-ufrag:/CYr\r\na=ice-pwd:QRs0Mo7A0ouqDBYDlcvDSjPQ\r\na=ice-options:trickle\r\na=fingerprint:sha-256 BC:AC:D1:9B:EC:2F:F1:47:B5:EF:6D:2F:1A:E3:B6:9F:2B:76:07:CF:32:90:9F:B0:33:A6:90:63:F9:25:45:59\r\na=setup:actpass\r\na=mid:0\r\na=sctp-port:5000\r\na=max-message-size:262144\r\n",
|
||
"type":"offer"
|
||
};
|
||
memory.objects.RTCPeerConnection.createDataChannel = function createDataChannel(x){
|
||
return memory.createProxyObject(x)
|
||
};memory.protect(memory.objects.RTCPeerConnection.createDataChannel);
|
||
|
||
memory.objects.RTCPeerConnection.createOffer = function createOffer(x){
|
||
return {
|
||
'candidate':{
|
||
address: "a3198269-2c6e-4adc-828e-b7f9c949277d.local",
|
||
candidate: "candidate:3539891574 1 udp 2113937151 a3198269-2c6e-4adc-828e-b7f9c949277d.local 55154 typ host generation 0 ufrag gcmS network-cost 999",
|
||
component: "rtp",
|
||
foundation: "3539891574",
|
||
port: 55154,
|
||
priority: 2113937151,
|
||
protocol: "udp",
|
||
relatedAddress: null,
|
||
relatedPort: null,
|
||
sdpMLineIndex: 0,
|
||
sdpMid: "0",
|
||
tcpType: "",
|
||
type: "host",
|
||
usernameFragment: "gcmS",
|
||
},
|
||
'then':function(x){
|
||
memory.promise['3'] = x;
|
||
return memory.createProxyObject('createOffer');
|
||
}
|
||
}
|
||
};memory.protect(memory.objects.RTCPeerConnection.createOffer);
|
||
|
||
memory.objects.RTCPeerConnection.setLocalDescription = function setLocalDescription(x){
|
||
return {'then':function(){debugger}}
|
||
|
||
};memory.protect(memory.objects.RTCPeerConnection.setLocalDescription);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
;
|
||
window.length = 0; //内嵌了页面frame
|
||
|
||
window.onmessage = null;
|
||
window.outerHeight = 864;
|
||
window.innerHeight = 360;
|
||
window.outerWidth = 1474;
|
||
window.innerWidth = 360;
|
||
// window.name = "https://turing.captcha.qcloud.com"
|
||
window.name = ""
|
||
window.performance = memory.createProxyObject('performance');
|
||
window.indexedDB = {
|
||
|
||
};
|
||
window.indexedDB.open = function open(){
|
||
return memory.createProxyObject('IDBFactory')
|
||
};memory.protect(window.indexedDB.open);
|
||
|
||
window.chrome = memory.createProxyObject('chrome');
|
||
window.chrome.runtime = memory.createProxyObject('chrome_runtime');
|
||
|
||
window.clientInformation = {
|
||
appCodeName: "Mozilla",
|
||
appName: "Netscape",
|
||
appVersion: "5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
|
||
bluetooth: memory.createProxyObject('bluetooth'),
|
||
clipboard: memory.createProxyObject('clipboard'),
|
||
cookieEnabled: true,
|
||
deviceMemory: 8,
|
||
hardwareConcurrency: 12,
|
||
keyboard: memory.createProxyObject('keyboard'),
|
||
language: "zh-CN",
|
||
languages: ["zh-CN","zh"],
|
||
locks: memory.createProxyObject('locks'),
|
||
onLine: true,
|
||
platform: "Win32",
|
||
product: "Gecko",
|
||
productSub: "20030107",
|
||
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWeb…KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
|
||
vendor: "Google Inc.",
|
||
vendorSub: "",
|
||
wakeLock:memory.createProxyObject('wakeLock'),
|
||
usb:memory.createProxyObject('usb')
|
||
};memory.proxy('clientInformation')
|
||
|
||
|
||
|
||
window.openDatabase = function openDatabase(){
|
||
if(memory.callFunDebugger){debugger}
|
||
return {version: "",transaction:function(){}}
|
||
};memory.protect(window.openDatabase);
|
||
|
||
|
||
window.FileReader = function FileReader(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.FileReader);
|
||
|
||
window.webkitRequestFileSystem = function(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.webkitRequestFileSystem);
|
||
|
||
window.SpeechSynthesisUtterance = function SpeechSynthesisUtterance(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.SpeechSynthesisUtterance);
|
||
|
||
|
||
|
||
window.MediaEncryptedEvent = function MediaEncryptedEvent(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.MediaEncryptedEvent);
|
||
|
||
|
||
window.open = function open(method,url){
|
||
if(memory.callFunDebugger){debugger}
|
||
return url
|
||
};memory.protect(window.open);
|
||
|
||
window.DOMParser = function DOMParser(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.DOMParser);
|
||
|
||
window.XMLHttpRequest = function XMLHttpRequest(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.XMLHttpRequest);
|
||
|
||
window.XMLHttpRequest.prototype.open = function(){
|
||
if(memory.callFunDebugger){debugger}
|
||
return arguments[1]
|
||
};memory.protect(window.XMLHttpRequest.prototype.open);
|
||
|
||
window.fetch = function fetch(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.fetch );
|
||
|
||
window.Request = function Request(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.Request);
|
||
|
||
window.SourceBuffer = function SourceBuffer(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.SourceBuffer);
|
||
|
||
window.ScreenOrientation = function ScreenOrientation(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.ScreenOrientation);
|
||
|
||
window.Path2D = function Path2D(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.Path2D);
|
||
|
||
window.HTMLFrameSetElement = function HTMLFrameSetElement(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.HTMLFrameSetElement);
|
||
|
||
window.CDATASection = function CDATASection(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.CDATASection);
|
||
|
||
window.SVGGraphicsElement = function SVGGraphicsElement(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.SVGGraphicsElement);
|
||
|
||
window.PerformancePaintTiming = function PerformancePaintTiming(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.PerformancePaintTiming);
|
||
|
||
|
||
|
||
window.atob = function atob(s) {
|
||
var base64hash = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||
s = s.replace(/\s|=/g, '');
|
||
var cur,
|
||
prev,
|
||
mod,
|
||
i = 0,
|
||
result = [];
|
||
while (i < s.length) {
|
||
cur = base64hash.indexOf(s.charAt(i));
|
||
mod = i % 4;
|
||
switch (mod) {
|
||
case 0:
|
||
//TODO
|
||
break;
|
||
case 1:
|
||
result.push(String.fromCharCode(prev << 2 | cur >> 4));
|
||
break;
|
||
case 2:
|
||
result.push(String.fromCharCode((prev & 0x0f) << 4 | cur >> 2));
|
||
break;
|
||
case 3:
|
||
result.push(String.fromCharCode((prev & 3) << 6 | cur));
|
||
break;
|
||
}
|
||
prev = cur;
|
||
i ++;
|
||
}
|
||
return result.join('');
|
||
};memory.protect(window.atob);
|
||
window.btoa = function btoa(s) {
|
||
var base64hash = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||
if (/([^\u0000-\u00ff])/.test(s)) {
|
||
throw new Error('INVALID_CHARACTER_ERR');
|
||
}
|
||
var i = 0,
|
||
prev,
|
||
ascii,
|
||
mod,
|
||
result = [];
|
||
while (i < s.length) {
|
||
ascii = s.charCodeAt(i);
|
||
mod = i % 3;
|
||
switch(mod) {
|
||
// 第一个6位只需要让8位二进制右移两位
|
||
case 0:
|
||
result.push(base64hash.charAt(ascii >> 2));
|
||
break;
|
||
//第二个6位 = 第一个8位的后两位 + 第二个8位的前4位
|
||
case 1:
|
||
result.push(base64hash.charAt((prev & 3) << 4 | (ascii >> 4)));
|
||
break;
|
||
//第三个6位 = 第二个8位的后4位 + 第三个8位的前2位
|
||
//第4个6位 = 第三个8位的后6位
|
||
case 2:
|
||
result.push(base64hash.charAt((prev & 0x0f) << 2 | (ascii >> 6)));
|
||
result.push(base64hash.charAt(ascii & 0x3f));
|
||
break;
|
||
}
|
||
prev = ascii;
|
||
i ++;
|
||
}
|
||
// 循环结束后看mod, 为0 证明需补3个6位,第一个为最后一个8位的最后两位后面补4个0。另外两个6位对应的是异常的“=”;
|
||
// mod为1,证明还需补两个6位,一个是最后一个8位的后4位补两个0,另一个对应异常的“=”
|
||
if(mod == 0) {
|
||
result.push(base64hash.charAt((prev & 3) << 4));
|
||
result.push('==');
|
||
} else if (mod == 1) {
|
||
result.push(base64hash.charAt((prev & 0x0f) << 2));
|
||
result.push('=');
|
||
}
|
||
return result.join('');
|
||
};memory.protect(window.btoa);
|
||
|
||
|
||
window.alert = function alert(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.alert);
|
||
window.setInterval = function setInterval(x){
|
||
memory.promise['2'] = x;
|
||
return 1
|
||
};memory.protect(window.setInterval);
|
||
window.clearInterval = function clearInterval(){
|
||
};memory.protect(window.clearInterval);
|
||
window.setTimeout = function setTimeout(x){
|
||
memory.promise['1'] = x;
|
||
return 1
|
||
};memory.protect(window.setTimeout);
|
||
window.clearTimeout = function clearTimeout(){
|
||
|
||
};memory.protect(window.clearTimeout);
|
||
|
||
|
||
eval_ = eval;
|
||
eval = function eval(x){
|
||
return eval_(x)
|
||
};memory.protect(eval);
|
||
|
||
window.HTMLFormElement = function HTMLFormElement(){
|
||
if(memory.callFunDebugger){debugger}
|
||
};memory.protect(window.HTMLFormElement);
|
||
|
||
|
||
// 查看ip信息
|
||
window.RTCPeerConnection = function RTCPeerConnection(x){
|
||
return memory.objects.RTCPeerConnection
|
||
};memory.protect(window.RTCPeerConnection);
|
||
|
||
|
||
window.matchMedia = function matchMedia(x){
|
||
return {'matches':true}
|
||
};memory.protect(window.matchMedia);
|
||
|
||
window.CSS = function CSS(x){
|
||
debugger
|
||
return {}
|
||
};memory.protect(window.CSS);
|
||
|
||
|
||
window.CSS.supports = function supports(x){
|
||
return true
|
||
};memory.protect(window.CSS.supports);
|
||
|
||
window.customElements = memory.createProxyObject('customElements')
|
||
|
||
window.CSSStyleSheet = {};
|
||
window.CSSStyleSheet.cssRules = [{cssText: "::marker { }"}]
|
||
|
||
col = ['rgb(0, 128, 0)', 'rgb(255, 0, 0)', 'rgb(0, 0, 0)', 'rgb(255, 0, 0)', 'rgb(0, 0, 255)', 'rgb(255, 0, 0)']
|
||
window.getComputedStyle = function getComputedStyle(){
|
||
let obj = memory.createProxyObject('CSSStyleDeclaration');
|
||
obj.getPropertyValue = function(x){
|
||
if('color'==x){
|
||
return col.shift()
|
||
}
|
||
}
|
||
return obj
|
||
};memory.protect(window.getComputedStyle);
|
||
|
||
|
||
window.SyncManager = function SyncManager(x){
|
||
return true
|
||
};memory.protect(window.SyncManager);
|
||
|
||
window.RTCPeerConnectionIceEvent = function RTCPeerConnectionIceEvent(){
|
||
debugger
|
||
};memory.protect(window.RTCPeerConnectionIceEvent);
|
||
Window = function Window(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Window);
|
||
|
||
Window.prototype.TEMPORARY = 0;
|
||
Window.prototype.PERSISTENT = 1;
|
||
memory.data.WindowProperties = {};
|
||
EventTarget = function EventTarget(){};memory.protect(EventTarget);
|
||
|
||
|
||
|
||
|
||
EventTarget.prototype.addEventListener = function addEventListener(x,y){
|
||
memory.EventListener[x] ? memory.EventListener[x].push(y) : memory.EventListener[x] = [y]
|
||
};memory.protect(EventTarget.prototype.addEventListener);
|
||
Node = function Node(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Node);
|
||
|
||
|
||
Node.prototype.appendChild = function appendChild(newNode){
|
||
if(this.SHENzhi == 'body' || this.SHENzhi == 'head'){
|
||
document.childNodes.push(this);
|
||
}
|
||
if(newNode.parentNode){
|
||
newNode.parentNode.removeChild(newNode);
|
||
newNode.parentNode = undefined;
|
||
}
|
||
if(this == newNode || this == newNode.parentNode){
|
||
return newNode
|
||
}
|
||
if(!this.childNodes.some((x)=>{return x==newNode})){
|
||
this.childNodes.push(newNode);
|
||
newNode.parentNode = this;
|
||
}
|
||
return newNode;
|
||
};memory.protect(Node.prototype.appendChild);
|
||
|
||
|
||
Node.prototype.removeChild = function removeChild(child){
|
||
let index = this.childNodes.indexOf(child);
|
||
if(index != -1){
|
||
this.childNodes.splice(index,1);
|
||
child.parentNode = undefined;
|
||
}
|
||
return child
|
||
};memory.protect(Node.prototype.removeChild);
|
||
|
||
|
||
Node.prototype.replaceChild = function replaceChild(newChild, oldChild){
|
||
if(newChild==oldChild){
|
||
return oldChild
|
||
}
|
||
if(this.childNodes.some((x)=>{return x==newChild})){
|
||
this.childNodes.splice(this.childNodes.indexOf(newChild),1)
|
||
}
|
||
for(let i=0; i<this.childNodes.length; i++){
|
||
if(oldChild == this.childNodes[i]){
|
||
this.childNodes[i] = newChild;
|
||
return oldChild
|
||
}
|
||
}
|
||
};memory.protect(Node.prototype.replaceChild);
|
||
|
||
|
||
Node.prototype.cloneNode = function cloneNode(x){
|
||
if(x){
|
||
return memory.extendCopy(this);
|
||
}else{
|
||
zhi = memory.extendCopy(this);
|
||
zhi.childNodes = []
|
||
return zhi
|
||
}
|
||
};memory.protect(Node.prototype.cloneNode);
|
||
|
||
|
||
Node.prototype.insertBefore = function insertBefore(newNode, referenceNode){
|
||
if(this.childNodes.some((x)=>{return x==newNode})){
|
||
this.childNodes.splice(this.childNodes.indexOf(newNode),1)
|
||
for(let i=0; i<this.childNodes.length; i++){
|
||
if(referenceNode == this.childNodes[i]){
|
||
this.childNodes.splice(i++,0,newNode)
|
||
}
|
||
}
|
||
}else{
|
||
this.childNodes.push(newNode)
|
||
};
|
||
return newNode
|
||
};memory.protect(Node.prototype.insertBefore);
|
||
|
||
|
||
HTMLElement = function HTMLElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLElement);
|
||
Element = function Element(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Element);
|
||
|
||
|
||
Element.prototype.setAttribute = function setAttribute(key,val){
|
||
this[key] = val;
|
||
};memory.protect(Element.prototype.setAttribute);
|
||
|
||
Element.prototype.removeAttribute = function removeAttribute(key){
|
||
delete this[key]
|
||
};memory.protect(Element.prototype.removeAttribute);
|
||
|
||
|
||
Object.defineProperty(Element.prototype, 'outerHTML', {
|
||
get: function(){
|
||
let zhi = '<'+this.SHENzhi;
|
||
if(this.class){
|
||
zhi += ' class="'+this.class+'"'
|
||
}
|
||
if(this.id && this.id != "50000000"){
|
||
zhi += ' id="'+this.id+'"'
|
||
}
|
||
if(this.content){
|
||
zhi += this.content;
|
||
}
|
||
zhi += '>'
|
||
if(this.childNodes && this.childNodes.length>0){
|
||
for(let x of this.childNodes){
|
||
zhi += memory.domStr(x,this)
|
||
}
|
||
}
|
||
zhi += '</'+this.SHENzhi+'>';
|
||
return zhi
|
||
}}
|
||
);
|
||
|
||
Object.defineProperty(Element.prototype, 'innerHTML', {
|
||
get: function(){
|
||
if(this.childNodes && this.childNodes.length>0){
|
||
zhi = ''
|
||
for(let x of this.childNodes){
|
||
zhi += memory.domStr(x,this)
|
||
}
|
||
return zhi
|
||
}
|
||
return null
|
||
}}
|
||
);
|
||
HTMLDocument = function HTMLDocument(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLDocument);
|
||
|
||
|
||
Document = function Document(){
|
||
|
||
};memory.protect(Document);
|
||
|
||
create_count = 0
|
||
Document.prototype.createElement = function createElement(tag){
|
||
let zhi;
|
||
create_count += 1
|
||
if(tag=='canvas'){
|
||
zhi = memory.create_element.create_canvas();
|
||
}
|
||
else if(tag=='iframe'){
|
||
zhi = memory.create_element.create_iframe();
|
||
}
|
||
else if(tag=='div'){
|
||
zhi = memory.create_element.create_div();
|
||
}
|
||
else if(tag=='span'){
|
||
zhi = memory.create_element.create_span();
|
||
}
|
||
else if(tag=='p'){
|
||
zhi = memory.create_element.create_p();
|
||
}
|
||
else if(tag=='style'){
|
||
zhi = memory.create_element.create_style();
|
||
}
|
||
else if(tag=='a'){
|
||
zhi = memory.create_element.create_a();
|
||
}
|
||
else if(tag == 'h1'){
|
||
zhi = memory.create_element.create_h1();
|
||
}
|
||
else if(tag=='li'){
|
||
zhi = memory.create_element.create_li()
|
||
}
|
||
else{
|
||
zhi = memory.create_element.create_other(tag);
|
||
}
|
||
zhi.order = create_count;
|
||
return zhi
|
||
};memory.protect(Document.prototype.createElement);
|
||
|
||
|
||
|
||
|
||
Document.prototype.getElementById = function getElementById(tag){
|
||
return memory.domForObj(document,tag)
|
||
};memory.protect(Document.prototype.getElementById);
|
||
|
||
|
||
Document.prototype.getElementsByClassName = function getElementsByClassName(tag){
|
||
|
||
};memory.protect(Document.prototype.getElementsByClassName);
|
||
|
||
|
||
Document.prototype.getElementsByTagName = function getElementsByTagName(tag){
|
||
|
||
};memory.protect(Document.prototype.getElementsByTagName);
|
||
|
||
|
||
Document.prototype.exitFullscreen = function exitFullscreen(){
|
||
|
||
};memory.protect(Document.prototype.exitFullscreen);
|
||
|
||
|
||
|
||
|
||
memory.create_element.create_document = function(){
|
||
let obj = memory.createProxyObject('document');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLDocument','Document','Node','EventTarget'],obj);
|
||
|
||
obj.head = memory.create_element.create_head();
|
||
obj.body = memory.create_element.create_body();
|
||
|
||
let v = memory.create_element.create_video();
|
||
v.id = 'preview'
|
||
obj.appendChild(v);
|
||
|
||
obj.appendChild(obj.head);
|
||
obj.appendChild(obj.body);
|
||
return obj
|
||
};
|
||
;
|
||
memory.objects.webgl = memory.createProxyObject('WebGLRenderingContext');
|
||
|
||
memory.objects.webgl.drawingBufferHeight = 150;
|
||
memory.objects.webgl.drawingBufferWidth = 300;
|
||
|
||
|
||
memory.objects.webgl.getSupportedExtensions = function getSupportedExtensions(){
|
||
//每个电脑不一样
|
||
return ['ANGLE_instanced_arrays', 'EXT_blend_minmax', 'EXT_clip_control', 'EXT_color_buffer_half_float', 'EXT_depth_clamp', 'EXT_disjoint_timer_query', 'EXT_float_blend', 'EXT_frag_depth', 'EXT_polygon_offset_clamp', 'EXT_shader_texture_lod', 'EXT_texture_compression_bptc', 'EXT_texture_compression_rgtc', 'EXT_texture_filter_anisotropic', 'EXT_texture_mirror_clamp_to_edge', 'EXT_sRGB', 'KHR_parallel_shader_compile', 'OES_element_index_uint', 'OES_fbo_render_mipmap', 'OES_standard_derivatives', 'OES_texture_float', 'OES_texture_float_linear', 'OES_texture_half_float', 'OES_texture_half_float_linear', 'OES_vertex_array_object', 'WEBGL_blend_func_extended', 'WEBGL_color_buffer_float', 'WEBGL_compressed_texture_s3tc', 'WEBGL_compressed_texture_s3tc_srgb', 'WEBGL_debug_renderer_info', 'WEBGL_debug_shaders', 'WEBGL_depth_texture', 'WEBGL_draw_buffers', 'WEBGL_lose_context', 'WEBGL_multi_draw', 'WEBGL_polygon_mode']
|
||
};memory.protect(memory.objects.webgl.getSupportedExtensions);
|
||
|
||
memory.objects.webgl.getExtension = function getExtension(x){
|
||
if(x=='WEBGL_debug_renderer_info'){
|
||
return {
|
||
UNMASKED_RENDERER_WEBGL: 37446,
|
||
UNMASKED_VENDOR_WEBGL: 37445
|
||
}
|
||
}
|
||
};memory.protect(memory.objects.webgl.getExtension);
|
||
|
||
memory.objects.webgl.getParameter = function getParameter(x){
|
||
if(x==37445){
|
||
return "Google Inc. (Intel)"
|
||
}
|
||
else if(x==37446){
|
||
return "ANGLE (Intel, Intel(R) Iris(R) Xe Graphics (0x00009A49) Direct3D11 vs_5_0 ps_5_0, D3D11)"
|
||
}
|
||
};memory.protect(memory.objects.webgl.getParameter);
|
||
;
|
||
memory.objects.CanvasRenderingContext2D = memory.createProxyObject('CanvasRenderingContext2D');
|
||
|
||
memory.objects.CanvasRenderingContext2D.fillRect = function fillRect(){
|
||
return memory.createProxyObject('fillRect')
|
||
};memory.protect(memory.objects.CanvasRenderingContext2D.fillRect);
|
||
|
||
memory.objects.CanvasRenderingContext2D.fillText = function fillText(){
|
||
return memory.createProxyObject('fillText')
|
||
};memory.protect(memory.objects.CanvasRenderingContext2D.fillText);
|
||
|
||
;
|
||
HTMLCanvasElement = function HTMLCanvasElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLCanvasElement);
|
||
|
||
|
||
HTMLCanvasElement.prototype.getContext = function getContext(x){
|
||
return memory.objects[x]
|
||
};memory.protect(HTMLCanvasElement.prototype.getContext);
|
||
|
||
HTMLCanvasElement.prototype.captureStream = function captureStream(x){
|
||
return true
|
||
};memory.protect(HTMLCanvasElement.prototype.captureStream);
|
||
memory.create_element.create_canvas = function(){
|
||
let obj = memory.createProxyObject('canvas');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
obj.getContext = function getContext(x){
|
||
if(x=='webgl'){
|
||
return memory.objects.webgl
|
||
}
|
||
else if(x=='2d'){
|
||
return memory.objects.CanvasRenderingContext2D
|
||
}
|
||
};memory.protect(obj.getContext);
|
||
obj.toDataURL = function toDataURL(){
|
||
//每个电脑不一样
|
||
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAAE7lJ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kgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkIUFjSpIqBkgAJUFisARIgAWkI/B/AAJ8P9Hrw4gAAAABJRU5ErkJggg==";
|
||
};memory.protect(obj.toDataURL)
|
||
|
||
memory.make_chain(['HTMLCanvasElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
}
|
||
;
|
||
HTMLAnchorElement = function HTMLAnchorElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLAnchorElement);
|
||
memory.create_element.create_a = function(){
|
||
let obj = memory.createProxyObject('a');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLAnchorElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
|
||
;
|
||
HTMLHeadElement = function HTMLHeadElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLHeadElement);
|
||
memory.create_element.create_head = function(){
|
||
let obj = memory.createProxyObject('head');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLHeadElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
|
||
|
||
;
|
||
HTMLSpanElement = function HTMLSpanElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLSpanElement);
|
||
memory.create_element.create_span = function(){
|
||
let obj = memory.createProxyObject('span');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLSpanElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
}
|
||
;
|
||
HTMLBodyElement = function HTMLBodyElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLBodyElement);
|
||
memory.create_element.create_body = function(){
|
||
let obj = memory.createProxyObject('body');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLBodyElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
|
||
Document.prototype.body = memory.create_element.create_body();
|
||
|
||
;
|
||
HTMLParagraphElement = function HTMLParagraphElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLParagraphElement);
|
||
memory.create_element.create_p = function(){
|
||
let obj = memory.createProxyObject('p');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLParagraphElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
}
|
||
;
|
||
HTMLDivElement = function HTMLDivElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLDivElement);
|
||
memory.create_element.create_div = function(){
|
||
let obj = memory.createProxyObject('div');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLDivElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
|
||
;
|
||
HTMLIFrameElement = function HTMLIFrameElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLIFrameElement);
|
||
|
||
|
||
memory.create_element.create_iframe = function(){
|
||
let obj = memory.createProxyObject('iframe');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
|
||
obj.contentWindow = {
|
||
'document':memory.create_element.create_document()
|
||
};
|
||
let v = memory.create_element.create_video();
|
||
v.id = 'preview'
|
||
obj.contentWindow.document.appendChild(v)
|
||
|
||
obj.style = {
|
||
'display':'none'
|
||
}
|
||
memory.make_chain(['HTMLIFrameElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
;
|
||
HTMLUnknownElement = function HTMLUnknownElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLUnknownElement);
|
||
|
||
|
||
memory.create_element.create_other = function(x){
|
||
let obj = memory.createProxyObject(x);
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLUnknownElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
;
|
||
HTMLStyleElement = function HTMLStyleElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLStyleElement);
|
||
|
||
|
||
HTMLStyleElement.prototype.remove = function remove(){
|
||
return true
|
||
};memory.protect(HTMLStyleElement.prototype.remove);
|
||
memory.create_element.create_style = function(){
|
||
let obj = memory.createProxyObject('style');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
obj.sheet = {cssRules:[{cssText: "::marker { }"}]};
|
||
|
||
memory.make_chain(['HTMLStyleElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
}
|
||
;
|
||
HTMLHtmlElement = function HTMLHtmlElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLHtmlElement);
|
||
|
||
|
||
memory.create_element.create_html = function(){
|
||
let obj = memory.createProxyObject('html');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLHtmlElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
;
|
||
HTMLMediaElement = function HTMLMediaElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLMediaElement);
|
||
|
||
|
||
HTMLMediaElement.prototype.captureStream = function captureStream(){
|
||
return true
|
||
};memory.protect(HTMLMediaElement.prototype.captureStream);
|
||
HTMLVideoElement = function HTMLVideoElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLVideoElement);
|
||
|
||
memory.create_element.create_video = function(){
|
||
let obj = memory.createProxyObject('video');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
|
||
memory.make_chain(['HTMLVideoElement','HTMLMediaElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
}
|
||
;
|
||
HTMLHeadingElement = function HTMLHeadingElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLHeadingElement);
|
||
memory.create_element.create_h1 = function(){
|
||
let obj = memory.createProxyObject('h1');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLHeadingElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
};
|
||
|
||
;
|
||
HTMLLIElement = function HTMLLIElement(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(HTMLLIElement);
|
||
memory.create_element.create_li = function(){
|
||
let obj = memory.createProxyObject('li');
|
||
obj.childNodes = [];
|
||
obj.siblingNode = [];
|
||
memory.make_chain(['HTMLLIElement','HTMLElement','Element','Node','EventTarget'],obj);
|
||
return obj
|
||
}
|
||
;
|
||
;
|
||
document = memory.create_element.create_document();
|
||
|
||
|
||
document.characterSet = "UTF-8";
|
||
document.charset = "UTF-8";
|
||
document.hidden = false;
|
||
document.visibilityState = "visible";
|
||
|
||
document.createExpression = function createExpression(){
|
||
var obj = memory.createProxyObject('createExpression')
|
||
return obj
|
||
};memory.protect(document.createExpression)
|
||
|
||
navigator = {};
|
||
|
||
navigator.appCodeName = "Mozilla";
|
||
navigator.appName = "Netscape";
|
||
navigator.appVersion = "5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
|
||
navigator.cookieEnabled = true;
|
||
navigator.deviceMemory = 8;
|
||
navigator.appCodeName = "Mozilla";
|
||
navigator.appCodeName = "Mozilla";
|
||
navigator.doNotTrack = null;
|
||
navigator.hardwareConcurrency = 8;
|
||
navigator.language = "zh-CN";
|
||
navigator.onLine = true;
|
||
navigator.pdfViewerEnabled = true;
|
||
navigator.platform = "Win32";
|
||
navigator.product = "Gecko";
|
||
navigator.productSub = "20030107";
|
||
navigator.userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
|
||
navigator.vendor = "Google Inc.";
|
||
navigator.vendorSub = ""
|
||
navigator.languages = ['zh-CN', 'zh', 'en', 'zh-TW']
|
||
navigator.connection = memory.createProxyObject('connection',{
|
||
downlink: 10,
|
||
effectiveType: "4g",
|
||
onchange: null,
|
||
rtt: 100,
|
||
saveData: false,
|
||
type:"wifi"
|
||
});
|
||
|
||
navigator.mimeTypes = memory.createProxyObject('mimeTypes');
|
||
navigator.mimeTypes ['application/x-shockwave-flash'] = memory.createProxyObject('mimeTypes_flash');
|
||
navigator.mimeTypes ['application/x-shockwave-flash'].enabledPlugin = memory.createProxyObject('mimeTypes_flash_enabledPlugin');
|
||
|
||
|
||
navigator.serviceWorker = memory.createProxyObject('serviceWorker')
|
||
Navigator = function(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Navigator);
|
||
|
||
Navigator.prototype.webkitPersistentStorage = {};
|
||
|
||
Navigator.prototype.getBattery = function getBattery(){
|
||
if(memory.callFunDebugger){debugger}
|
||
obj = {then:function(){}}
|
||
return obj
|
||
};memory.protect(Navigator.prototype.getBattery);
|
||
|
||
Navigator.prototype.maxTouchPoints = 0;
|
||
|
||
Navigator.prototype.requestMIDIAccess = function requestMIDIAccess(){
|
||
return true
|
||
};memory.protect(Navigator.prototype.requestMIDIAccess);
|
||
|
||
|
||
|
||
history = {};
|
||
history.length= 2
|
||
history.scrollRestoration= "auto"
|
||
history.state=null
|
||
History = function History(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(History);
|
||
Storage = function Storage(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Storage);
|
||
|
||
Storage.prototype.getItem = function getItem(keyName){
|
||
if(memory.callFunDebugger){debugger}
|
||
return this[keyName] || null
|
||
};memory.protect(Storage.prototype.getItem);
|
||
|
||
Storage.prototype.removeItem = function removeItem(keyName){
|
||
if(memory.callFunDebugger){debugger}
|
||
delete this[keyName]
|
||
};memory.protect(Storage.prototype.removeItem)
|
||
|
||
Storage.prototype.setItem = function setItem(key,value){
|
||
if(memory.callFunDebugger){debugger}
|
||
this[key] = value
|
||
};memory.protect(Storage.prototype.setItem)
|
||
sessionStorage = {};
|
||
localStorage = {
|
||
"TDC_itoken": "1501405626:1703468472",
|
||
"AEGIS_ID": "6aad324b-0b66-4a47-bef5-6d95cf6bd821"
|
||
};
|
||
|
||
memory.make_chain(['sessionStorage','Storage']);
|
||
memory.make_chain(['localStorage','Storage']);
|
||
location = {};
|
||
|
||
location.href = "https://sso.weidian.com/login/index.php?redirect=https%3A%2F%2Fshop978275038.v.weidian.com%2Fdecoration%2Funi-mine%2F%3Fspider_token%3Dcc81%23%2F";
|
||
location.toString = function(){
|
||
if(memory.callFunDebugger){debugger}
|
||
return location.href
|
||
}
|
||
|
||
location.protocol = "https:"; //每个网站不一样
|
||
location.port = '';//每个网站不一样
|
||
location.search = "?redirect=https%3A%2F%2Fshop978275038.v.weidian.com%2Fdecoration%2Funi-mine%2F%3Fspider_token%3Dcc81%23%2F";//每个网站不一样
|
||
location.hash = "";//每个网站不一样
|
||
location.host = "sso.weidian.com"//每个网站不一样
|
||
location.hostname = "sso.weidian.com"//每个网站不一样
|
||
location.origin = "https://sso.weidian.com"//每个网站不一样
|
||
location.pathname = "/login/index.php"//每个网站不一样
|
||
|
||
Location = function Location(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Location);
|
||
screen = {};
|
||
|
||
ScreenOrientation = memory.createProxyObject('ScreenOrientation ');
|
||
Object.assign(ScreenOrientation,{angle: 0, type: "landscape-primary", onchange: null});
|
||
|
||
screen.availHeight = 864;
|
||
screen.availLeft = 62;
|
||
screen.availTop = 0;
|
||
screen.availWidth = 1474;
|
||
screen.colorDepth = 24;
|
||
screen.height = 864;
|
||
screen.isExtended = false;
|
||
screen.onchange = null;
|
||
screen.orientation = {};
|
||
screen.pixelDepth = 24;
|
||
screen.width = 1536;
|
||
Screen = function Screen(){
|
||
throw new TypeError('Illegal constructor');
|
||
};memory.protect(Screen);
|
||
|
||
|
||
;
|
||
// 第4个加载 进行原型链的组成
|
||
|
||
memory.make_chain(['window','Window','WindowProperties','EventTarget']);
|
||
memory.make_chain(['document','HTMLDocument','Document','Node','EventTarget']);
|
||
memory.make_chain(['history','History']);
|
||
memory.make_chain(['location','Location']);
|
||
memory.make_chain(['navigator','Navigator']);
|
||
memory.make_chain(['screen','Screen']);
|
||
|
||
|
||
|
||
document.location = location;
|
||
window.top = window;
|
||
Document.prototype.documentElement = memory.create_element.create_html();
|
||
;
|
||
JSON.stringify_ = JSON.stringify;
|
||
JSON.stringify = function(x){if(typeof(x)== 'object' && x['sd']){x['sd'] = {"od":"C","ft":"qf_7P___H"}};return JSON.stringify_(x)};
|
||
|
||
Document.prototype.body.clientHeight = 359;
|
||
Document.prototype.body.clientWidth = 360;
|
||
screen.height= 864;
|
||
|
||
|
||
screen.width = 1536;
|
||
Document.prototype.documentElement.clientHeight = 360;
|
||
Document.prototype.documentElement.clientWidth = 360;
|
||
// 文本语言
|
||
navigator.languages = ["zh-CN","zh","en","zh-TW"]
|
||
// refer
|
||
location.href = "https://sso.weidian.com/login/index.php?redirect=https%3A%2F%2Fshop978275038.v.weidian.com%2Fdecoration%2Funi-mine%2F%3Fspider_token%3Dcc81%23%2F";
|
||
// iframe的refer
|
||
window.TCaptchaReferrer = "https://sso.weidian.com/login/index.php"
|
||
// 鼠标滑动轨迹
|
||
track = [[104,0,51105],[-38,15,0],[-6,3,0],[-6,3,1],[-7,2,1],[-4,1,1],[-9,2,1],[-12,6,3],[-4,2,0],[-7,1,1],[-6,3,1],[75,191,9946],[-1,-2,3],[0,-1,5],[-1,-1,7],[0,-1,2],[0,-1,4],[0,-1,4],[0,-1,7],[-1,0,4],[0,-1,2],[0,-1,2],[-1,0,3],[-1,-1,4],[-1,0,11],[0,-1,2],[-1,0,3],[0,-1,6],[-1,0,2],[-1,0,6],[0,-1,7],[-1,-1,13],[0,0,3],[-1,0,15],[-1,0,36],[-1,-1,7],[-1,0,11],[0,-1,3],[-1,0,2],[-1,0,2],[0,-1,7],[-1,0,3],[-1,0,11],[0,-1,2],[-1,0,8],[-1,0,14],[-1,-1,15],[-1,-1,15],[0,0,12],[0,-1,8],[0,-1,18],[-1,0,7],[-1,-1,22],[0,-1,9],[0,-1,29],[-1,0,420],[-1,0,12],[-1,0,2],[-1,0,5],[-1,0,3],[1,1,12]];
|
||
|
||
Tindex = 0
|
||
|
||
|
||
mylog = console.log;
|
||
console.log = function(){}
|
||
|
||
get_data = function get_data(info) {
|
||
code = "vmp"
|
||
eval(code)
|
||
let ip = info
|
||
memory.objects.RTCPeerConnection.localDescription = {
|
||
"sdp":"v=0" +
|
||
"\r\no=- 627758748607417531 2 IN IP4 127.0.0.1" +
|
||
"\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS" +
|
||
"\r\nm=application 1961 UDP/DTLS/SCTP webrtc-datachannel" +
|
||
"\r\nc=IN IP4 "+ip+"\r\na=candidate:3539891574 1 udp 2113937151 a3198269-2c6e-4adc-828e-b7f9c949277d.local 49812 typ host generation 0 network-cost 999" +
|
||
"\r\na=candidate:842163049 1 udp 1677729535 "+ip+" 1961 typ srflx raddr 0.0.0.0 rport 0 generation 0 network-cost 999" +
|
||
"\r\na=ice-ufrag:/CYr\r\na=ice-pwd:QRs0Mo7A0ouqDBYDlcvDSjPQ\r\na=ice-options:trickle" +
|
||
"\r\na=fingerprint:sha-256 BC:AC:D1:9B:EC:2F:F1:47:B5:EF:6D:2F:1A:E3:B6:9F:2B:76:07:CF:32:90:9F:B0:33:A6:90:63:F9:25:45:59\r\na=setup:actpass" +
|
||
"\r\na=mid:0\r\na=sctp-port:5000\r\na=max-message-size:262144\r\n",
|
||
"type":"offer"
|
||
};
|
||
memory.promise['3']();
|
||
memory.promise['1']();
|
||
memory.promise['2']();
|
||
|
||
TTindex = 0;
|
||
|
||
track_x = track[0][0];
|
||
track_y = track[0][1];
|
||
for(let xsw = 1; xsw < track.length; xsw++){
|
||
memory.EventListener['mousemove'][0]({
|
||
"pageX": track_x,
|
||
"pageY": track_y
|
||
});
|
||
track_x += track[xsw][0]
|
||
track_y += track[xsw][1]
|
||
};
|
||
collect = decodeURIComponent(window.TDC.getData(!0))
|
||
tlg= collect.length;
|
||
eks=window.TDC.getInfo().info;
|
||
return {'collect':collect,'tlg':tlg,'eks':eks}
|
||
};;
|
||
// 第5个加载 对对象进行代理 并且遍历对象: 函数进行toString保护 对象则进行递归调用
|
||
|
||
sessionStorage = memory.proxy('sessionStorage');
|
||
localStorage = memory.proxy('localStorage');
|
||
location = memory.proxy('location');
|
||
navigator = memory.proxy('navigator');
|
||
screen = memory.proxy('screen');
|
||
history = memory.proxy('history');
|
||
document = memory.proxy('document');
|
||
window = memory.proxy('window');
|
||
|
||
|
||
|
||
|
||
(function() {
|
||
'use strict';
|
||
var cookieTemp = "";
|
||
Object.defineProperty(document, 'cookie', {
|
||
set: function(val) {
|
||
cookieTemp = val.split(';')[0] + ';';
|
||
return val;
|
||
},
|
||
get: function(){return cookieTemp}});
|
||
})();;
|
||
|
||
|
||
|