Commit a4171e1f authored by wang's avatar wang

wn test

parent e63302e9
...@@ -59,6 +59,7 @@ headers = { ...@@ -59,6 +59,7 @@ headers = {
while True: while True:
r = requests.get('http://ymx-lcc.unififi.com/header/task/pull/headerB6?brush_name=test') r = requests.get('http://ymx-lcc.unififi.com/header/task/pull/headerB6?brush_name=test')
if platform.uname().system != 'Darwin':
if r.json()['status'] != 0: if r.json()['status'] != 0:
logger.debug(f'不需要刷值') logger.debug(f'不需要刷值')
time.sleep(10) time.sleep(10)
......
...@@ -57,11 +57,11 @@ headers = { ...@@ -57,11 +57,11 @@ headers = {
while True: while True:
r = requests.get('http://ymx-lcc.unififi.com/header/task/pull/headerB6?brush_name=test') # r = requests.get('http://ymx-lcc.unififi.com/header/task/pull/headerB6?brush_name=test')
if r.json()['status'] != 0: # if r.json()['status'] != 0:
logger.debug(f'不需要刷值') # logger.debug(f'不需要刷值')
time.sleep(10) # time.sleep(10)
continue # continue
logger.debug('开始刷值') logger.debug('开始刷值')
selectId = random.choice(list(envs)) selectId = random.choice(list(envs))
lastHash = '' lastHash = ''
...@@ -169,6 +169,7 @@ while True: ...@@ -169,6 +169,7 @@ while True:
# #
response = session.post(url, headers=headers, json=data, insecure_skip_verify=True) response = session.post(url, headers=headers, json=data, insecure_skip_verify=True)
logger.info(f'tls:{tlsV} proxy:{proxy} res:: {response.status_code}') logger.info(f'tls:{tlsV} proxy:{proxy} res:: {response.status_code}')
print(response.text)
# total += 1 # total += 1
# # print(response.text) # # print(response.text)
if response.status_code != 403: if response.status_code != 403:
......
This diff is collapsed.
This diff is collapsed.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
</body>
</html>
<script>
!function(){
var websocket = new WebSocket("ws://127.0.0.1:5000/browser");
websocket.onopen = function(){
var info = 'browser:start:' + location.href
console.log(info);
websocket.send(info)
}
websocket.onmessage = function(e){
var info = JSON.parse(e.data)
console.log('websocket.onmessage', info)
// 这里处理请求参数以及对应rpc函数调用,返回参数用字符串传递回 websocket。回传字符串即可。
$.ajax({
type: 'POST',
url: '/api/match2023/4',
data: {'page': 2, 'yt4': '5WRckXmx+H0dKOXNcU3Q+OWcLSXN9ZFljLRgndE54Oi9teC1WDRF1Xi0SBWN+HG9fYyZJGW1bXTpUM1RTTD9SDnAaRVB1ZTJYL11HAU1bNXx7KXJUT1wH'},
dataType: 'json',
success: function (resp){
console.log(resp);
websocket.send(resp)
}
});
}
}()
</script>
\ No newline at end of file
This diff is collapsed.
import base64
b = [4259891, 7733370, 5111874, 6357065, 4259921, 4259905, 4522074, 5111915, 7864391, 6357098, 5111875, 3276852, 7077961, 2949185, 7405649, 5439600, 5701733, 5767243, 6881364, 7077989, 3342422, 3670137, 4259895, 4915275, 7602242, 7405643, 7602296, 3342440, 5111893, 6750311, 4259940, 4784196, 7209050, 6357109, 6488168, 5898290, 7798856, 3670081, 4259919, 6684790, 4259905, 4259905, 4259905, 3997757, 3276902, 4259909, 4849717, 7340107, 7929917, 7995494, 5374022, 4718657, 7012459, 5767221, 4456504, 3276898, 6946892, 7995508, 6881349, 5439567, 5636172, 7471212, 7471180, 4718637, 6226030, 5505144, 5570675, 3670120, 5832814, 5505069, 3145800, 3276848, 4259945, 4784205, 6684739, 7012456, 3276904, 7929907, 6488125, 5898290, 4718642, 6619242, 4718693, 5242960, 6226029, 3735641, 4522094, 3670098, 7667780, 4456568, 6750294, 5832794, 4849775, 5767252, 5832752, 4587622, 3997780, 6422644, 3407956, 5111860]
t = b''
for i in b:
t += i.to_bytes(4, byteorder='little')
print(t)
print(base64.b64encode(t).decode())
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
const {VM, VMScript} = require("vm2");
const crypto = require('crypto')
const fs = require('fs')
function readFile(name){
var data = fs.readFileSync(name);
return data.toString()
}
const vm = new VM({
sandbox: {
'crypto':crypto,
'Blob':Blob,
'URL':URL,
'DOMException':DOMException,
'FormData':FormData,
'MessageChannel':MessageChannel,
'ReadableStream':ReadableStream,
'TextDecoderStream':TextDecoderStream,
'TextEncoderStream':TextEncoderStream,
'TransformStream':TransformStream,
'URLSearchParams':URLSearchParams,
'fetch':fetch,
'setTimeout':setTimeout,
'clearInterval':clearInterval,
}
});
let envCode = readFile("env.js")
let srcCode = readFile("src.js")
let code = envCode + "\n\n\n" + srcCode
code += `
function getargs(){
var xhr = new XMLHttpRequest();
xhr.open('POST', "https://www.southwest.com/api/air-booking/v1/air-booking/page/air/booking/shopping", false);
xhr.send('{"adultPassengersCount":"1","adultsCount":"1","departureDate":"2023-05-27","departureTimeOfDay":"ALL_DAY","destinationAirportCode":"LAS","fareType":"USD","int":"HOMEQBOMAIR","originationAirportCode":"BOS","passengerType":"ADULT","reset":"true","returnDate":"","returnTimeOfDay":"ALL_DAY","tripType":"oneway","application":"air-booking","site":"southwest"}')
// console.log(xhr.headers)
console.log('结束times', times)
console.log(medias.join('|||'))
return JSON.stringify(xhr.headers);
}
`
const script = new VMScript(code,`${__dirname}/debug.js`);
// 运行脚本文件
vm.run(script);
console.log('vm.getGlobal("XMLHttpRequest")', vm.getGlobal("getargs"))
var xhr = vm.getGlobal("getargs");
console.log(xhr())
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button onclick="sendXHr()">发送xhr请求</button>
</body>
</html>
<script src="src.js"></script>
<script>
document.addEventListener("visibilitychange", (eee) => {
console.log(eee)
});
var _send = XMLHttpRequest.prototype.send;
var _setRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
let hreaders = {};
XMLHttpRequest.prototype.send = function (){
console.log("send", arguments);
_send.apply(this, arguments)
}
XMLHttpRequest.prototype.setRequestHeader = function (k,v){
this.hreaders[k] = v
hreaders[k] = v
_setRequestHeader.apply(this, arguments);
}
function sendXHr() {
var xhr = new XMLHttpRequest();
let h = { "accept": "application/json",
"accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
"api-version": "v3",
"application-channel": "Desktop_Web",
"booking-application-type": "NGB",
"cache-control": "no-cache",
"content-type": "application/json",
}
console.log('当前times', times)
// debug = true;
var xhr = new XMLHttpRequest();
xhr.open('POST', "https://www.southwest.com/api/air-booking/v1/air-booking/page/air/booking/shopping", false);
xhr.send('')
console.log(hreaders)
console.log('结束times', times)
debugger
}
console.log('当前times', window.times)
try {
sendXHr()
}catch (e){
console.log(e)
}
console.log('结束times', window.times)
debugger;
</script>
\ No newline at end of file
This diff is collapsed.
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