Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Receiving packets + analyzing, kind of events implementation - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Receiving packets + analyzing, kind of events implementation

  1. #11
    Senior Member
    Join Date
    Aug 2008
    Posts
    350

    Receiving packets + analyzing, kind of events implementation

    No, that wasn't the one I meant. I couldn't find *dead*'s one, but here's one from cameri. What comes to 2 kinds of proxies, they do divide into 2 seperate groups. The categories are sockets proxy, which is pretty simple way to get in middle of the packets. Second is hook proxy, which is more complicated, yet more effective, and there's some pre-made libs for that so you don't have to mess with opcodes and so.
    What comes to NG vs Blackd, right now NG is safer as it uses function hooking, which means it uses tibias own procedures, and therefore eliminates the possibility of sending fucked up packets. Yet IMO blackd remains a lot better, more customizable. NG's more for people who have never heard of the term script.

  2. #12
    Junior Member
    Join Date
    Jul 2007
    Posts
    23

    Receiving packets + analyzing, kind of events implementation

    Quote Originally Posted by Melody
    No, that wasn't the one I meant. I couldn't find *dead*'s one, but here's one from cameri. What comes to 2 kinds of proxies, they do divide into 2 seperate groups. The categories are , which is pretty simple way to get in middle of the packets. Second is , which is more complicated, yet more effective, and there's some pre-made libs for that so you don't have to mess with opcodes and so.
    What comes to NG vs Blackd, right now NG is safer as it uses function hooking, which means it uses tibias own procedures, and therefore eliminates the possibility of sending fucked up packets. Yet IMO blackd remains a lot better, more customizable.
    sockets proxy is the middleman between client and server(?)
    and
    hook proxy is sth, what's linked to client(?)

    I love ng's hooking method. can be started whenever and there is not problem with that. blackd's one suxs. ;s

    Quote Originally Posted by Melody
    NG's more for people who have never heard of the term script.
    I would say if there was no scripts in NG, there would not be so famous and good NG.

    I love NG more since I realised that it has own scripting system based on delphi syntax <sup>[source needed]</sup>.


    Edit
    I think I need some help,
    well, I have found recv function pointer
    Code:
    Tibia 8.50
    Found intermodular calls, item 797
     Address=00576147
     Disassembly=CALL DWORD PTR DS:[<&WS2_32.#16>]
     Destination=WS2_32.recv
    But what to do next?
    I have found interesting source [cpp]#include <windows.h>
    #include <iostream>
    FARPROC (WINAPI *GetProcAddressOriginal)(HMODULE hModule, LPCSTR lpProcName);
    FARPROC __stdcall GetProcAddressHook(HMODULE hModule, LPCSTR lpProcName);

    int (WINAPI *osend)(SOCKET s, const char *buf, int len, int flags);
    int __stdcall gsend(SOCKET s, const char *buf, int len, int flags);

    int (WINAPI *orecv)(SOCKET s, const char *buf, int len, int flags);
    int __stdcall grecv(SOCKET s, const char *buf, int len, int flags);

    FARPROC __stdcall GetProcAddressHook(HMODULE hModule, LPCSTR lpProcName)
    {
    FARPROC ret = GetProcAddressOriginal(hModule, lpProcName);


    if(HIWORD(lpProcName))
    {
    printf("%s Detected!\n", lpProcName);
    if(!strcmp(lpProcName, "GetProcAddress"))
    {
    printf("%s Hooked!\n", lpProcName);
    return (FARPROC)GetProcAddressHook;
    }
    }

    return ret;
    }

    int __stdcall gsend(SOCKET s, const char *buf, int len, int flags)
    {
    int ret = osend(s, buf, len, flags);

    printf("Send: %s\n", buf);

    return ret;
    }

    int __stdcall grecv(SOCKET s, const char *buf, int len, int flags)
    {
    int ret = orecv(s, buf, len, flags);

    printf("Recv: %s\n", buf);

    return ret;
    }

    void HookFuncs()
    {
    FARPROC sendproc = GetProcAddress(GetModuleHandle("WS2_32.DLL"), (const char *)19);
    FARPROC recvproc = GetProcAddress(GetModuleHandle("WS2_32.DLL"), (const char *)16);

    HookFunction(GetModuleHandle(0), (DWORD)GetProcAddress, (DWORD)GetProcAddressHook, (void **)&GetProcAddressOriginal);
    HookFunction(GetModuleHandle(0), (DWORD)sendproc, (DWORD)gsend, (void **)&osend);
    HookFunction(GetModuleHandle(0), (DWORD)recvproc, (DWORD)grecv, (void **)&orecv);
    }

    bool WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID _Reserved)
    {
    switch(dwReason)
    {

    case DLL_PROCESS_ATTACH:
    printf("Hooking DLL Loaded\n");
    HookFuncs();
    return true;
    break;

    case DLL_THREAD_ATTACH:
    break;

    case DLL_PROCESS_DETACH:
    printf("Hooking DLL Unloaded\n");
    break;

    case DLL_THREAD_DETACH:
    break;

    }
    return true;
    }
    [/cpp]

    I wonder what should be HookFunction()?
    Are there any examples of using winsocket receive function on this forum?
    For keyword winsocket there is only one result, about xtea.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •