Commit a6e9d717 authored by wang's avatar wang

ws 测试

parent 02ac8480
...@@ -235,7 +235,6 @@ while True: ...@@ -235,7 +235,6 @@ while True:
proxy = get_proxy()['url'] proxy = get_proxy()['url']
logger.info(f"success:{success} proxy: {proxy} ") logger.info(f"success:{success} proxy: {proxy} ")
tlsV = 'chrome_112' tlsV = 'chrome_112'
# session = requests.Session(impersonate='chrome110') # session = requests.Session(impersonate='chrome110')
# # session = tls_client.Session(tlsV) # # session = tls_client.Session(tlsV)
......
let fontSizeRandom = false;
let webGlRandom = false;
error_stack = function (stacks) { error_stack = function (stacks) {
print('stack.callback', typeof stacks, stacks); print('stack.callback', typeof stacks, stacks);
...@@ -4780,6 +4783,8 @@ ENV2 = { ...@@ -4780,6 +4783,8 @@ ENV2 = {
"navigatorfunc": [1, 1, 0, 0, 0, 0] "navigatorfunc": [1, 1, 0, 0, 0, 0]
} }
ENV = ENV2
// ENV.windowparams = ENV2.windowparams // ENV.windowparams = ENV2.windowparams
// // ENV.navigatorparams = ENV2.navigatorparams // // ENV.navigatorparams = ENV2.navigatorparams
// let v = parseInt(Math.random()*10 + 100); // let v = parseInt(Math.random()*10 + 100);
...@@ -6807,49 +6812,60 @@ Object.defineProperties(TextMetrics.prototype, { ...@@ -6807,49 +6812,60 @@ Object.defineProperties(TextMetrics.prototype, {
width: { width: {
get() { get() {
// fonts.push(this.fontval[0]) // fonts.push(this.fontval[0])
let res = 132.39996337890625 * (Math.random() * 0.1 + 0.9)
if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) { if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) {
return ENV.fontsres[this.font][this.text].width + (Math.random() * 0.1 + 0.9) res = ENV.fontsres[this.font][this.text].width + fontSizeRandom? (Math.random() * 0.1 + 0.9):0
} }
// v_console_log(this.text[0], " [*] TextMetrics -> width[get]", width); print(this.text[0], " [*] TextMetrics -> width[get]", width);
return res;
return 132.39996337890625 * (Math.random() * 0.1 + 0.9)
} }
}, },
actualBoundingBoxAscent: { actualBoundingBoxAscent: {
get() { get() {
v_console_log(" [*] TextMetrics -> actualBoundingBoxAscent[get]", 556.640625); let res = 556.640625 * (Math.random() * 0.1 + 0.9)
if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) { if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) {
return ENV.fontsres[this.font][this.text].actualboundingboxascent + (Math.random() * 0.1 + 0.9) res = ENV.fontsres[this.font][this.text].actualboundingboxascent + fontSizeRandom? (Math.random() * 0.1 + 0.9):0
} }
return 556.640625 * (Math.random() * 0.1 + 0.9) print(" [*] TextMetrics -> actualBoundingBoxAscent[get]", res);
return res;
} }
}, },
actualBoundingBoxDescent: { actualBoundingBoxDescent: {
get() { get() {
v_console_log(" [*] TextMetrics -> actualBoundingBoxDescent[get]", -203.61328125); let res = -203.61328125 * (Math.random() * 0.1 + 0.9)
if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) { if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) {
return ENV.fontsres[this.font][this.text].actualboundingboxdescent + (Math.random() * 0.1 + 0.9) return ENV.fontsres[this.font][this.text].actualboundingboxdescent + fontSizeRandom? (Math.random() * 0.1 + 0.9):0
} }
return -203.61328125 * (Math.random() * 0.1 + 0.9) print(" [*] TextMetrics -> actualBoundingBoxDescent[get]", res);
return res;
} }
}, },
actualBoundingBoxLeft: { actualBoundingBoxLeft: {
get() { get() {
v_console_log(" [*] TextMetrics -> actualBoundingBoxLeft[get]", -22.94921875); let res = -22.94921875 * (Math.random() * 0.1 + 0.9)
if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) { if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) {
return ENV.fontsres[this.font][this.text].actualboundingboxleft + (Math.random() * 0.1 + 0.9) res = ENV.fontsres[this.font][this.text].actualboundingboxleft + fontSizeRandom? (Math.random() * 0.1 + 0.9):0
} }
return -22.94921875 * (Math.random() * 0.1 + 0.9) print(" [*] TextMetrics -> actualBoundingBoxLeft[get]", res);
return res;
} }
}, },
actualBoundingBoxRight: { actualBoundingBoxRight: {
get() { get() {
v_console_log(" [*] TextMetrics -> actualBoundingBoxRight[get]", 579.1015625); let res = 579.1015625 * (Math.random() * 0.1 + 0.9)
if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) { if (ENV.fontsres[this.font] && ENV.fontsres[this.font][this.text]) {
return ENV.fontsres[this.font][this.text].actualboundingboxright + (Math.random() * 0.1 + 0.9) res = ENV.fontsres[this.font][this.text].actualboundingboxright + fontSizeRandom? (Math.random() * 0.1 + 0.9):0
} }
return 579.1015625 * (Math.random() * 0.1 + 0.9) print(" [*] TextMetrics -> actualBoundingBoxRight[get]", res);
return res;
} }
}, },
[Symbol.toStringTag]: {value: "TextMetrics", writable: false, enumerable: false, configurable: true}, [Symbol.toStringTag]: {value: "TextMetrics", writable: false, enumerable: false, configurable: true},
...@@ -8917,27 +8933,37 @@ WebGLShaderPrecisionFormat = v_saf(function WebGLShaderPrecisionFormat() { ...@@ -8917,27 +8933,37 @@ WebGLShaderPrecisionFormat = v_saf(function WebGLShaderPrecisionFormat() {
if (!v_new_toggle) { if (!v_new_toggle) {
throw TypeError("Illegal constructor") throw TypeError("Illegal constructor")
} }
this._precision = 0;
this._rangeMin = 0;
this._rangeMax = 0;
; ;
}); });
Object.defineProperties(WebGLShaderPrecisionFormat.prototype, { Object.defineProperties(WebGLShaderPrecisionFormat.prototype, {
precision: { precision: {
get() { get() {
v_console_log('WebGLShaderPrecisionFormat.prototype precision') print('WebGLShaderPrecisionFormat.prototype precision', this._precision)
return 22 return this._precision
},
set(v){
this._precision =v;
} }
}, },
rangeMax: { rangeMax: {
get() { get() {
v_console_log('WebGLShaderPrecisionFormat.prototype rangeMax') print('WebGLShaderPrecisionFormat.prototype rangeMax', this._rangeMax)
return 126 return this._rangeMax
},set(v){
this._rangeMax =v;
} }
}, },
rangeMin: { rangeMin: {
get() { get() {
v_console_log('WebGLShaderPrecisionFormat.prototype rangeMin') print('WebGLShaderPrecisionFormat.prototype rangeMin', this._rangeMin)
return 126 return this._rangeMin
},set(v){
this._rangeMin =v;
} }
}, },
}) })
...@@ -9085,7 +9111,14 @@ WebGLProgram = proxy(WebGLProgram, 'WebGLProgram') ...@@ -9085,7 +9111,14 @@ WebGLProgram = proxy(WebGLProgram, 'WebGLProgram')
WebGLBuffer = v_saf(function WebGLBuffer() { WebGLBuffer = v_saf(function WebGLBuffer() {
}) })
WebGLBuffer = proxy(WebGLBuffer, 'WebGLBuffer'); WebGLBuffer = proxy(WebGLBuffer, 'WebGLBuffer');
var r1 = v_new(WebGLShaderPrecisionFormat)
r1.rangeMin = webGlRandom ?randint(122,127) : 127
r1.rangeMax = webGlRandom ?randint(122,127) : 127
r1.precision = 23
var r2 = v_new(WebGLShaderPrecisionFormat)
r2.rangeMin = webGlRandom ?randint(29,31):31
r2.rangeMax = webGlRandom ?randint(27, 30):30
r2.precision = 0
class WebGLRenderingContext { class WebGLRenderingContext {
constructor(aaa) { constructor(aaa) {
print('new WebGLRenderingContext', aaa) print('new WebGLRenderingContext', aaa)
...@@ -9340,17 +9373,9 @@ class WebGLRenderingContext { ...@@ -9340,17 +9373,9 @@ class WebGLRenderingContext {
getShaderPrecisionFormat(a, b) { getShaderPrecisionFormat(a, b) {
function WebGLShaderPrecisionFormat() {
}
var r1 = v_new(WebGLShaderPrecisionFormat)
r1.rangeMin = randint(122,127)
r1.rangeMax = randint(122,127)
r1.precision = randint(19,23)
var r2 = v_new(WebGLShaderPrecisionFormat)
r2.rangeMin = randint(29,31)
r2.rangeMax = randint(27, 30)
r2.precision = 0
// if (navigator.userAgent.indexOf('Firefox') > -1){ // if (navigator.userAgent.indexOf('Firefox') > -1){
// r2.rangeMin = 24 // r2.rangeMin = 24
// r2.rangeMax = 24 // r2.rangeMax = 24
...@@ -13188,7 +13213,6 @@ Object.getOwnPropertyNames = v_saf(function (a) { ...@@ -13188,7 +13213,6 @@ Object.getOwnPropertyNames = v_saf(function (a) {
"WebGLTransformFeedback", "WebGLTransformFeedback",
"WebGLTexture", "WebGLTexture",
"WebGLSync", "WebGLSync",
"WebGLShaderPrecisionFormat",
"WebGLShader", "WebGLShader",
"WebGLSampler", "WebGLSampler",
"WebGLRenderingContext", "WebGLRenderingContext",
...@@ -14394,7 +14418,7 @@ if (ENV.funcs2 && ENV.funcs2.length > 0) { ...@@ -14394,7 +14418,7 @@ if (ENV.funcs2 && ENV.funcs2.length > 0) {
// hasFunc = _random() > 0.5 // hasFunc = _random() > 0.5
if (hasFunc) { if (hasFunc) {
func2Properties[funcName] = { func2Properties[funcName] = {
enumerable: true, enumerable: true,``
value: funcName === 'OffscreenCanvas' ? OffscreenCanvas : eval(`v_saf(function ${funcName}() { value: funcName === 'OffscreenCanvas' ? OffscreenCanvas : eval(`v_saf(function ${funcName}() {
})`) })`)
} }
...@@ -14519,7 +14543,6 @@ let params = { ...@@ -14519,7 +14543,6 @@ let params = {
"WebGLTransformFeedback": {"value": {"type": "function"}}, "WebGLTransformFeedback": {"value": {"type": "function"}},
"WebGLTexture": {"value": {"type": "function"}}, "WebGLTexture": {"value": {"type": "function"}},
"WebGLSync": {"value": {"type": "function"}}, "WebGLSync": {"value": {"type": "function"}},
"WebGLShaderPrecisionFormat": {"value": {"type": "function"}},
"WebGLShader": {"value": {"type": "function"}}, "WebGLShader": {"value": {"type": "function"}},
"WebGLSampler": {"value": {"type": "function"}}, "WebGLSampler": {"value": {"type": "function"}},
"WebGLRenderingContext": {"value": {"type": "function"}}, "WebGLRenderingContext": {"value": {"type": "function"}},
...@@ -15696,20 +15719,20 @@ let ps = {}; ...@@ -15696,20 +15719,20 @@ let ps = {};
eval(funcsStart + funcsList.join('\n') + funcsENd) eval(funcsStart + funcsList.join('\n') + funcsENd)
funcsList = []; // funcsList = [];
for (let i of ENV.windowprops.slice(30,)) { // for (let i of ENV.windowprops.slice(30,)) {
// let p = ENV.windowprops[i]; // // let p = ENV.windowprops[i];
if (!window.hasOwnProperty(i) && funcs.indexOf(i) === -1 && funcs2.indexOf(i) === -1) { // if (!window.hasOwnProperty(i) && funcs.indexOf(i) === -1 && funcs2.indexOf(i) === -1) {
let rr = `'${i}': {\n` // let rr = `'${i}': {\n`
rr += `value: v_saf(function ${i}(){}),` // rr += `value: v_saf(function ${i}(){}),`
rr += '},' // rr += '},'
funcsList.push(rr) // funcsList.push(rr)
// funcsList.push(`${p}: {` // // funcsList.push(`${p}: {`
// value: v_saf(function ${p} (){}), // // value: v_saf(function ${p} (){}),
// },`) // // },`)
} // }
//
} // }
// eval(funcsStart + funcsList.join('\n') + funcsENd) // eval(funcsStart + funcsList.join('\n') + funcsENd)
structuredClone = v_saf(function structuredClone() { structuredClone = v_saf(function structuredClone() {
throw TypeError('DOMException: Failed to execute \'structuredClone\' on \'Window\': Navigator object could not be cloned.') throw TypeError('DOMException: Failed to execute \'structuredClone\' on \'Window\': Navigator object could not be cloned.')
...@@ -16302,6 +16325,10 @@ Object.defineProperties(Worker.prototype, { ...@@ -16302,6 +16325,10 @@ Object.defineProperties(Worker.prototype, {
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