Commit 4aacba69 authored by wangmingming's avatar wangmingming

请求造纸

parent 2297df14
...@@ -117,7 +117,7 @@ while True: ...@@ -117,7 +117,7 @@ while True:
# # with open('js_dom_run1.js', 'w', encoding='utf-8') as f: # # with open('js_dom_run1.js', 'w', encoding='utf-8') as f:
# # f.write(code1 + '\n\n' + c)` # # f.write(code1 + '\n\n' + c)`
t1 = time.time() t1 = time.time()
token = list(db.token_shape.aggregate( [ { '$sample': { 'size': 1 } } ] ))[0]['_id'] # token = list(db.token_shape.aggregate( [ { '$sample': { 'size': 1 } } ] ))[0]['_id']
# 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, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, # p = subprocess.Popen(['node', 'js_dom_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
...@@ -141,7 +141,7 @@ while True: ...@@ -141,7 +141,7 @@ while True:
headers.update(r) headers.update(r)
# headers = r # headers = r
logger.info(f"success:{success} total:{total} {(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}") logger.info(f"success:{success} total:{total} {(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}")
logger.info(f"success:{success} proxy: {proxy} token: {token}") logger.info(f"success:{success} proxy: {proxy}")
url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS" url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data = { data = {
......
...@@ -40,10 +40,26 @@ http.createServer((request,response)=>{ ...@@ -40,10 +40,26 @@ http.createServer((request,response)=>{
window.mouse_move(startx,starty,endx,endy) window.mouse_move(startx,starty,endx,endy)
} }
sid = keys[parseInt(Math.random() * keys.length)] sid = keys[parseInt(_random() * keys.length)]
// sid = "b93e97591189a5841d0288ba" // sid = "b93e97591189a5841d0288ba"
ENV = ENVS[sid] ENV = ENVS[sid]
navis = {
appCodeName: "Mozilla",
appName: ENV.navigatorparams.appname,
appVersion: ENV.navigatorparams.appversion,
language: "en-US",
languages: ['en-US', 'en', 'ru'],
maxTouchPoints: 0,
platform: ENV.navigatorparams.platform,
product: ENV.navigatorparams.product,
productSub: ENV.navigatorparams.productsub,
userAgent: ENV.navigatorparams.useragent,
vendor: ENV.navigatorparams.vendor,
vendorSub: "",
webdriver: false,
hardwareconcurrency: ENV.navigatorparams.hardwareconcurrency
}
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open('POST', "https://jbrest.jetblue.com/lfs-rwb/outboundLFS", false); xhr.open('POST', "https://jbrest.jetblue.com/lfs-rwb/outboundLFS", false);
xhr.send("") xhr.send("")
...@@ -68,11 +84,11 @@ http.createServer((request,response)=>{ ...@@ -68,11 +84,11 @@ http.createServer((request,response)=>{
// console.log(apps) // console.log(apps)
// console.log() // console.log()
}) })
pm2.start({ // pm2.start({
interpreter: 'python3', // interpreter: 'python3',
script: 'jetblue.py', // script: 'jetblue.py',
name:'main' // name:'main'
}) // })
setInterval(async function () { setInterval(async function () {
let res = await fetch('https://www.jetblue.com/js/src/jb-74873.js'); let res = await fetch('https://www.jetblue.com/js/src/jb-74873.js');
...@@ -93,10 +109,27 @@ http.createServer((request,response)=>{ ...@@ -93,10 +109,27 @@ http.createServer((request,response)=>{
window.mouse_move(startx,starty,endx,endy) window.mouse_move(startx,starty,endx,endy)
} }
sid = keys[parseInt(Math.random() * keys.length)] sid = keys[parseInt(_random() * keys.length)]
// sid = "b93e97591189a5841d0288ba" // sid = "b93e97591189a5841d0288ba"
ENV = ENVS[sid] ENV = ENVS[sid]
navis = {
appCodeName: "Mozilla",
appName: ENV.navigatorparams.appname,
appVersion: ENV.navigatorparams.appversion,
language: "en-US",
languages: ['en-US', 'en', 'ru'],
maxTouchPoints: 0,
platform: ENV.navigatorparams.platform,
product: ENV.navigatorparams.product,
productSub: ENV.navigatorparams.productsub,
userAgent: ENV.navigatorparams.useragent,
vendor: ENV.navigatorparams.vendor,
vendorSub: "",
webdriver: false,
hardwareconcurrency: ENV.navigatorparams.hardwareconcurrency
}
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open('POST', "https://jbrest.jetblue.com/lfs-rwb/outboundLFS", false); xhr.open('POST', "https://jbrest.jetblue.com/lfs-rwb/outboundLFS", false);
xhr.send("") xhr.send("")
......
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