-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpmd.py
More file actions
70 lines (59 loc) · 2.74 KB
/
pmd.py
File metadata and controls
70 lines (59 loc) · 2.74 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import os
import sys
import marshal,zlib,base64
from colorama import Fore
banner =(Fore.RED + '''
___ __ __ ___
| _ \| \/ | | \
| _/| |\/| |_| |) |
|_|(_)_| |_(_)___/
''' + Fore.GREEN + '''Python Marshal Decoder(PMD) ''')
print(banner)
print(Fore.WHITE + " \nCreated by R00tdev1l")
def marshal2():
decode = input(Fore.GREEN + "\n[+]Enter the encrypted code here: " + Fore.WHITE +"")
z = (marshal.loads(zlib.decompress(base64.b16decode(decode))))
os.system("touch output.txt")
from uncompyle6.main import decompile
decompile(2.7,z,open('output.txt','w'))
print(Fore.GREEN + "\n\nThe decoded python2 script has been saved in output.txt\n\n"+ Fore.RED + "Please delete the output.txt before using this tool again!")
def marshal3():
decode = input(Fore.GREEN + "\n[+]Enter the encrypted code here: " + Fore.WHITE + "")
z = (marshal.loads(zlib.decompress(base64.b16decode(decode))))
os.system("touch output.txt")
from uncompyle6.main import decompile
decompile(3.9,z,open('output.txt','w'))
print(Fore.GREEN + "\n\nThe decoded python3 script has been saved in output.txt\n\n"+ Fore.RED + "Please delete the output.txt before using this tool again!")
def marshal4():
decode = input(Fore.GREEN + "\n[+]Enter the encrypted code here: " + Fore.WHITE + "")
z = (marshal.loads(zlib.decompress(base64.b64decode(decode))))
os.system("touch output.txt")
from uncompyle6.main import decompile
decompile(2.7,z,open('output.txt','w'))
print(Fore.GREEN + "\n\nThe decoded python2 script has been saved in output.txt\n\n"+ Fore.RED + "Please delete the output.txt before using this tool again!")
def marshal5():
decode = input(Fore.GREEN + "\n[+]Enter the encrypted code here: " + Fore.WHITE + "")
z = (marshal.loads(zlib.decompress(base64.b64decode(decode))))
os.system("touch output.txt")
from uncompyle6.main import decompile
decompile(2.7,z,open('output.txt','w'))
print(Fore.GREEN + "\n\nThe decoded python3 script has been saved in output.txt\n\n"+ Fore.RED + "Please delete the output.txt before using this tool again!")
try:
if sys.version_info[0] < 2.7:
print(Fore.RED + "\n\n\nPython2 Interpretor Selected\n")
choice = int(input(Fore.WHITE + "[+]Select the base64 bits(1.64Bit/2.16Bit): "))
if choice == 1:
marshal4()
elif choice == 2:
marshal2()
elif sys.version_info[0] < 3.9:
print(Fore.RED + "\n\n\nPython3 Interpretor Selected\n")
choice = int(input(Fore.WHITE + "[+]Select the base64 bits(1.64Bit/2.16Bit): "))
if choice == 1:
marshal5()
elif choice == 2:
marshal3()
else:
pass
except KeyboardInterrupt:
print(Fore.RED + "\n\nCtrl + C detected Exiting!!")