void main()
{
int
index;
char result[]
=
"KanXueCTF2019JustForhappy"
;
char raw_string[]
=
"abcdefghiABCDEFGHIJKLMNjklmn0123456789opqrstuvwxyzOPQRSTUVWXYZ"
;
/
/
这里求出下标的函数拿到结果就注释掉了
/
*
for
(
int
i
=
0
; i < strlen(result); i
+
+
)
{
index
=
0
;
for
(
int
x
=
0
; x < strlen(raw_string); x
+
+
)
{
if
(result[i]
=
=
raw_string[x])
{
printf(
"%d "
, index);
}
else
{
index
+
+
;
continue
;
}
}
}
*
/
char index_arr[]
=
{
19
,
0
,
27
,
59
,
44
,
4
,
11
,
55
,
14
,
30
,
28
,
29
,
37
,
18
,
44
,
42
,
43
,
14
,
38
,
41
,
7
,
0
,
39
,
39
,
48
};
for
(
int
y
=
0
; y < sizeof(index_arr); y
+
+
)
{
if
(index_arr[y]>
=
0
&& index_arr[y]<
=
9
)
{
index_arr[y]
+
=
48
;
printf(
"%c"
,index_arr[y]);
}
else
if
(index_arr[y]>
=
10
&& index_arr[y]<
=
35
)
{
index_arr[y]
+
=
87
;
printf(
"%c"
, index_arr[y]);
}
else
if
(index_arr[y]>
=
36
&& index_arr[y]<
=
61
)
{
index_arr[y]
+
=
29
;
printf(
"%c"
, index_arr[y]);
}
else
{
puts(
"Bug!"
);
}
}
}