문제풀이/리버싱
dreamhack 리버싱 rev-basic-8번 코드
Goblebin
2022. 3. 15. 15:11
반응형
#include <stdio.h>
int main() {
int answer[32] = {0xAC, 0xF3, 0x0C, 0x25, 0xA3, 0x10, 0xB7, 0x25, 0x16, 0xC6, 0xB7, 0xBC, 0x07, 0x25, 0x02, 0xD5,
0xC6, 0x11, 0x07, 0xC5};
int answer_count = 0; // answer 배열의 count 변수
int ascii_count = 0; // ascii 코드의 count 변수
int correct_string = 0; // 정답 문자를 담을 변수
for(answer_count=0; answer[answer_count]!=NULL; answer_count++) {
for(ascii_count=0; ascii_count<=127; ascii_count++) {
correct_string = ascii_count*0xFB&0xFF;
if(correct_string == answer[answer_count]) {
printf("%c", ascii_count);
}
}
}
}
int answer[32] = {0xAC, 0xF3, 0x0C, 0x25, 0xA3, 0x10, 0xB7, 0x25, 0x16, 0xC6, 0xB7, 0xBC, 0x07, 0x25, 0x02, 0xD5,
0xC6, 0x11, 0x07, 0xC5};
int answer_count = 0; // answer 배열의 count 변수
int ascii_count = 0; // ascii 코드의 count 변수
int correct_string = 0; // 정답 문자를 담을 변수
for(answer_count=0; answer[answer_count]!=NULL; answer_count++) {
for(ascii_count=0; ascii_count<=127; ascii_count++) {
correct_string = ascii_count*0xFB&0xFF;
if(correct_string == answer[answer_count]) {
printf("%c", ascii_count);
}
}
}
}
15분
반응형