NandokukaShellGei.sh

難読化シェル芸ツール ver 0.2 - kanata, 12/16/2016 11:37 PM

Download (3.48 KB)

 
1
#!/bin/sh
2

    
3
# 難読化シェル芸ツール ver 0.2
4
# 2016.12.16 kanata
5

    
6
IFS='	
7
'
8

    
9
LIST=$(echo $1 $2 $3 $4 $5 $6 $7 $8 $9 |grep -o .)
10

    
11
for CHAR in ${LIST}
12
do
13
	tac $0|head -95|grep "^${CHAR}"
14
done
15

    
16
echo 
17

    
18
for CHAR in ${LIST}
19
do
20
	WORK=$(tac $0|head -95|grep "^${CHAR}"|cut -f 2-)
21
	if [ "${CHAR}" = "|" ]
22
	then
23
		printf "|"
24
	else
25
		printf '$('"%s"')' "$WORK"
26
	fi
27
done
28
echo
29

    
30
exit 0
31

    
32
!	echo IQ==|base64 -d
33
"	echo Ig==|base64 -d
34
#	echo Iw==|base64 -d
35
$	echo JA==|base64 -d
36
%	echo JQ==|base64 -d
37
&	echo Jg==|base64 -d
38
'	echo Jw==|base64 -d
39
(	echo KA==|base64 -d
40
)	echo KQ==|base64 -d
41
*	echo Kg==|base64 -d
42
+	echo Kw==|base64 -d
43
,	echo LA==|base64 -d
44
-	echo -n|md5sum|cut -c35
45
.	xxd /bin/ls|head -1|cut -c60
46
/	pwd|cut -c1
47
	ls --help|grep ^G|cut -c66
48
0	xxd /bin/ls|head -1|cut -c1
49
1	date '+%s'|cut -c1
50
2	xxd /bin/ls|head -1|cut -d: -f2|cut -c13
51
3	echo|md5sum|cut -c4
52
4	date '+%s'|cut -c2
53
5	xxd /bin/ls|head -1|cut -d: -f2|cut -c5
54
6	xxd /bin/ls|head -1|cut -d: -f2|cut -c10
55
7	xxd /bin/ls|head -1|cut -d: -f2|cut -c7
56
8	echo -n|md5sum|cut -c5
57
9	echo -n|md5sum|cut -c8
58
:	xxd /bin/ls|head -1|tr -d 0-9|cut -c1
59
;	echo Ow==|base64 -d
60
<	ls --help|grep ^G|cut -c28
61
=	echo PQ==|base64 -d
62
>	ls --help|grep ^G|cut -c67
63
?	echo Pw==|base64 -d
64
@	echo QA==|base64 -d
65
A	ls --help|grep ^G|cut -c53|tr a-z A-Z
66
B	echo -n|md5sum|cut -c13|tr a-z A-Z
67
C	ls --help|grep ^G|cut -c5|tr a-z A-Z
68
D	echo -n|md5sum|cut -c7|tr a-z A-Z
69
E	xxd /bin/ls|head -1|cut -d: -f2|cut -c44
70
F	xxd /bin/ls|head -1|cut -d: -f2|cut -c46
71
G	ls --help|grep ^G|cut -c1
72
H	ls --help|grep ^G|cut -c22|tr a-z A-Z
73
I	ls --help|grep ^G|cut -c11|tr a-z A-Z
74
J	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x1d)))|tr a-z A-Z
75
K	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x1c)))|tr a-z A-Z
76
L	xxd /bin/ls|head -1|cut -d: -f2|cut -c45
77
M	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x3a)))
78
N	ls --help|grep ^G|cut -c2
79
O	ls --help|grep ^G|cut -c6|tr a-z A-Z
80
P	ls --help|grep ^G|cut -c32|tr a-z A-Z
81
Q	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x26)))
82
R	ls --help|grep ^G|cut -c7|tr a-z A-Z
83
S	ls --help|grep ^G|cut -c13|tr a-z A-Z
84
T	ls --help|grep ^G|cut -c10|tr a-z A-Z
85
U	ls --help|grep ^G|cut -c3
86
V	printf "%b" $(printf '%s%x' '\x' $((0x15 ^ 0x63)))|tr a-z A-Z
87
W	ls --help|grep ^G|cut -c36|tr a-z A-Z
88
X	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x2f)))
89
Y	yes|head -1|tr a-z A-Z
90
Z	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x2d)))
91
[	echo Ww==|base64 -d
92
\	echo XA==|base64 -d
93
]	echo XQ==|base64 -d
94
^	echo Xg==|base64 -d
95
 	xxd /bin/ls|head -1|cut -d: -f2|cut -c1
96
	printf "\t"
97
`	echo YA==|base64 -d
98
a	ls --help|grep ^G|cut -c53
99
b	echo -n|md5sum|cut -c13
100
c	ls --help|grep ^G|cut -c5
101
d	echo -n|md5sum|cut -c1
102
e	ls --help|grep ^G|cut -c8
103
f	ls --help|grep ^G|cut -c50
104
g	ls --help|grep ^G|cut -c40
105
h	ls --help|grep ^G|cut -c22
106
i	ls --help|grep ^G|cut -c11
107
j	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x1d)))
108
k	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x1c)))
109
l	ls --help|grep ^G|cut -c12
110
m	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x3a)))|tr A-Z a-z
111
n	ls --help|grep ^G|cut -c16
112
o	ls --help|grep ^G|cut -c6
113
p	ls --help|grep ^G|cut -c32
114
q	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x26)))|tr A-Z a-z
115
r	ls --help|grep ^G|cut -c7
116
s	ls --help|grep ^G|cut -c13
117
t	ls --help|grep ^G|cut -c10
118
u	ls --help|grep ^G|cut -c9
119
v	printf "%b" $(printf '%s%x' '\x' $((0x15 ^ 0x63)))
120
w	ls --help|grep ^G|cut -c36
121
x	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x2f)))|tr A-Z a-z
122
y	yes|head -1
123
z	printf "%b" $(printf '%s%x' '\x' $((0x77 ^ 0x2d)))|tr A-Z a-z
124
{	printf "%b" $(printf '%s%x' '\x' $((0x22 ^ 0x59)))
125
|	|
126
}	printf "%b" $(printf '%s%x' '\x' $((0x22 ^ 0x5f)))
Add picture from clipboard (Maximum size: 100 MB)