Commit 2f3640d1 authored by wang's avatar wang

详细对比

parent f1bb74e6
This diff is collapsed.
This diff is collapsed.
...@@ -2,12 +2,17 @@ import platform ...@@ -2,12 +2,17 @@ import platform
import random import random
import subprocess import subprocess
import time import time
import loguru
import requests import requests
import json import json
import tls_client import tls_client
from bson import ObjectId from bson import ObjectId
import hashlib import hashlib
from pymongo import MongoClient from pymongo import MongoClient
from loguru import logger
def md5(text): def md5(text):
...@@ -72,19 +77,19 @@ for i in range(100): ...@@ -72,19 +77,19 @@ for i in range(100):
if m5 != lastHash and usedTime > 2: if m5 != lastHash and usedTime > 2:
lastHash = m5 lastHash = m5
usedTime = 0 usedTime = 0
print('js变化') logger.debug('js变化')
selectId = random.choice(list(envs)) selectId = random.choice(list(envs))
code = open('src.js', 'r').read() code = open('src.js', 'r').read()
code1 = open('js_dom_run.js', 'r').read() code1 = open('js_dom_run.js', 'r').read()
# with open('src_run1.js', 'w') as f: with open('src_run1.js', 'w') as f:
# f.write(code + '\n\n' + c) f.write(code + '\n\n' + c)
# with open('js_dom_run1.js', 'w') as f: # with open('js_dom_run1.js', 'w') as f:
# f.write(code1 + '\n\n' + c)` # f.write(code1 + '\n\n' + c)`
t1 = time.time() t1 = time.time()
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message'] # r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json() # r = requests.get('http://127.0.0.1:3001').json()
# p = subprocess.Popen(['node', 'js_dom_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'js_dom_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'src_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'src_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
...@@ -103,8 +108,7 @@ for i in range(100): ...@@ -103,8 +108,7 @@ for i in range(100):
headers.update(r) headers.update(r)
# headers = r # headers = r
print(f'{(time.time() - t1) *1000:.3f}ms', len(headers['X-1ItxWO9i-a'.lower()])) logger.info(f"{(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}")
print(selectId, headers['user-agent'])
url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS" url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data = { data = {
"tripType": "oneWay", "tripType": "oneWay",
...@@ -134,11 +138,10 @@ for i in range(100): ...@@ -134,11 +138,10 @@ for i in range(100):
# session = requests.Session() # session = requests.Session()
print(tlsV, proxy)
response = session.post(url, headers=headers, json=data) response = session.post(url, headers=headers, json=data)
logger.info(f'tls:{tlsV} proxy:{proxy} res:: {response.status_code}')
# print(response.text) # print(response.text)
print(response.status_code)
if response.status_code != 403: if response.status_code != 403:
res = db.env_shape.update_one( res = db.env_shape.update_one(
{'_id': ObjectId(selectId)}, {'_id': ObjectId(selectId)},
...@@ -150,8 +153,6 @@ for i in range(100): ...@@ -150,8 +153,6 @@ for i in range(100):
uri = 'http://ymx-lcc.unififi.com/header/add' 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))}' proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
print(selectId, headers)
r = requests.post(uri, json={ r = requests.post(uri, json={
'brush_fromto': 'LAS-BOS', 'brush_fromto': 'LAS-BOS',
'brush_fromdate': '2023-05-26', 'brush_fromdate': '2023-05-26',
...@@ -161,5 +162,5 @@ for i in range(100): ...@@ -161,5 +162,5 @@ for i in range(100):
'brush_name':'js', 'brush_name':'js',
'brush_type':'headerB6', 'brush_type':'headerB6',
}) })
print('添加成功') logger.success('添加成功')
# time.sleep(3) # time.sleep(3)
This diff is collapsed.
...@@ -259,37 +259,37 @@ function Window(options) { ...@@ -259,37 +259,37 @@ function Window(options) {
// vm initialization is deferred until script processing is activated // vm initialization is deferred until script processing is activated
this._globalProxy = this; this._globalProxy = this;
// this._globalProxy = new Proxy(this._globalProxy, { this._globalProxy = new Proxy(this._globalProxy, {
// get(target, p, receiver) { get(target, p, receiver) {
// // if (p === 'addEventListener'){ // if (p === 'addEventListener'){
// // debugger; // debugger;
// // } // }
// let res = Reflect.get(target, p, receiver); let res = Reflect.get(target, p, receiver);
// if (!['Object','Window' , 'debug','Math', 'Array', '_random'].includes(p)){ if (!['Object','Window' , 'debug','Math', 'Array', '_random'].includes(p)){
// console.log('window get', p, typeof res) console.log('window get', p, typeof res)
//
// } }
// // if (p === 'StyleSheet'){ // if (p === 'StyleSheet'){
// // debugger; // debugger;
// // } // }
// // console.log(Reflect.get(target, '_cf_chl_ctx', receiver)) // console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
//
// if ( if (
// !['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','JSON', 'Math'].includes(p) && !['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','JSON', 'Math'].includes(p) &&
// res && typeof res === 'object' && typeof p !== 'symbol') { res && typeof res === 'object' && typeof p !== 'symbol') {
// return proxy(res, p) return proxy(res, p)
// } }
// return res; return res;
// }, },
// // set(target, p, newValue, receiver) { // set(target, p, newValue, receiver) {
// // console.log('set window', p, newValue) // console.log('set window', p, newValue)
// // if (typeof newValue === 'string' && newValue.startsWith('3g')) { // if (typeof newValue === 'string' && newValue.startsWith('3g')) {
// // _console(newValue) // _console(newValue)
// // // process.exit(0) // // process.exit(0)
// // } // }
// // return Reflect.set(target, p, newValue, receiver) // return Reflect.set(target, p, newValue, receiver)
// // } // }
// }) })
Object.defineProperty(idlUtils.implForWrapper(this), idlUtils.wrapperSymbol, { get: () => this._globalProxy }); Object.defineProperty(idlUtils.implForWrapper(this), idlUtils.wrapperSymbol, { get: () => this._globalProxy });
// List options explicitly to be clear which are passed through // List options explicitly to be clear which are passed through
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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