[Release] Royal SQL Viewer

04/27/2013 01:06 gr4ph0s#16
Quote:
Originally Posted by TheOnlyOneRaskim View Post
Like C1Ph3r said, create something new, maybe an spr editor ( xDDDDDDD )
Writing a gui who open file in a textbox...

Dev rank gain :D You have make a tool for read SPR !!!! x')

Quote:
Originally Posted by Xijezu View Post
I already tried it, but I guess you have to hook the DirectXInput-Engine.
Why hook DirectXInput-Engine? I think you need to hook send from Winsock and send the correct data to the server ^^
04/27/2013 01:37 Xijezu#17
Quote:
Originally Posted by gr4ph0s View Post
Why hook DirectXInput-Engine? I think you need to hook send from Winsock and send the correct data to the server ^^
Would be another method, but I personally don't like the solution with Winsock. I personally would have handled it via SendMessage, but obviously this doesn't work. :/
04/28/2013 14:05 glandu2#18
To inject command to sframe using winsock, you have to make a complete proxy server supporting rappelz protocol, and tell sframe to use your proxy server instead of directly connecting to the real server, and change the declared game server to change teirs IP too.
Or manage to hook send & recv function as now sframe doesn't allow a non official IP as /auth_ip, that's may be the easiest way to do with injecting packets.

Another solution is to make a special server on the rappelz game server that listen to your commands. There you can implement a encrypted protocol unlike telnet protocol ... But you have to consider security flaws.

About hooking the directx api, you have to probably create a dll that have all implemented function of the orginal dll but change whant you need. I already do that, it works but you have to place your new dll in %systemroot%\system32 folder, not in the rappelz folder else gameguard complains ...

SendMessage doesn't work with a sframe without gameguard ? I remember having injected some text in sframe's textboxes using the ph version (that is without gameguard). But I had to find the correct textbox (It was the chat one) and I don't remember having found a solution about that
04/27/2014 03:54 lxhy#19
it is usefull for me,tks
04/27/2014 13:36 TheOnlyOneRaskim#20
Quote:
Originally Posted by Xijezu View Post
Would be another method, but I personally don't like the solution with Winsock. I personally would have handled it via SendMessage, but obviously this doesn't work. :/

Code:
public const int WM_NCLBUTTONDOWN = 0xA1;
        public const int HT_CAPTION = 0x2;

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

        [DllImportAttribute("user32.dll")]
        public static extern int SendMessage(IntPtr hWnd,
                         int Msg, int wParam, int lParam);
        [DllImportAttribute("user32.dll")]
        public static extern bool ReleaseCapture();

        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);

        [DllImport("User32.Dll", EntryPoint = "PostMessageA")]
        static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);

        [DllImport("user32.dll")]
        static extern byte VkKeyScan(char ch);

        [DllImport("user32.dll", SetLastError = true)]
        static extern bool ShowWindow(IntPtr handle, ShowWindowCommand command);

        const uint WM_KEYDOWN = 0x100;

private enum ShowWindowCommand : int
        {
            SW_HIDE = 0,
            SW_SHOWNORMAL = 1,
            SW_NORMAL = 1,
            SW_SHOWMINIMIZED = 2,
            SW_SHOWMAXIMIZED = 3,
            SW_MAXIMIZE = 3,
            SW_SHOWNOACTIVATE = 4,
            SW_SHOW = 5,
            SW_MINIMIZE = 6,
            SW_SHOWMINNOACTIVE = 7,
            SW_SHOWNA = 8,
            SW_RESTORE = 9,
            SW_SHOWDEFAULT = 10,
            SW_FORCEMINIMIZE = 11,
            SW_MAX = 11,
        }

string tool = Process.GetCurrentProcess().ProcessName;

Process[] pr = Process.GetProcessesByName("sframe");
            Process[] _tool = Process.GetProcessesByName(tool);
            if (pr.Length > 0)
            {
                ShowWindow(pr[0].MainWindowHandle, ShowWindowCommand.SW_RESTORE);
                Thread.Sleep(100);
                SetForegroundWindow(pr[0].MainWindowHandle);
                Thread.Sleep(100);
                SendKeys.SendWait("{ENTER}");
                SendKeys.SendWait("^V");  //zwischenspeicher
                SendKeys.SendWait("{ENTER}");
                ShowWindow(_tool[0].MainWindowHandle, ShowWindowCommand.SW_RESTORE);
                Thread.Sleep(100);
                SetForegroundWindow(_tool[0].MainWindowHandle);
            }
:p