Files
addon/lib/jsunpack_js2py.py
2025-01-16 00:40:16 +01:00

11 lines
312 B
Python
Executable File

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from lib import js2py
import re
def unpack(source):
fun, data = re.match("""eval\((function\(p,a,c,k,e,d\){.*?})\((['"].*?)\)\)$""", source.strip(), re.MULTILINE).groups()
funPy = js2py.eval_js(fun)
return eval('funPy(' + data + ')')