This repository has been archived by the owner on Jul 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
dec.py
74 lines (64 loc) · 2.12 KB
/
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
71
72
73
74
import os
import sys
import fileinput
R = '\033[1;31m'
G = '\033[1;32m'
Y = '\033[1;33m'
C = '\033[1;36m'
W = '\033[1;37m'
logo = """
\033[1;33m _____ _
\033[1;33m| __ \ \033[1;36mBash File\033[1;33m | |
\033[1;33m| | | | ___ ___ _ __ _ _ _ __ | |_ ___ _ __
\033[1;33m| | | |/ _ \/ __| '__| | | | '_ \| __/ _ \ '__|
\033[1;33m| |__| | __/ (__| | | |_| | |_) | || __/ |
\033[1;33m|_____/ \___|\___|_| \__, | .__/ \__\___|_|
\033[1;33m __/ | |
\033[1;33m |___/|_|
\033[1;33m
\033[1;36m [\033[1;37m+\033[1;36m]\033[1;32m CREATED BY HTR-TECH (TAHMID RAYAT)
"""
banner = """
{}[{}01{}]{} Decrypt Bash File
{}[{}02{}]{} More Tools from us
""".format(C,W,C,Y,C,W,C,Y)
os.system("clear")
print logo
print banner
def decr():
try:
print ("")
scname = raw_input(G + " Name of the Script to Decrypt" + C + " > " + Y)
o = open(scname,'r')
filedata = o.read()
o.close()
new_dat = filedata.replace("eval","echo")
print ("")
output = raw_input(G + " Name of the Decrypted Script" + C + " > " + Y)
f = open(output,'w')
S = (output)
f.write(new_dat)
f.close()
os.system("touch dummy.sh")
os.system("bash " + output + " > dummy.sh")
os.remove(output)
os.system("mv -f dummy.sh " + output)
print ("")
print (G + " Decryption Succeed...")
print ("")
print (Y + " Decrypted Script Name" + C + " > " + G + S + W)
print ("")
except KeyboardInterrupt():
print (R + " !" + Y + " Tool Stopped " + R + "!" + W)
print ("")
except IOError:
print (R + " !" + Y + " File not Found " + R + "!" + W)
print ("")
maintool = raw_input(G + " Select an option" + C + " > " + Y)
if maintool == "1" or maintool == "01":
decr()
elif maintool == "2" or maintool == "02":
os.system("xdg-open https://github.com/htr-tech/")
else:
print (W + "")
print (C + "[" + R + " !" + C + "]" + Y + " Invalid input " + C + "[" + R + "!" + C + "]")