-
Notifications
You must be signed in to change notification settings - Fork 108
/
enc_dec.py
70 lines (63 loc) · 2.57 KB
/
enc_dec.py
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
# Deobfuscated BY HTR-TECH | Tahmid Rayat
# Github : https://github.com/htr-tech
# Instagram : https://www.instagram.com/tahmid.rayat
# Facebook : https://fb.com/tahmid.rayat.oficial
# Messenger : https://m.me/tahmid.rayat.oficial
import marshal, base64, sys, os, time
B = '\x1b[34;1m'
R = '\x1b[31;1m'
G = '\x1b[32;1m'
W = '\x1b[0m'
Y = '\x1b[33;1m'
def banner():
os.system('clear')
print R + ' _ _______'
print R + ' ___ _ _ _ __ _ _ ___ _ __ __ _ _ _ __| |_ |__ /_ )'
print R + "/ -_) ' \\| '_ \\ || |___| ' \\/ _` | '_(_-< ' \\ |_ \\/ /"
print W + '\\___|_||_| .__/\\_, | |_|_|_\\__,_|_| /__/_||_|___/___|'
print W + ' |_| |__/'
print Y + '0{' + 51 * '=' + '}0'
print Y + '|' + B + ' Author : ' + W + 'xNot_Found' + Y + ' |'
print Y + '|' + B + ' Contact : ' + W + '+62823-8637-2115' + Y + ' |'
print Y + '|' + B + ' Email : ' + W + 'febryafriansyah@programmer.net' + Y + ' |'
print Y + '|' + B + ' Website : ' + W + 'http://hatakecnk.noads.biz' + Y + ' |'
print Y + '|' + B + ' Github : ' + W + 'https://github.com/hatakecnk' + Y + ' |'
print Y + '0{' + 51 * '=' + '}0\n'
try:
banner()
file = raw_input('\x1b[0m[\x1b[31m Input Your File /path/file.py \x1b[0m]> \x1b[36m')
except IndexError:
print R + '[' + W + '!' + R + '] ' + W + 'there is an error'
sys.exit()
except KeyboardInterrupt:
print R + '[' + W + '!' + R + '] ' + W + 'ctrl+c detected'
print R + '[' + W + '!' + R + '] ' + W + 'trying to exit'
time.sleep(3)
sys.exit()
except EOFError:
print R + '\n[' + W + '!' + R + '] ' + W + 'ctrl+d detected'
print R + '[' + W + '!' + R + '] ' + W + 'trying to exit'
time.sleep(3)
sys.exit()
else:
try:
fileopen = open(file).read()
except IOError:
banner()
print R + '[' + W + '!' + R + '] ' + W + 'file not exist\n'
sys.exit()
try:
a = compile(fileopen, 'dg', 'exec')
b = marshal.dumps(a)
c = base64.b32encode(b)
except TypeError:
banner()
print R + '[' + W + '!' + R + '] ' + W + 'file already encrypted\n'
sys.exit()
d = '#Encrypted By xNot_Found\n#Github : https://github.com/hatakecnk/\n#Do Not Edit The Script To Avoid Errors\nimport marshal, base64\nexec(marshal.loads(base64.b32decode("' + c + '")))'
e = file.replace('.py', '_enc.py')
f = open(e, 'w')
f.write(d)
f.close()
banner()
print B + '[' + W + '+' + B + '] ' + G + 'file saved : ' + W + e