Commit 002741b1 authored by wang's avatar wang

对比修复

parent f1666655
No preview for this file type
test();
function test() {
var bytes = getFloat64Bytes(947219080);
console.log(bytes);
// console.log(toFloat64(bytes));
}
//构建一个视图,把字节数组写到缓存中,索引从0开始,大端字节序
function getView(bytes) {
var view = new DataView(new ArrayBuffer(bytes.length));
for (var i = 0; i < bytes.length; i++) {
view.setUint8(i, bytes[i]);
}
return view;
}
//将字节数组转成有符号的8位整型,大端字节序
function toInt8(bytes) {
return getView(bytes).getInt8();
}
//将字节数组转成无符号的8位整型,大端字节序
function toUint8(bytes) {
return getView(bytes).getUint8();
}
//将字节数组转成有符号的16位整型,大端字节序
function toInt16(bytes) {
return getView(bytes).getInt16();
}
//将字节数组转成无符号的16位整型,大端字节序
function toUint16(bytes) {
return getView(bytes).getUint16();
}
//将字节数组转成有符号的32位整型,大端字节序
function toInt32(bytes) {
return getView(bytes).getInt32();
}
//将字节数组转成无符号的32位整型,大端字节序
function toUint32(bytes) {
return getView(bytes).getUint32();
}
//将字节数组转成32位浮点型,大端字节序
function toFloat32(bytes) {
return getView(bytes).getFloat32();
}
//将字节数组转成64位浮点型,大端字节序
function toFloat64(bytes) {
return getView(bytes).getFloat64();
}
//将数值写入到视图中,获得其字节数组,大端字节序
function getUint8Array(len, setNum) {
var buffer = new ArrayBuffer(len); //指定字节长度
setNum(new DataView(buffer)); //根据不同的类型调用不同的函数来写入数值
return new Uint8Array(buffer); //创建一个字节数组,从缓存中拿取数据
}
//得到一个8位有符号整型的字节数组,大端字节序
function getInt8Bytes(num) {
return getUint8Array(1, function (view) { view.setInt8(0, num); })
}
//得到一个8位无符号整型的字节数组,大端字节序
function getUint8Bytes(num) {
return getUint8Array(1, function (view) { view.setUint8(0, num); })
}
//得到一个16位有符号整型的字节数组,大端字节序
function getInt16Bytes(num) {
return getUint8Array(2, function (view) { view.setInt16(0, num); })
}
//得到一个16位无符号整型的字节数组,大端字节序
function getUint16Bytes(num) {
return getUint8Array(2, function (view) { view.setUint16(0, num); })
}
//得到一个32位有符号整型的字节数组,大端字节序
function getInt32Bytes(num) {
return getUint8Array(4, function (view) { view.setInt32(0, num); })
}
//得到一个32位无符号整型的字节数组,大端字节序
function getUint32Bytes(num) {
return getUint8Array(4, function (view) { view.setUint32(0, num); })
}
//得到一个32位浮点型的字节数组,大端字节序
function getFloat32Bytes(num) {
return getUint8Array(4, function (view) { view.setFloat32(0, num); })
}
//得到一个64位浮点型的字节数组,大端字节序
function getFloat64Bytes(num) {
return getUint8Array(8, function (view) { view.setFloat64(0, num); })
}
////下面几个为另一种实现方式的版本,只实现了简单几种,其他的实现起来比较麻烦,所以就中途放弃了
//function toInt32(bytes) {
// return ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8) | (bytes[3] & 0xFF);
//}
//function toUInt16(bytes) {
// return ((bytes[0] & 0xFF) << 8) | (bytes[1] & 0xFF);
//}
//function toInt16(bytes) {
// return bytes[0] >> 7 == 0 ? toUInt16(bytes) : toUInt16(bytes) - 65536;
//}
//function getInt32Bytes(num) {
// return [num >> 24 & 0xFF, num >> 16 & 0xFF, num >> 8 & 0xFF, num & 0xFF];
//}
//function getUint16Bytes(num) {
// return [num >> 8 & 0xFF, num & 0xFF];
//}
//function getInt16Bytes(num) {
// return num >= 0 ? getUint16Bytes(num) : getUint16Bytes(65536 + num);
//}
\ No newline at end of file
let {encode, decode} = require('superpack')
// [ 51, 200, 152, 192, 31 ]
console.log(encode('123'))
\ No newline at end of file
chrome.webRequest.onBeforeRequest.addListener(
function (details) {
// 在这里修改请求的 URL
// console.log(details.url)
if (details.url.indexOf('outbound') != -1) {
details.url = 'https://www.jetblue.com/lfs-rwb/outboundLFSsss';
}
return {redirectUrl: details.url};
},
{urls: ['<all_urls>']},
['blocking', 'requestBody', 'extraHeaders']
);
chrome.webRequest.onBeforeSendHeaders.addListener((details) => {
console.log(details.requestHeaders.map(e => {
......
......@@ -64,17 +64,16 @@ for i in range(100):
# selectId = '55a8fe24a752595e774341d6'
proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
# proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@198.147.25.26:{int(random.randint(10000, 11149))}'
proxy = 'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
# proxy = 'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
if platform.uname().system == 'Darwin':
proxy = 'http://127.0.0.1:7890'
tlsV = f'chrome_{random.randint(105, 113)}'
tlsV = 'chrome_114'
tlsV = 'chrome_112'
session = tls_client.Session(tlsV)
session.proxies = {
'http': proxy,
'https': proxy,
}
# selectId = 'a74b38e7115cf4d1b1f6976c'
# c = session.get('https://www.jetblue.com/js/src/jb-74873.js', insecure_skip_verify=True).text
# m5 = md5(c)
......@@ -165,7 +164,7 @@ for i in range(100):
'brush_header': headers,
'brush_proxy':proxy,
'brush_mode':'shopping',
'brush_name':'js',
'brush_name':'jsr',
'brush_type':'headerB6',
})
success+=1
......
This diff is collapsed.
......@@ -265,7 +265,7 @@ function Window(options) {
// debugger;
// }
let res = Reflect.get(target, p, receiver);
if (!['Object','Window' , 'debug','Math', 'Array', '_random'].includes(p)){
if (!['Object','Window' , 'debug','Math', 'Array', '_random', "ENV"].includes(p)){
console.log('window get', p, typeof res)
}
......@@ -275,7 +275,7 @@ function Window(options) {
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (
!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','JSON', 'Math'].includes(p) &&
!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','JSON', 'Math', 'ENV'].includes(p) &&
res && typeof res === 'object' && typeof p !== 'symbol') {
return proxy(res, p)
}
......
......@@ -97,7 +97,7 @@ exports.install = (globalObject, globalNames) => {
}
now() {
return Number('1693903208580'.slice(8))
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
......
......@@ -2765,13 +2765,13 @@ class CanvasRenderingContext2D {
// res.data[i] = parseInt(window._random() * 100 + 100)
// }
}
// if (arguments[0] === 0 && arguments[1] === 0 && arguments[2] === 5) {
// for (let i = 0; i < res.data.length; i++) {
// if (res.data[i] === 22) {
// res.data[i] = 0
// }
// }
// }
if (arguments[0] === 0 && arguments[1] === 0 && arguments[2] === 5) {
for (let i = 0; i < res.data.length; i++) {
if (res.data[i] === 22) {
res.data[i] = 0
}
}
}
// // if (Math.random() < 0.5){
// for (let i = 0; i < res.data.length; i++) {
// res.data[i] = parseInt(window._random() * 100 + 100)
......
......@@ -31,6 +31,7 @@
"nwsapi": "^2.2.0",
"parse5": "6.0.1",
"saxes": "^5.0.1",
"superpack": "^2.3.0",
"symbol-tree": "^3.2.4",
"tough-cookie": "^4.0.0",
"w3c-hr-time": "^1.0.2",
......@@ -1902,6 +1903,11 @@
"node": ">=0.10.0"
}
},
"node_modules/superpack": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/superpack/-/superpack-2.3.0.tgz",
"integrity": "sha512-87KHgZCICmJCy82Bu2XZE0soi8qRAytnlqS+mKT8KxyigAIlXI7KiMD/RRiIYnOglEm98AHRaJA0VTlQZgEuEg=="
},
"node_modules/symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,7 +7,7 @@ import requests
headers = {
"authority": "jbrest.jetblue.com",
"accept": "application/json",
"accept-language": "zh-CN,zh;q=0.9",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
"api-version": "v3",
"application-channel": "Desktop_Web",
"booking-application-type": "NGB",
......@@ -15,28 +15,36 @@ headers = {
"content-type": "application/json",
"origin": "https://www.jetblue.com",
"pragma": "no-cache",
"referer": "https://www.jetblue.com/booking/flights?from=LAS&to=BGI&depart=2023-09-22&isMultiCity=false&noOfRoute=1&lang=en&adults=1&children=0&infants=0&sharedMarket=false&roundTripFaresFlag=false&usePoints=false",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\"",
"referer": "https://www.jetblue.com/booking/flights?from=JFK&to=LAX&depart=2023-09-16&isMultiCity=false&noOfRoute=1&lang=en&adults=1&children=0&infants=0&sharedMarket=false&roundTripFaresFlag=false&usePoints=false",
"sec-ch-ua": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Microsoft Edge\";v=\"116\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69",
"x-1itxwo9i-a": "l8jO8P7SWtl296jobeBGExSkNwIhDLQwSZBTZWEIsufA26CfgviWZq5kuXCc_Pi5_n-LkQa7IMMVQEVAovkCiTcATEiZtx6Hw3pBRbhIHohwLEcnEC3Ia8NRkwiS1r8L-Xsei_sHLnOzPAd0Ow8Be8nvTAX3TTGG98XeU4Atfx3Pd005N2tQvVSfeKY4kTJoWPibORxp4bqEEKQnyLfvBzI_f3AVLZ_vbBVzqdJ1A3uMeSK9yVxyAOyUWNC=6yJ2WyEMh0EYwaUpvZv4B3RDiIVv38UervDRnCK5U2noqPThMskNHzGT8NxWe2OHM0b=NLCms5=G_PN-tyClhZjyI-XZI2oQPWMzTSWpGSKGPIGQs6CXUGV-GzK0_OfV7UQvpYHy25=36NhUbfnN_sRhL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fk0RIT5eMOi1PZdV42fnkNvpVjLYEAkSx7gtxrRCwc-r6N9yORXQtbDMnTNInKqY7YZoAb4PKD2x6O_otn2ar1JVsdRDZ3QzM6AfPs6nEzTp0OuCcXY4UWh9QCGO3R=gehbkKGhJY9UZQTQHpnf7qcJ6WVquVhDz3GbUlsPXWx7-_CL2oHUhssLTbclti5QWKpecnuWAMRyv6u4ExNsn_hnLDk9sJx6fNsH3wkXXP7mVHmuO3uJn6TncVeqKZTfW8izJ-T1YROsGLX7H_PIQTVMhN-sAunt-n0NRl7=zg64n-7-PR9_fciu2wDJJkk0pP6r=02NIRUUSVBSPAy9TzqfUkVo=rW0ekyQIgOZYPHuAjSXvTJuAfwKxpjh-77viG7G5s1DY2jYS0T2uBQm46BPJj=RcoWnx=MjpZrMINEMd-bDJAHPbPbqjYBfMtgEwAq9tAkfUcI42mm_kQ_3X-V1h4lKCMTmC5uE8lDYMXnyg==j6VxquLUk_sCbGxwdXYMPkBgLJzmhkJ_ab9tZ8CGrtjUv9SUGoMx7P",
"x-1itxwo9i-b": "-5jiyvt",
"x-1itxwo9i-c": "AAD5tZeKAQAA5AGBfSVpzaCYgbSYMfPTk4AS9pvgoY2H_C9Iy5a7sFU8bE0L",
"x-1itxwo9i-d": "ABaAhIjBCKHFgQGAAYIQgISi0aIA5JmBzvpDzz8AlruwVTxsTQsAAAAAH29cNgB31hxThZL125XOgPtXFfu6",
"x-1itxwo9i-f": "A61guZeKAQAACKEYJYyYrIPbggOeb_BWxP7CMc8W4dpLa-SWjddIbvnwCIRYAXL3RNgXTuHJwH9eCOfvosJeCA==",
"x-1itxwo9i-z": "q",
"x-b3-spanid": "1694762625442",
"x-b3-traceid": "5f707d06f26e7c7c"
}
uri = 'http://ymx-lcc.unififi.com/header/add'
proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
# r = requests.post(uri, json={
# 'brush_fromto': 'LAS-BOS',
# 'brush_fromdate': '2023-05-26',
# 'brush_header': headers,
# 'brush_proxy': proxy,
# 'brush_mode': 'shopping',
# 'brush_name': 'js',
# 'brush_type': 'headerB6',
# })
#
# print(r.text)
r = requests.post(uri, json={
'brush_fromto': 'LAS-BOS',
'brush_fromdate': '2023-05-26',
'brush_header': headers,
'brush_proxy': proxy,
'brush_mode': 'shopping',
'brush_name': 'js',
'brush_type': 'headerB6',
})
print(r.text)
print(json.dumps({
'brush_fromto': 'LAS-BOS',
......
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