-
Notifications
You must be signed in to change notification settings - Fork 1
/
bash.py
86 lines (72 loc) · 2.27 KB
/
bash.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
75
76
77
78
79
80
81
82
83
84
85
86
# author : @thebhikandeshmukh
# -*- coding: utf-8 -*-
import os
N = '\033[0m'
D = '\033[90m'
W = '\033[1;37m'
B = '\033[1;34m'
R = '\033[1;31m'
G = '\033[1;32m'
Y = '\033[1;33m'
C = '\033[1;36m'
ask = G + '[' + W + '?' + G + '] '
sukses = G + '[' + W + '√' + G + '] '
eror = R + '[' + W + '!' + R + ']'
banner = """
{} _nnnn_{} _________________
{} dGGGGMMb{} | |
{} @p~qp~~qMb{} ._| {} sheller {} |
{} M{}({}@{})({}@{}) {}M|{} / |_________________|
{} @,{}----.{}JM|{}_/
{} JS^{}\__/{} qKL
dZP qKRb
dZP qKKb
fZP SMMb
HZM MMMM {}Coded by {}: {}BHIKAN DESHMUKH
{} FqM MMMM {}Insta {}: {}@thebhikandeshmukh
{} __|'\ . |\{}dS qML
{} | `. | `' \{}Zq
{}_) \.{}___.{},| .'
\____ ){}MMMMMP{}| .'
`-' `--'
""".format(D, W, D, W, D, W, Y, W, D, W, D, W, D, W, D, Y, D, W, D, Y, D, G, W, G, D, G, W, G, Y, D, Y, D, Y, D, Y, D, Y, D, Y, D, Y, D, Y)
banner2 = """
{}[{}1{}]{} Encrypt {}[{}2{}]{} Decrypt
""".format(G, W, G, W, G, W, G, W)
print(banner)
print(banner2)
def dekrip():
try:
sc = input(ask + W + "Script " + G + "> " + W)
with open(sc, 'r') as f:
filedata = f.read()
newdata = filedata.replace("eval", "echo")
out = input(ask + W + "Output" + G + " > " + W)
with open(out, 'w') as f:
f.write(newdata)
os.system("touch tes.sh")
os.system("bash " + out + " > tes.sh")
os.remove(out)
os.system("mv -f tes.sh " + out)
print(sukses + "Done..")
except KeyboardInterrupt:
print(eror + " Stopped!")
except IOError:
print(eror + " File Not Found!")
def enkrip():
try:
script = input(ask + W + "Script " + G + "> " + W)
output = input(ask + W + "Output " + G + "> " + W)
os.system("bash-obfuscate " + script + " -o " + output)
print(sukses + "Done..")
except KeyboardInterrupt:
print(eror + " Stopped!")
except IOError:
print(eror + " File Not Found!")
takok = input(W + "Choose" + G + " > ")
if takok == "1" or takok == "01":
enkrip()
elif takok == "2" or takok == "02":
dekrip()
else:
print(eror + " Wrong input")