나뭇잎 책도 한번다돌렷겟다.. 복습하면서 다른책보고 있는데 시간이 좀 남아서 남는시간 마다 심심풀이 삼아 문제나 풀어보려 한다..
level 1 같은경우 crackme#1을 그대로 본떠온 문제다 문제를 한번 보자
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
문제는 다음과 같다 리턴값을 물어보는 문제인데 딱히 올리디버거로 열어보지 않아도, MSDN 에서 API만 검색한다면 답을 얻을 수 있는 문제다 GetDriveTypeA() API의 포맷을 봐보자
GetDriveType function
Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
To determine whether a drive is a USB-type drive, call SetupDiGetDeviceRegistryProperty and specify theSPDRP_REMOVAL_POLICY property.
Syntax
UINT WINAPI GetDriveType( _In_opt_ LPCTSTR lpRootPathName );
Parameters
- lpRootPathName [in, optional]
The root directory for the drive.
A trailing backslash is required. If this parameter is NULL, the function uses the root of the current directory.
Return value
The return value specifies the type of drive, which can be one of the following values.
Return code/value | Description |
---|---|
| The drive type cannot be determined. |
| The root path is invalid; for example, there is no volume mounted at the specified path. |
| The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader. |
| The drive has fixed media; for example, a hard disk drive or flash drive. |
| The drive is a remote (network) drive. |
| The drive is a CD-ROM drive. |
| The drive is a RAM disk. |
'과거의 컴퓨터 공부 > codeengn-basic' 카테고리의 다른 글
(codengn)level6 (0) | 2015.03.04 |
---|---|
(codengn)level5 (0) | 2015.03.03 |
(codeengn)level4 (0) | 2015.03.03 |
(codeengn)level3 (0) | 2015.02.27 |
(codeengn)level2 (0) | 2015.02.27 |