Commit 8f4f4f86 authored by wangmingming's avatar wangmingming

7777

parent 770e7c69
...@@ -50,26 +50,37 @@ headers = { ...@@ -50,26 +50,37 @@ headers = {
# ] # ]
lastHash = '' lastHash = ''
usedTime = 10 usedTime = 10
code = open('src.js', 'r').read()
selectId = random.choice(list(envs))
selectId = random.choice(list(envs))
code = open('src.js', 'r').read()
code1 = open('js_dom_run.js', 'r').read()
for i in range(100): for i in range(100):
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'
if platform.uname().system == 'Darwin':
proxy = 'http://127.0.0.1:7890'
tlsV = f'chrome_{random.randint(105, 113)}'
session = tls_client.Session(tlsV)
# selectId = 'a74b38e7115cf4d1b1f6976c' # selectId = 'a74b38e7115cf4d1b1f6976c'
c = requests.get('https://www.jetblue.com/js/src/jb-74873.js').text c = session.get('https://www.jetblue.com/js/src/jb-74873.js').text
m5 = md5(c) m5 = md5(c)
if m5 != lastHash and usedTime > 3: if m5 != lastHash and usedTime > 3:
lastHash = m5 lastHash = m5
usedTime = 0 usedTime = 0
print('js变化') print('js变化')
selectId = random.choice(list(envs)) selectId = random.choice(list(envs))
code = open('src.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:
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_run1.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'src_run1.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE, p = subprocess.Popen(['node', 'src_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
output, err = p.communicate(timeout=10) output, err = p.communicate(timeout=10)
tmp = '' tmp = ''
...@@ -114,13 +125,7 @@ for i in range(100): ...@@ -114,13 +125,7 @@ for i in range(100):
"isMultiCity": False, "isMultiCity": False,
"isDomestic": False "isDomestic": False
} }
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'
if platform.uname().system == 'Darwin':
proxy = 'http://127.0.0.1:7890'
tlsV = f'chrome_{random.randint(105,113)}'
session = tls_client.Session( tlsV)
# session = requests.Session() # session = requests.Session()
session.proxies = { session.proxies = {
'http': proxy, 'http': proxy,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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