1600, 1/80 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   ½Â¸®ÀǹڼºÈ¯
   C¾ð¾î·Î ¸¸µç ±×·¡ÇÈ ÇÁ·Î±×·¥

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=267 [º¹»ç]


C¾ð¾î´Â ¹«ÇÑÇÑ ¾ð¾îÀÔ´Ï´Ù. Àß ¹è¿ì½Ã¸é ÁÁ½À´Ï´Ù.

-------------------------

#include <windows.h>

LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
HINSTANCE g_hInst;
LPSTR lpszClass="Mouse";

int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance
                  ,LPSTR lpszCmdParam,int nCmdShow)
{
        HWND hWnd;
        MSG Message;
        WNDCLASS WndClass;
        g_hInst=hInstance;
        
        WndClass.cbClsExtra=0;
        WndClass.cbWndExtra=0;
        WndClass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
        WndClass.hCursor=LoadCursor(NULL,IDC_ARROW);
        WndClass.hIcon=LoadIcon(NULL,IDI_APPLICATION);
        WndClass.hInstance=hInstance;
        WndClass.lpfnWndProc=(WNDPROC)WndProc;
        WndClass.lpszClassName=lpszClass;
        WndClass.lpszMenuName=NULL;
        WndClass.style=CS_HREDRAW | CS_VREDRAW;
        RegisterClass(&WndClass);

        hWnd=CreateWindow(lpszClass,lpszClass,WS_OVERLAPPEDWINDOW,
                  CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
                  NULL,(HMENU)NULL,hInstance,NULL);
        ShowWindow(hWnd,nCmdShow);
        
        while(GetMessage(&Message,0,0,0)) {
                TranslateMessage(&Message);
                DispatchMessage(&Message);
        }
        return Message.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam)
{
        HDC hdc;
        static int x;
        static int y;
        static BOOL bnowDraw=FALSE;
        switch(iMessage) {
        case WM_LBUTTONDOWN:
                x=LOWORD(lParam);
                y=HIWORD(lParam);
                bnowDraw=TRUE;
                return 0;
        case WM_MOUSEMOVE:
                if (bnowDraw==TRUE) {
                        hdc=GetDC(hWnd);
                        MoveToEx(hdc,x,y,NULL);
                        x=LOWORD(lParam);
                        y=HIWORD(lParam);
                        LineTo(hdc,x+1,y+2);
                        LineTo(hdc,x+2,y+3);
                        LineTo(hdc,x-1,y-2);
                        LineTo(hdc,x-2,y-3);
                        LineTo(hdc,y+1,x+2);
                        LineTo(hdc,y+2,x+3);
                        LineTo(hdc,y-1,x-2);
                        LineTo(hdc,y-2,x-3);
                        LineTo(hdc,x+2,y+1);
                        LineTo(hdc,x+3,y+2);
                        LineTo(hdc,x-2,y-1);
                        LineTo(hdc,x-3,y-2);
                        LineTo(hdc,y+2,x+1);
                        LineTo(hdc,y+3,x+2);
                        LineTo(hdc,y-2,x-1);
                        LineTo(hdc,y-3,x-2);
                        ReleaseDC(hWnd,hdc);
                }
                return 0;
        case WM_LBUTTONUP:
                bnowDraw=FALSE;
                return 0;
        case WM_DESTROY:
                PostQuitMessage(0);
                return 0;
        }
        return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}

----------------------------------------

»ó´çÈ÷ API Áß ½¬¿î ºÎºÐ¸¸ ´Ù·ç¾ú°í ¸Þ½ÃÁö ºÎºÐµµ ½¬¿î ¸Þ½ÃÁö¸¸

ó¸®ÇÏ¿´½À´Ï´Ù. ¾ó¸¶µçÁö ¼öÁ¤Çؼ­ ¾Ë¾Æº¸¼¼¿ä. ¿©±â¼­ ±×·¡ÇÈ¿¡ °ü·ÃµÈ ¼Ò½º´Â


if (bnowDraw==TRUE) {
                        hdc=GetDC(hWnd);
                        MoveToEx(hdc,x,y,NULL);
                        x=LOWORD(lParam);
                        y=HIWORD(lParam);
                        LineTo(hdc,x+1,y+2);
                        LineTo(hdc,x+2,y+3);
                        LineTo(hdc,x-1,y-2);
                        LineTo(hdc,x-2,y-3);
                        LineTo(hdc,y+1,x+2);
                        LineTo(hdc,y+2,x+3);
                        LineTo(hdc,y-1,x-2);
                        LineTo(hdc,y-2,x-3);
                        LineTo(hdc,x+2,y+1);
                        LineTo(hdc,x+3,y+2);
                        LineTo(hdc,x-2,y-1);
                        LineTo(hdc,x-3,y-2);
                        LineTo(hdc,y+2,x+1);
                        LineTo(hdc,y+3,x+2);
                        LineTo(hdc,y-2,x-1);
                        LineTo(hdc,y-3,x-2);
                        ReleaseDC(hWnd,hdc);
                }
                return 0;

ÀÌ°ÍÀÌ´Ï±î ¿©±â¸¦ Àß °íÃĺ¸¼¼¿ä. ¼ýÀÚ¸¸ °íÄ¡°Å³ª º¯¼ö¸¦ µû·Î ¸¸µé¾îµµ

±¦Âú½À´Ï´Ù.


±×¸² :

---------


  Hit : 19582     Date : 2005/04/22 05:05



    
nsh009 ºê¶óº¸ 2005/04/24
pkg61 ¾î¶²°ÇÁö º¸±¸ ½Í¾ú´Âµ¥ ÄÄÆÄÀÏÀÌ ¾ÈµÇ³×¿ä...;; ±×³É Çѹø ¾î¶²°ÇÁö º¸°í½Í¾ú´Âµ¥... 2005/06/12  
tmma À½.. ÇѹøÇغ¼±î ±×·¡ÇÈÀ̶ó °ü½ÉÀº ¾ø´Âµ¥.. 2005/06/26  
rkqldhd ¸ÚÀֳ׿ä~ 2005/07/29  
kamijyo ÄÄÆÄÀÏÀÌ ¾ÈµÇ´Â´ë 2005/07/30  
greatjino ÄÄÆÄÀÏ ¾È´ë´Â´ë.. 2005/08/13  
sjun3 api ¼³¸í ÇϽô°Å? api´Â c¾ð¾î¿¡ ¼ÓÇØÀÖ±ä ÇÏÁö¸¸;; 2005/08/24  
vdiablo2v int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ÁÙ¿¡¼­ ¿¡·¯°¡..;; 2005/09/22
... À©µµ¿ìâ Çϳª ¸¸µå´Âµ¥ ¾öû³ª°Ô ±æ°Ô ½á¾ß ÇÏ´øµ¥... ¤Ì 2005/10/03
mati À©µµ¿ì ÄܼÖȯ°æ¿¡¼­ ÄÄÆÄÀÏÇϼžߵ˴ϴÙ. 2006/12/01  
AstroBoy API±º¿ä 2009/04/02  
     [°øÁö] °­Á¸¦ ¿Ã¸®½Ç ¶§´Â ¸»¸Ó¸®¸¦ ´Þ¾ÆÁÖ¼¼¿ä^¤Ñ^ [29] ¸Û¸Û 02/27 19536
1599   [overthewire.org] - leviathan1     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 16
1598   [overthewire.org] - leviathan0     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 13
1597   [Write Up] Crypto Cat's CTF 2024 - BabyFlow     ÇØÅ·ÀßÇÏ°í½Í´Ù
12/29 96
1596   [pwnable.kr] bof     ÇØÅ·ÀßÇÏ°í½Í´Ù
12/25 91
1595   [pwnable.kr] Shellshock[1]     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 221
1594   ShellshockÀÇ ±âº» ¿ä¾à     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 190
1593   [pwnable.kr] fd     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 181
1592   VPNÀÌ ¿¬°áµÇ¾ú´Ù°¡ µµÁß¿¡ ²¨µµ À¥ ºê¶ó¿ìÀú»ó¿¡¼­ À¯ÁöµÇ´Â ÀÌÀ¯     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/22 182
1591   ÇØÄ¿µéÀÌ ÇØÅ·½Ã »ç¿ëÇÏ´Â µð·ºÅ丮 °ø°£[1]     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/22 225
1590   Keyboard Hooking -part2 - (Python3 ver)     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/20 199
1589   [Windows API] Keyboard Hooking     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/20 175
1588   [pwnable.kr] cmd1 °ø·«     ÇØÅ·ÀßÇÏ°í½Í´Ù
10/23 357
1587   netdiscover ÆÄÀ̽ãÀ¸·Î ±¸ÇöÇϱ⠠   ÇØÅ·ÀßÇÏ°í½Í´Ù
08/13 627
1586   ÆÄÀ̽ãÀ» ÀÌ¿ëÇÑ ½ÉÇà À¥ Å©·Ñ·¯     ÇØÅ·ÀßÇÏ°í½Í´Ù
08/13 506
1585   ÆÄÀ̽ã random¸ðµâÀ» ÀÌ¿ëÇÑ ¼ýÀÚ¸ÂÃ߱⠰ÔÀÓ ±¸Çö     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/30 1059
1584   ÆÄÀ̽ã äÆà ÇÁ·Î±×·¥ ±¸Çö     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/28 959
1583   ÆÄÀ̽㠼ÒÄÏ ÇÁ·Î±×·¡¹ÖÀÇ ±âÃÊ     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/26 1111
1582   ¸®´ª½º À¥ ·Î±× ºÐ¼®     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/20 735
1581   ¸®´ª½º/À©µµ¿ì º¸¾È Àåºñ ·Î±×     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/20 894
1 [2][3][4][5][6][7][8][9][10]..[80]

Copyright 1999-2025 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org