爬虫相关
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

143 lines
3.6 KiB

window = global;
delete global;
location = {};
navigator = {
onLine: true,
pdfViewerEnabled: true,
platform: "Win32",
plugins: [],
presentation: {defaultRequest: null, receiver: null},
product: "Gecko",
productSub: "20030107",
scheduling: {},
serial: {onconnect: null, ondisconnect: null},
serviceWorker: {controller: null, ready: Promise, oncontrollerchange: null, onmessage: null, onmessageerror: null},
storage: {},
usb: {onconnect: null, ondisconnect: null},
userActivation: {hasBeenActive: true, isActive: false},
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.0.10191 SLBChan/25",
userAgentData: {mobile: false, platform: 'Windows'},
vendor: "Google Inc.",
vendorSub: "",
virtualKeyboard: {},
wakeLock: {},
webdriver: false,
deviceMemory: 8,
cookieEnabled: true,
language: "zh-CN",
languages: ['zh-CN', 'zh'],
href:"",
appCodeName: "Mozilla",
appName: "Netscape",
appVersion: '5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.0.10191 SLBChan/25'
};
screen = {
availHeight: 834,
availLeft: 0,
availTop: 0,
availWidth: 1536,
colorDepth: 24,
height: 864,
isExtended: false,
onchange: null,
orientation: Symbol({angle: 0, type: 'landscape-primary', onchange: null}),
pixelDepth: 24,
width: 1536
};
document = {};
document.addEventListener = function (a){
console.log('---------------',a)
}
window.addEventListener = function (a){
console.log('---------------',a)
}
document.documentElement ={}
document.documentElement.getAttribute = function (a){
console.log('document.documentElement.getAttribute---------------',a)
}
window.document= document
better = {};
localStorage = {
};
Object.defineProperties(window, {
[Symbol.toStringTag]: {
value: "Window",
configurable: true
}
});
Object.defineProperties(navigator, {
[Symbol.toStringTag]: {
value: "Navigator",
configurable: true
}
});
Object.defineProperties(location, {
[Symbol.toStringTag]: {
value: "Location",
configurable: true
}
});
self = window;
document.createElement = function createElement(a) {
if (a == 'span') {
return {
'classList': {
'add': function () {
}
}
}
}
console.log('createElement-->:' + a)
};
document.documentElement = function documentElement(a) {
console.log('documentElement-->:' + a)
};
document.createEvent = function createEvent(a) {
console.log('documentElement-->:' + a)
};
document.all = {};
function requestAnimationFrame() {
}
window.requestAnimationFrame = requestAnimationFrame;
localStorage.getItem = function (a) {
console.log('getItem-->:' + a)
return localStorage[a]
}
function History() {}
History.prototype = watch({
toString: function toString() { return '[object History]'; },
}, "History");
History.prototype.constructor = History;
window.History = History;
window.history = watch(new History(), "window.history");
XMLHttpRequest = function (){}
globalThis = window;
var {proxies} = require('./proxies.js')
document = proxies.proxy(document, "document");
navigator = proxies.proxy(navigator, "navigator");
location = proxies.proxy(location, "location");
localStorage = proxies.proxy(localStorage, "localStorage");
screen = proxies.proxy(screen, "screen");
window = proxies.proxy(window, "window");
globalThis = proxies.proxy(globalThis, "globalThis");