fix hdmario

This commit is contained in:
marco
2020-05-26 20:30:10 +02:00
parent c4946486ba
commit c8ffb4a55e
4 changed files with 14 additions and 66 deletions

10
lib/jsunpack_js2py.py Normal file
View File

@@ -0,0 +1,10 @@
# -*- 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 + ')')