summaryrefslogtreecommitdiff
blob: bd6f65aa920e1b028d5097b9f340c428cb200501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/__init__.py
+++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/__init__.py
@@ -246,7 +246,7 @@
         return sweet_code
 
     def unpack(self, source, evalcode=False):
-        import jsbeautifier.unpackers as unpackers
+        from ..jsbeautifier import unpackers
         try:
             return unpackers.run(source, evalcode)
         except unpackers.UnpackingError as error:
--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/__init__.py
+++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/__init__.py
@@ -7,7 +7,7 @@
 
 import pkgutil
 import re
-from jsbeautifier.unpackers import evalbased
+from ...jsbeautifier.unpackers import evalbased
 
 # NOTE: AT THE MOMENT, IT IS DEACTIVATED FOR YOUR SECURITY: it runs js!
 BLACKLIST = ['jsbeautifier.unpackers.evalbased']
--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py
+++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py
@@ -40,7 +40,7 @@
 except ImportError:
     from urllib.parse import unquote
 
-from jsbeautifier.unpackers import UnpackingError
+from ...jsbeautifier.unpackers import UnpackingError
 
 PRIORITY = 1
 
--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/packer.py
+++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/packer.py
@@ -14,7 +14,7 @@
 
 import re
 import string
-from jsbeautifier.unpackers import UnpackingError
+from ...jsbeautifier.unpackers import UnpackingError
 
 PRIORITY = 1