Commit aeeaf207 authored by wang's avatar wang

4444

parent 965c45f1
...@@ -12,12 +12,17 @@ proxy = function (tt, name) { ...@@ -12,12 +12,17 @@ proxy = function (tt, name) {
let res = Reflect.get(target, p, receiver); let res = Reflect.get(target, p, receiver);
if (p !== 'debug' && p !== 'Object') { if (p !== 'debug' && p !== 'Object') {
console.log(`${name} get`, p, typeof res) console.log(`${name} get`, p, typeof res)
} }
// if (p === 'offsetHeight'){ // if (p === 'offsetHeight'){
// debugger; // debugger;
// } // }
if (p === 'exec') {
return function (args){
console.log(`${name} exec`, args)
return /{\s*\[\s*native\s+code\s*]\s*}\s*$/.exec(args)
}
}
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver)) // console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (!['_registeredHandlers', 'window', '_currentEvent', 'debug', '_eventListenerss', 'top', 'prototype'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') { if (!['_registeredHandlers', 'window', '_currentEvent', 'debug', '_eventListenerss', 'top', 'prototype'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
...@@ -58,28 +63,28 @@ const crypto = require("crypto"); // 引入 jsdom ...@@ -58,28 +63,28 @@ const crypto = require("crypto"); // 引入 jsdom
var _random = Math.random var _random = Math.random
Date.now = function now() { // Date.now = function now() {
return 1685096207545 // return 1685096207545
}; // };
Date.parse = function () { // Date.parse = function () {
return 1685096207545 // return 1685096207545
}; // };
Date.prototype.valueOf = function () { // Date.prototype.valueOf = function () {
return 1685096207545 // return 1685096207545
}; // };
Date.prototype.getTime = function () { // Date.prototype.getTime = function () {
return 1685096207545 // return 1685096207545
}; // };
Date.prototype.toString = function () { // Date.prototype.toString = function () {
return 1685096207545 // return 1685096207545
}; // };
Performance.prototype.now = function now() { // Performance.prototype.now = function now() {
return Number('1685096207545'.slice(8)) // return Number('1685096207545'.slice(8))
} // }
//
Math.random = function random() { // Math.random = function random() {
return 0.08636862211354912 // return 0.08636862211354912
}; // };
const FingerprintGenerator = require('fingerprint-generator').FingerprintGenerator; const FingerprintGenerator = require('fingerprint-generator').FingerprintGenerator;
...@@ -479,8 +484,8 @@ const dom = new JSDOM(` ...@@ -479,8 +484,8 @@ const dom = new JSDOM(`
// document.referrer // document.referrer
contentType: "text/html", contentType: "text/html",
// document.contentType // document.contentType
// userAgent: fingerprint.navigator.userAgent, userAgent: fingerprint.navigator.userAgent,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', // userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
// UA // UA
includeNodeLocations: true // 保留由HTML解析器生成的位置信息,允许使用nodeLocation()方法 includeNodeLocations: true // 保留由HTML解析器生成的位置信息,允许使用nodeLocation()方法
...@@ -970,12 +975,23 @@ window.OffscreenCanvas = proxy(OffscreenCanvas, 'OffscreenCanvas') ...@@ -970,12 +975,23 @@ window.OffscreenCanvas = proxy(OffscreenCanvas, 'OffscreenCanvas')
RTCSessionDescription = v_saf(function RTCSessionDescription() { RTCSessionDescription = v_saf(function RTCSessionDescription() {
; ;
}) })
getRanHex = size => {
let result = [];
let hexRef = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
for (let n = 0; n < size; n++) {
result.push(hexRef[Math.floor(_random() * 16)].toUpperCase()+ hexRef[Math.floor(_random() * 16)].toUpperCase());
}
return result;
}
Object.defineProperties(RTCSessionDescription.prototype, { Object.defineProperties(RTCSessionDescription.prototype, {
sdp: { sdp: {
get: v_saf(function get() { get: v_saf(function get() {
print(" [*] RTCSessionDescription -> sdp[get]"); let t1 = parseInt(Math.random() * (9145445486224659982/2) + 9145445486224659982/1.2)
return `v=0 let hex = getRanHex(32).join(':');
o=- 7671951856866369796 2 IN IP4 127.0.0.1 let res = `v=0
o=- ${t1} 2 IN IP4 127.0.0.1
s=- s=-
t=0 0 t=0 0
a=group:BUNDLE 0 a=group:BUNDLE 0
...@@ -983,14 +999,16 @@ a=extmap-allow-mixed ...@@ -983,14 +999,16 @@ a=extmap-allow-mixed
a=msid-semantic: WMS a=msid-semantic: WMS
m=application 9 UDP/DTLS/SCTP webrtc-datachannel m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0 c=IN IP4 0.0.0.0
a=ice-ufrag:2PVz a=ice-ufrag:Pz1P
a=ice-pwd:UsK+8dfSl/7xZKq9bF6tSooX a=ice-pwd:2RkyfgKRyILQtDZZ5mluUlPS
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 36:55:F4:0E:9E:97:80:5E:81:D7:8E:18:F0:EB:33:F4:10:88:93:20:AA:9E:35:61:6A:D3:15:5D:6F:73:76:DF a=fingerprint:sha-256 ${hex}
a=setup:actpass a=setup:actpass
a=mid:0 a=mid:0
a=sctp-port:5000 a=sctp-port:5000
a=max-message-size:262144` a=max-message-size:262144`
print(" [*] RTCSessionDescription -> sdp[get]", res);
}) })
}, },
...@@ -2039,7 +2057,7 @@ var stackTrace = {}; ...@@ -2039,7 +2057,7 @@ var stackTrace = {};
let arggs = []; let arggs = [];
window.videos = []; window.videos = [];
window.fonts = []; window.fonts = [];
window.imageDatas = [];
(function a(R) { (function a(R) {
var M = {}, Z = {}; var M = {}, Z = {};
var U = ReferenceError, j = TypeError, E = Object, I = RegExp, B = Number, c = String, f = Array, g = E.bind, var U = ReferenceError, j = TypeError, E = Object, I = RegExp, B = Number, c = String, f = Array, g = E.bind,
...@@ -4088,7 +4106,12 @@ window.fonts = []; ...@@ -4088,7 +4106,12 @@ window.fonts = [];
}, function (HZ) { }, function (HZ) {
var HU = z[Rh[HZ.Y] << 8 | Rh[HZ.Y + 1]]; var HU = z[Rh[HZ.Y] << 8 | Rh[HZ.Y + 1]];
HZ.Y += 2; HZ.Y += 2;
HZ.n[HZ.n.length] = I(HU) console.log("regex2", HU)
let res = I(HU);
if (HU === '{\\s*\\[\\s*native\\s+code\\s*]\\s*}\\s*$') {
res = proxy(res, 'regexxx')
}
HZ.n[HZ.n.length] = res
}, function (Hj) { }, function (Hj) {
var HE = Rh[Hj.Y]; var HE = Rh[Hj.Y];
Hj.Y += 1; Hj.Y += 1;
...@@ -4670,6 +4693,7 @@ window.fonts = []; ...@@ -4670,6 +4693,7 @@ window.fonts = [];
tH.n[tH.n.length - 2] = delete tH.n[tH.n.length - 2][tH.n[tH.n.length - 1]]; tH.n[tH.n.length - 2] = delete tH.n[tH.n.length - 2][tH.n[tH.n.length - 1]];
tH.n.length -= 1 tH.n.length -= 1
}, function (tS) { }, function (tS) {
console.log(tS.n[tS.n.length - 2], 'ininin', tS.n[tS.n.length - 2] in tS.n[tS.n.length - 1], tS.n[tS.n.length - 1])
tS.n[tS.n.length - 2] = tS.n[tS.n.length - 2] in tS.n[tS.n.length - 1]; tS.n[tS.n.length - 2] = tS.n[tS.n.length - 2] in tS.n[tS.n.length - 1];
tS.n.length -= 1 tS.n.length -= 1
}, function (tk) { }, function (tk) {
...@@ -5081,6 +5105,8 @@ window.fonts = []; ...@@ -5081,6 +5105,8 @@ window.fonts = [];
sP.n[sP.n.length - 5] = sP.p.O(ss); sP.n[sP.n.length - 5] = sP.p.O(ss);
sP.n.length -= 4 sP.n.length -= 4
}, function (sW) { }, function (sW) {
console.log("regex1", sW.n[sW.n.length - 1], sW.n[sW.n.length - 2])
sW.n[sW.n.length - 2] = I(sW.n[sW.n.length - 1], sW.n[sW.n.length - 2]); sW.n[sW.n.length - 2] = I(sW.n[sW.n.length - 1], sW.n[sW.n.length - 2]);
sW.n.length -= 1 sW.n.length -= 1
}]; }];
...@@ -5214,7 +5240,7 @@ setTimeout(() => { ...@@ -5214,7 +5240,7 @@ setTimeout(() => {
xhr.send("{\"tripType\":\"oneWay\",\"from\":\"ZLA\",\"to\":\"NAS\",\"depart\":\"2023-04-11\",\"cabin\":\"economy\",\"refundable\":false,\"dates\":{\"before\":\"3\",\"after\":\"3\"},\"pax\":{\"ADT\":1,\"CHD\":0,\"INF\":0,\"UNN\":0},\"redempoint\":false,\"pointsBreakup\":{\"option\":\"\",\"value\":0},\"isMultiCity\":false}") xhr.send("{\"tripType\":\"oneWay\",\"from\":\"ZLA\",\"to\":\"NAS\",\"depart\":\"2023-04-11\",\"cabin\":\"economy\",\"refundable\":false,\"dates\":{\"before\":\"3\",\"after\":\"3\"},\"pax\":{\"ADT\":1,\"CHD\":0,\"INF\":0,\"UNN\":0},\"redempoint\":false,\"pointsBreakup\":{\"option\":\"\",\"value\":0},\"isMultiCity\":false}")
xhr.setRequestHeader('user-agent', fingerprint.navigator.userAgent) xhr.setRequestHeader('user-agent', fingerprint.navigator.userAgent)
print(JSON.stringify(xhr.headers)) print(JSON.stringify(xhr.headers))
// print(JSON.stringify(window.fonts)) // print(JSON.stringify(window.imageDatas))
// process.exit(0) // process.exit(0)
}, 1000) }, 1000)
...@@ -5222,6 +5248,7 @@ setTimeout(() => { ...@@ -5222,6 +5248,7 @@ setTimeout(() => {
const express = require('express') const express = require('express')
const util = require("util");
const app = express() const app = express()
app.get('/', (req, res) => { app.get('/', (req, res) => {
......
...@@ -269,9 +269,9 @@ function Window(options) { ...@@ -269,9 +269,9 @@ function Window(options) {
// console.log('window get', p, typeof res) // console.log('window get', p, typeof res)
} }
// if (p === 'offsetHeight'){ if (p === 'StyleSheet'){
// debugger; debugger;
// } }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver)) // console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','top','JSON', 'Math'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') { if (!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','top','JSON', 'Math'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
......
...@@ -188,7 +188,10 @@ exports.install = (globalObject, globalNames) => { ...@@ -188,7 +188,10 @@ exports.install = (globalObject, globalNames) => {
ceReactionsPostSteps_helpers_custom_elements(globalObject); ceReactionsPostSteps_helpers_custom_elements(globalObject);
} }
} }
get webkitRequestFullScreen() {
console.log('body.webkitRequestFullScreen')
}
set vLink(V) { set vLink(V) {
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -791,6 +794,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -791,6 +794,7 @@ exports.install = (globalObject, globalNames) => {
onstorage: { enumerable: true }, onstorage: { enumerable: true },
onunhandledrejection: { enumerable: true }, onunhandledrejection: { enumerable: true },
onunload: { enumerable: true }, onunload: { enumerable: true },
webkitRequestFullScreen: { enumerable: true },
[Symbol.toStringTag]: { value: "HTMLBodyElement", configurable: true } [Symbol.toStringTag]: { value: "HTMLBodyElement", configurable: true }
}); });
if (globalObject[ctorRegistrySymbol] === undefined) { if (globalObject[ctorRegistrySymbol] === undefined) {
......
...@@ -319,11 +319,10 @@ exports.install = (globalObject, globalNames) => { ...@@ -319,11 +319,10 @@ exports.install = (globalObject, globalNames) => {
} }
return { return Promise((resolve, reject) => {
then: function () {
return r resolve(r)
} });
}
} }
} }
} }
...@@ -645,6 +644,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -645,6 +644,7 @@ exports.install = (globalObject, globalNames) => {
unregisterProtocolHandler() { unregisterProtocolHandler() {
console.log('navigator.unregisterProtocolHandler') console.log('navigator.unregisterProtocolHandler')
} }
get mimeTypes() { get mimeTypes() {
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
......
...@@ -2376,7 +2376,19 @@ function randInt(a, b) { ...@@ -2376,7 +2376,19 @@ function randInt(a, b) {
return parseInt(Math.random() * (b - a) + a) return parseInt(Math.random() * (b - a) + a)
} }
class CanvasRenderingContext2D { class CanvasRenderingContext2D {
imageDatas = {
"18,90,1,1": [214, 122, 6, 255],
"38,77,1,1": [255, 255, 255, 255],
"48,28,1,1": [0, 0, 0, 0],
"94,23,1,1": [0, 0, 0, 0],
"26,46,1,1": [253, 243, 245, 255],
"47,23,1,1": [0, 0, 0, 0],
"37,17,1,1": [0, 0, 0, 255],
"62,28,1,1": [204, 131, 217, 255]
}
constructor(w, h, context) { constructor(w, h, context) {
console.log('OffscreenCanvasRenderingContext2D.new', w, h) console.log('OffscreenCanvasRenderingContext2D.new', w, h)
this.width = w; this.width = w;
...@@ -2554,6 +2566,7 @@ class CanvasRenderingContext2D { ...@@ -2554,6 +2566,7 @@ class CanvasRenderingContext2D {
get font() { get font() {
console.log('CanvasRenderingContext2D.font.get') console.log('CanvasRenderingContext2D.font.get')
return this._context.font;
} }
get textAlign() { get textAlign() {
...@@ -2566,6 +2579,7 @@ class CanvasRenderingContext2D { ...@@ -2566,6 +2579,7 @@ class CanvasRenderingContext2D {
get textBaseline() { get textBaseline() {
console.log('CanvasRenderingContext2D.textBaseline.get') console.log('CanvasRenderingContext2D.textBaseline.get')
return this._context.textBaseline
} }
set textBaseline(args) { set textBaseline(args) {
...@@ -2575,10 +2589,13 @@ class CanvasRenderingContext2D { ...@@ -2575,10 +2589,13 @@ class CanvasRenderingContext2D {
get direction() { get direction() {
console.log('CanvasRenderingContext2D.direction.get') console.log('CanvasRenderingContext2D.direction.get')
return this._context.direction;
} }
set direction(args) { set direction(args) {
console.log('CanvasRenderingContext2D.direction.set', args) console.log('CanvasRenderingContext2D.direction.set', args)
this._context.direction = args
} }
get fontKerning() { get fontKerning() {
...@@ -2671,6 +2688,7 @@ class CanvasRenderingContext2D { ...@@ -2671,6 +2688,7 @@ class CanvasRenderingContext2D {
fillText() { fillText() {
console.log('CanvasRenderingContext2D.fillText', ...arguments) console.log('CanvasRenderingContext2D.fillText', ...arguments)
this._context.fillText(...arguments) this._context.fillText(...arguments)
this._fillText = [arguments[0], arguments[1], arguments[2]]
} }
getContextAttributes() { getContextAttributes() {
...@@ -2679,6 +2697,19 @@ class CanvasRenderingContext2D { ...@@ -2679,6 +2697,19 @@ class CanvasRenderingContext2D {
getImageData() { getImageData() {
let res = this._context.getImageData(...arguments) let res = this._context.getImageData(...arguments)
window.imageDatas.push({
font: this._context.font,
fillStyle: this._context.fillStyle,
fillText: this._fillText,
imageData: [arguments[0], arguments[1], arguments[2], arguments[3]]
})
let tdata = this.imageDatas[[arguments[0], arguments[1], arguments[2], arguments[3]]+''];
if (tdata){
res.data[0] = tdata[0]
res.data[1] = tdata[1]
res.data[2] = tdata[2]
res.data[3] = tdata[3]
}
console.log('CanvasRenderingContext2D.getImageData', ...arguments, res) console.log('CanvasRenderingContext2D.getImageData', ...arguments, res)
return res return res
......
This source diff could not be displayed because it is too large. You can view the blob instead.
const Canvas = require('canvas') const Canvas = require('canvas')
var a = Canvas.createCanvas(96,96) let res = {};
let ctx = a.getContext('2d')
console.log(ctx) let sss = [
ctx.font = '94px sans-serif' {
ctx.fillStyle = '#000' "font": "94px sans-serif",
ctx.fillText('😎', -1, 96) "fillStyle": "#000000",
console.log(ctx.getImageData(18, 90, 1, 1)) "fillText": {"0": "😎", "1": -1, "2": 96},
\ No newline at end of file "imageData": {"0": 18, "1": 90, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "6️⃣", "1": -1, "2": 96},
"imageData": {"0": 38, "1": 77, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "🍼", "1": -1, "2": 96},
"imageData": {"0": 48, "1": 28, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "🏴󠁧󠁢󠁥󠁮󠁧󠁿", "1": -1, "2": 96},
"imageData": {"0": 94, "1": 23, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "📊", "1": -1, "2": 96},
"imageData": {"0": 26, "1": 46, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "🏴󠁧󠁢󠁥󠁮󠁧󠁿", "1": -1, "2": 96},
"imageData": {"0": 47, "1": 23, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "㊗️", "1": -1, "2": 96},
"imageData": {"0": 37, "1": 17, "2": 1, "3": 1}
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": {"0": "⛎", "1": -1, "2": 96},
"imageData": {"0": 62, "1": 28, "2": 1, "3": 1}
}]
for (let i = 0; i < sss.length; i++) {
var a = document.createElement('canvas')
let ctx = a.getContext('2d');
let s = sss[i];
ctx.font = s.font;
ctx.fillStyle = s.fillStyle;
ctx.fillText(...s.fillText)
console.log(ctx.getImageData(...s.imageData))
}
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment