본문 바로가기
728x90
반응형

분류 전체보기406

코드엔진 Basic 04 Challenges : Basic 04 Author : CodeEngn Korean : 이 프로그램은 디버거 프로그램을 탐지하는 기능을 갖고 있다. 디버거를 탐지하는 함수의 이름은 무엇인가 English : This program can detect debuggers. Find out the name of the debugger detecting function the program uses. http://codeengn.com/challenges/basic/04 우선 프로그램을 실행시켜 보았더니 "정상"이라는 문자열이 반복적으로 출력된다. 그런데 디버깅을 하고 실행시키면 "디버깅 당함"이라는 문자열이 반복적으로 출력된다.디버깅 중인지, 정상적인 실행중인지를 판단하는 코드가 프로그램 내에 있는 것 같다... 2014. 11. 2.
코드엔진 Basic 03 Challenges : Basic 03 Author : Blaster99 [DCD] Korean : 비주얼베이직에서 스트링 비교함수 이름은? English : What is the name of the Visual Basic function that compares two strings? http://codeengn.com/challenges/basic/03 사실 이 문제는 비주얼베이직 스트링 비교 함수 찾는 문제라서 굳이 분석할 필요는 없지만.. 공부하는 입장이니까 분석 ㄱㄱ. 대충 시리얼 키 입력해서 통과 시키는 크랙미 문제인 것 같다. 가장 쉽게 접근할 수 있는 방법으로 메시지에서 출력되는 문자열을 찾아보자. 크랙미 문제를 많이 풀어보지는 않았지만 대부분의 초보자 문제는 문자열 출력 부분 위에 비교.. 2014. 10. 30.
코드엔진 Basic 02 Challenges : Basic 02 Author : ArturDents Korean : 패스워드로 인증하는 실행파일이 손상되어 실행이 안되는 문제가 생겼다. 패스워드가 무엇인지 분석하시오 English : The program that verifies the password got messed up and ceases to execute. Find out what the password is. http://codeengn.com/challenges/basic/02 손상된 파일이라 그냥 실행해도 안 되서 일단은 올리디버거에 넣어보았다. 위와 같은 에러 메시지가 발생하면서 디버깅 실패! PE뷰어 라는 툴을 이용해서 보았더니 PE구조가 이상하다. 정상적인 PE구조의 경우 위와 같이 헤더와 섹션이 있는데, .. 2014. 10. 30.
c++ 연산자 오버로딩 Colored By Color Scripter™12345678910111213141516171819202122#includeusing namespace std;class test{public: int a, b; test(int a, int b) :a(a), b(b) {} void show(){ cout 2014. 10. 29.
코드엔진 Basic 01 Challenges : Basic 01 Author : abex Korean : HDD를 CD-Rom으로 인식시키기 위해서는 GetDriveTypeA의 리턴값이 무엇이 되어야 하는가 English : What value must GetDriveTypeA return in order to make the computer recognize the HDD as a CD-Rom http://codeengn.com/challenges/basic/01 GetDriveTypeA 함수를 먼저 찾아보자. 디버깅 하자마자 바로 보인다.함수의 리턴 값은 EAX에 들어간다.EAX를 유심히 보면 답을 알 수 있을 것 같다. EAX와 ESI의 값을 증가시키거나 감소시킨 후 그 둘을 비교해 값이 같으면 CD-ROM으로 인식하고 값.. 2014. 10. 27.
C++ mysql 연동 http://dev.mysql.com/downloads/connector/cpp/http://dev.mysql.com/downloads/connector/c/(위 링크는 mysql 커넥터 다운로드) #pragma comment(lib,"libmysql.lib") 프로젝트 속성 -> 구속 속성 -> VC++ 디렉터리 포함 디렉터리에 include 폴더 포함시키고 라이브러리 디렉터리에 lib 폴더 포함함. 한글 안 되면 아래 세 줄 복붙.mysql_query(connection,"set session character_set_connection=euckr;");mysql_query(connection,"set session character_set_results=euckr;"); mysql_query(con.. 2014. 9. 23.
최대공약수 구하기 - 유클리드 호제법 Colored By Color Scripter™12345#include int gcd(int p, int q){ if (q == 0) return p; return gcd(q, p%q); } 2014. 7. 8.
사용자 입력 글자수 제한하기 SendMessage(hEdit[2], EM_LIMITTEXT, (WPARAM)1, 0); 윈도우 핸들, EM_LIMITTEXT, 제한할 글자 수, NULL 2014. 7. 4.
C++ WinForm Frame 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394#include //콜백함수LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);LRESULT OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);LRESULT OnCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);LRESULT OnPaint(HWND hWnd, WPARAM .. 2014. 7. 4.
IP 주소 정수 변환(IP to INT, INT to IP) Colored By Color Scripter™1234567891011121314151617181920#include#include#include#includelong long IPtoINT(char *IP_ADDR){ long long ret = 0; char *oct; for (int i = 3; i>=0;i--){ oct = strtok(IP_ADDR, "."); ret += pow(256., i) * atoi(oct); IP_ADDR = NULL; } return ret;}int main(){ char ip_addr[24]; scanf("%s", &ip_addr); printf("%lld",IPtoINT(ip_addr)); return 0;} 58.184.70.1 이란 IP 주소가 있으면 58 *.. 2014. 7. 3.
소수 구하기 - 에라토스테네스의 체 Colored By Color Scripter™1234567bool Num[100000004] = { true, true }; for (i = 2; i 2014. 7. 3.
쓰레드 동기화와 WAIT_ABANDONED Colored By Color Scripter™12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061#include#include#include#include LONG gTotalCount = 0;HANDLE hMutex; unsigned int WINAPI IncreaseCountOne(LPVOID lpParam){ WaitForSingleObject(hMutex, INFINITE); gTotalCount++; puts("1st thread"); //ReleaseMutex(hMutex); return 0;} unsigned int WINAPI Increas.. 2014. 6. 2.
728x90
반응형