티스토리 뷰


http://www.sky.ph/board/content.asp?cate=board7&idx=2802&page=9&search=&searchstring=






저는 자바/PHP로 웹 프로그램을 개발하는 사람입니다..
자바로는 시스템에 접근이 쉽지가 않아요..자바의 장점이자 단점이죠..보안과 관련한..
지금 온라인게임 자동사냥매크로를 개발하려고 합니다만 원래대로라면 VC++이 최강이겠죠..
그런데 VB.NET나 C#으로도 윈도우 응용 소프트웨어 개발(자바와같지 않고) 및 온라인게임
자동 사냥 매크로 개발이 가능한지 알고 싶습니다..
게임 매크로라는것은 윈도우 메모리의 수많은 주소들을 검색하고 찾아서 게임의 관련된 자료를 찾아서
접근해야 하는걸로 알고 있는데 이럴려면 C/C++포인터(번지) 연산이 불가피하지 않을까요?
C#에도 자바와 같지 않게 포인터 연산이 지원되는지 모르겠네요..
어차피 C/C++문법은 알고 있어요..문법만!
건너뛰고 C#으로 온라인게임 자동사냥 매크로 개발을 목적으로 공부를 할 수 있다면 했으면 합니다..
가능한가요?









일단, 가능합니다.
게임 가드가 있지 않는 이상은 가능하구요
가드가 있다면, 가드를 무력화시키거나
입력을 기계화(키 이벤트를 날리지 않고 키보드가 직접 누르는 것 같은 효과)
시키던지 해야 할 것입니다.
그런건 무시하고 원하시는 방법은 가능합니다.
Win32API는 DllImport를 이용해서 C#에서 불러 쓸 수 있고,
C/C++로 만든 DLL을 불러서 쓸 수도 있습니다.

제가 온라인게임 메크로를 만들 때 사용했던 Win32API들입니다
제가 제대로 사용을 못해서 그런진 몰라도 안되는 것들도 있었습니다.
그런건 C++로 DLL을 만들어서 사용했습니다.
AnotherAPI를 불러온 부분이 그 부분입니다.

#region -- API 정의
    public class Win32API
    {
        [DllImport("user32.dll")]
        public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

        [DllImport("User32.dll")]
        public static extern void PostMessage(IntPtr hWnd, int nMsg, int nWparam, int nLparam);
        [DllImport("User32.dll")]
        public static extern void SendMessage(IntPtr hWnd, int nMsg, int nWparam, int nLparam);
        [DllImport("User32.dll")]
        public static extern void SetWindowText(IntPtr hWnd, string strName);
        
        [DllImport("User32.dll")]
        public static extern IntPtr GetWindowDC(IntPtr hWnd);
        [DllImport("user32.dll")]
        public static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref RECT rect);
        [DllImport("user32.dll")]
        public static extern bool ScreenToClient(IntPtr hWnd, [In, Out] ref RECT rect);

        [DllImport("User32.dll")]
        public static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
        [DllImport("user32.dll")]
        public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
        [DllImport("user32.dll")]
        public static extern void SetCursorPos(int nX, int nY);
        [DllImport("user32.dll")]
        public static extern void GetCursorPos(IntPtr Point);

        [DllImport("user32.dll")]
        public static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vlc);
        [DllImport("user32.dll")]
        public static extern bool UnregisterHotKey(IntPtr hWnd, int id);

        [DllImport("gdi32.dll")]
        public static extern IntPtr CreateDC(string str1, int n1, int n2, int n3);
        [DllImport("gdi32.dll")]
        public static extern int GetPixel(IntPtr hWnd, int nX, int nY);
       
        [DllImport("kernel32")]
        public static extern bool WritePrivateProfileString(string lpAppName, string lpKeyName, string lpString, string lpFileName);
        [DllImport("kernel32")]
        public static extern uint GetPrivateProfileInt(string lpAppName, string lpKeyName, int nDefault, string lpFileName);
        [DllImport("kernel32")]
        public static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);

        [DllImport("AnotherAPI")]
        public static extern void Gamji(bool bIsGamji, uint nMem);
        [DllImport("AnotherAPI")]
        public static extern int ReadMem(int nMemAddress);
        [DllImport("AnotherAPI")]
        public static extern int ReadMem1B(int nMemAddress);
        [DllImport("AnotherAPI")]
        public static extern void TerminateMetin();

        [DllImport("user32.dll")]
        public static extern void SetForegroundWindow(IntPtr hWnd);

        [DllImport("user32.dll")]
        public static extern void BringWindowToTop(IntPtr hWnd);

        [DllImport("winmm.dll")]
        public static extern int PlaySound(String pszSound, int hmod, int falgs);
    }
    #endregion
댓글

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함