vault-door-3
2024年12月26日小于 1 分钟
9,751 users solved
Description
This vault uses for-loops and byte arrays. The source code for this vault is here: VaultDoor3.java
Hints
Make a table that contains each value of the loop variables and the corresponding buffer index that it writes to.
01. 解题过程
发现了关键的判断部分,发现一个排序逻辑
我这里想要用大脑排序,但是试了两次失败了,随后转用java排序,主要是就近,就不用python了
public class asdasd {
public static void main(String[] args) {
char[] password=new char[32];
String buffer="jU5t_a_sna_3lpm18gb41_u_4_mfr340";
int i;
for (i = 0; i < 8; i++) {
password[i]=buffer.charAt(i);
}
for (; i < 16; i++) {
password[23-i]=buffer.charAt(i);
}
for (; i < 32; i += 2) {
password[46 - i]=buffer.charAt(i);
}
for (i = 31; i >= 17; i -= 2) {
password[i]=buffer.charAt(i);
}
System.out.println(password);
}
}
获得flag