反混淆后

f分析 - 图1

w0是token

那么w2是什么?

f分析 - 图2

其中,this['atomTraceData']在d分析中得知,是轨迹容器。

那么核心逆向就是

unique2DArray A函数 join拼接 N函数

unique2DArray采用嫁接法,可以直接抠过来。

f分析 - 图3

A函数同理:

f分析 - 图4

同理,由于这几个函数都在一个js里,那么可以整合

f分析 - 图5

整合代码

  1. import subprocess
  2. import random
  3. import json
  4. def N_w8(v1, v2):
  5. res = subprocess.check_output(f"node N2.js {v1} {v2}")
  6. res = res.decode('utf-8').strip()
  7. return res
  8. def A_unique2DArray(v1):
  9. res = subprocess.check_output(f"node w2.js {v1}")
  10. res = res.decode('utf-8').strip()
  11. return res
  12. def j_as_ww(v1):
  13. res = subprocess.check_output(f"node j.js {v1}")
  14. res = res.decode('utf-8').strip()
  15. return res
  16. def run():
  17. # 识别滑块的距离
  18. x_distance = 100
  19. # 背景请求返回的token
  20. bg_token = "cc7c74c959d842e69aa980a3430b7884"
  21. trace_data = []
  22. atom_trace_data = []
  23. interval_value = random.randint(100, 300)
  24. step = 2
  25. for i in range(0, x_distance + 1, step):
  26. x_value = i + step
  27. if x_value > x_distance:
  28. x_value = x_distance
  29. interval_value += random.randint(10, 20)
  30. y_value = random.randint(0, 5)
  31. # atom_trace_data
  32. chunk_list = [x_value, y_value, interval_value]
  33. atom_trace_data.append(chunk_list)
  34. # trace_data
  35. line = f"{x_value},{y_value},{interval_value}"
  36. line = N_w8(bg_token, line)
  37. trace_data.append(line)
  38. # print(atom_trace_data)
  39. w2_string = A_unique2DArray(json.dumps(atom_trace_data, separators=(',', ':')))
  40. f_string = j_as_ww(N_w8(bg_token, w2_string))
  41. print(f_string)
  42. if __name__ == '__main__':
  43. run()