Commit fad3810f authored by wang's avatar wang

test

parent 9cc8f860
......@@ -82,47 +82,32 @@ class Reese84ByPass(object):
def _repare_js(self):
self._session.cookies.clear()
t1 = time.time()
# r1 = self._session.get(
# 'https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I')
# self.log.log('REQU', f'jsURL: {"https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I"}')
# self.log.log('REQU', f'JSURL: code:{r1.status_code} cost:{(time.time() - t1):.3f}s')
# cache_md5 = md5(r1.text)
# if self._cache_md5 != cache_md5:
# self._cache_md5 = cache_md5
# self.log.log('VMJS', f'JS变化')
# envCode = open(work_dir + 'src/run.js', 'r').read()
# with open(work_dir + f'src/vm_env_{self.thread_name}.js', 'w') as f:
# f.write(envCode + r1.text)
#
# a, filename = tempfile.mkstemp()
# t2 = time.time()
# p = subprocess.Popen(['node', f'{work_dir}src/vm_env_{self.thread_name}.js', filename], stdin=subprocess.PIPE,
# stdout=subprocess.PIPE,
# stderr=subprocess.PIPE)
# output, err = p.communicate(timeout=10)
# if p.returncode == 0:
# datas = output.decode().split('\n')
# else:
# raise Exception("执行 JS 超时")
# self.log.log('VMJS', f'执行JS: cost:{(time.time() - t2):.3f}s')
# data = json.loads(open(filename, 'r').read())
r1 = self._session.get(
'https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I')
self.log.log('REQU', f'jsURL: {"https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I"}')
self.log.log('REQU', f'JSURL: code:{r1.status_code} cost:{(time.time() - t1):.3f}s')
cache_md5 = md5(r1.text)
if self._cache_md5 != cache_md5:
self._cache_md5 = cache_md5
self.log.log('VMJS', f'JS变化')
envCode = open(work_dir + 'src/run.js', 'r').read()
with open(work_dir + f'src/vm_env_{self.thread_name}.js', 'w') as f:
f.write(envCode + r1.text)
# print(len(data['solution']['interrogation']['p']))
from pynocaptcha import IncapsulaReese84Cracker
cracker = IncapsulaReese84Cracker(
user_token="05e33e08-2b53-492a-96ec-7cd5e312fa6d",
href="https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I",
user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
debug=True,
submit=True,
# check_useful=False,
)
ret = cracker.crack()
data = ret
a, filename = tempfile.mkstemp()
t2 = time.time()
p = subprocess.Popen(['node', f'{work_dir}src/vm_env_{self.thread_name}.js', filename], stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, err = p.communicate(timeout=10)
if p.returncode == 0:
datas = output.decode().split('\n')
else:
raise Exception("执行 JS 超时")
self.log.log('VMJS', f'执行JS: cost:{(time.time() - t2):.3f}s')
data = json.loads(open(filename, 'r').read())
# print(len(data['solution']['interrogation']['p']))
t3 = time.time()
url = "https://makeabooking.flyscoot.com/rtaliuery-Doct-The-Then-throngling-Was-Son-Hes-I?d=makeabooking.flyscoot.com"
response = self._session.post(url, headers={
......
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