// 0426.cpp : Defines the entry point for the console application. // 키젠 1
#include "stdafx.h"
#include <stdio.h>
int main(int argc, char* argv[])
{
char str[20];
int ret = 0, i;
scanf("%s", str);
for( i = 0 ; str[i] ; i++ ){
ret += str[i] << 3;
}
ret += i << 3;
ret = ret << 2;
printf("%d", ret);
return 0;
}
---------------------
while(글자 길이){
답 += 글자 << 3;
}
답 += 길이 << 3;
답 = 답 << 2;
-------------------------------------
// 0425_2.cpp : Defines the entry point for the console application. // 키젠 2 파일
//
#include "stdafx.h"
#include <stdio.h>
int main(int argc, char* argv[])
{
char str[20];
int ESI = 0 , i;
scanf("%s", str);
for( i = 0 ; str[i] ; i++ ){
ESI += str[i] * str[i];
ESI += str[i] >> 1;
ESI -= str[i];
}
printf("답 : %d", ESI);
return 0;
}
------------------------------
while(배열 길이){
ESI += 글자 * 글자;
ESI += 글자 >> 1;
ESI -= 글자;
}
if(ESI == 입력)
GoodJob
---------------------------
#include <stdio.h>
#include <malloc.h>
#include <string.h>
int main(){
char lpCmd[]="LWedqn";
int len;
char ch;
for( len = 0 ; lpCmd[len] ; len++ );
char * p = (char * ) malloc(len+1);;
len = 0;
while(lpCmd[len]){
if( lpCmd[len] >= 'A' && lpCmd[len] <= 'Z')
ch = 'A';
else if(lpCmd[len] >= 'a' && lpCmd[len] <= 'z')
ch = 'a';
else if( lpCmd[len] == ' '){
p[len] = lpCmd[len];
len++;
continue;
}
else
return 0;
p[len]= (lpCmd[len] - ch - 3) % 0x1A + ch;
len++;
}
p[len] = NULL;
printf("%s\n", p);
return 0;
}
----------------------------
'리버싱' 카테고리의 다른 글
17일차, (백트랙)리턴 주소를 활용한 악성코드 생성. (0) | 2013.05.01 |
---|---|
16일차, 복귀주소를 활용한 악성코드 실습 (0) | 2013.04.30 |
13일차 크랙하기. (0) | 2013.04.30 |
12일차 포인터의 caller,callee. 반복문 (0) | 2013.04.23 |
11일차, caller, callee 복귀주소(RETN) (0) | 2013.04.22 |