现在我正在尝试从这里解决 r5
我已经尝试理解 Hooper 的伪代码
function check_password {
var_28 = arg0;
if (strlen(var_28) != strlen("this_is_not_even_interesting_its_garbage")) {
rax = 0xffffffff;
}
else {
strcpy("this_is_not_even_interesting_its_garbage", var_28);
var_18 = 0x1;
while (var_18 != 0x0) {
var_18 = 0x0;
for (var_14 = 0x0; var_14 <= 0x27; var_14 = var_14 + 0x1) {
if ((*(int8_t *)(sign_extend_32(var_14) + 0x6010a0) & 0xff) != 0x0) {
rax = random();
rcx = *(int8_t *)(sign_extend_64(var_14) + 0x6010a0) & 0xff & 0xff;
temp_3 = rax % rcx;
*(int8_t *)(sign_extend_32(var_14) + 0x6010a0) = (*(int8_t *)(sign_extend_32(var_14) + 0x6010a0) & 0xff) - temp_3 + 0x1;
var_18 = var_18 | *(int8_t *)(sign_extend_32(var_14) + 0x6010a0) & 0xff & 0xff;
*(int8_t *)(sign_extend_32(var_14) + "this_is_not_even_interesting_its_garbage") = (*(int8_t *)(sign_extend_32(var_14) + "this_is_not_even_interesting_its_garbage") & 0xff) - temp_3 + 0x1;
}
}
}
rax = *master;
rax = strcmp(rax, "this_is_not_even_interesting_its_garbage");
}
return rax;
}
但现在对我来说太复杂了。所以我知道密码长度应该是 40 但代码的其他部分是如何工作的?
不清楚的部分是unt8_t
演员表。我已经使用 gdb 单步执行了代码,我看到了某些指令的结果,但不明白为什么会出现这些结果?