Commit fad3810f authored by wang's avatar wang

test

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