DABAPLAY YOUR WAY
DEVELOPER REFERENCE

Daba Pipe API

Build third-party tools that read and write game memory, send input, and capture packets through Daba. All communication goes through a local named pipe. Your app never touches the game process directly.

Architecture

Your App
Daba
Game Process

Daba sits between your application and the game. It handles all the low-level work needed to access game memory safely and keep your tools running smoothly. Your app simply connects to a named pipe, sends commands, and reads responses.

Connecting

Pipe name

\\.\pipe\daba_<pid>

Replace <pid> with the game's process ID. Daba creates the pipe when it attaches to a game and tears it down when the game exits. Use CreateFile with GENERIC_READ | GENERIC_WRITE to open it.

Pipe mode

The pipe operates in byte mode (not message mode). All integers are little-endian. Addresses and sizes are 4 bytes for 32-bit games and described per command below.

Connection lifecycle

  1. Open the pipe with CreateFile.
  2. Send commands (see reference below).
  3. Close the handle when done. Daba accepts new connections immediately.

Quick start

C / C++

DWORD pid = /* game PID */;
char pipeName[64];
sprintf(pipeName, "\\\\.\\pipe\\daba_%u", pid);

HANDLE h = CreateFileA(pipeName, GENERIC_READ | GENERIC_WRITE,
                       0, NULL, OPEN_EXISTING, 0, NULL);

// Ping
BYTE cmd = 0x01;
DWORD n;
WriteFile(h, &cmd, 1, &n, NULL);

BYTE resp;
ReadFile(h, &resp, 1, &n, NULL);
// resp == 0x01 -> OK

CloseHandle(h);

C# / .NET

using var pipe = new NamedPipeClientStream(".", $"daba_{pid}",
    PipeDirection.InOut);
pipe.Connect(3000);

// Ping
pipe.WriteByte(0x01);
int resp = pipe.ReadByte(); // 0x01 = OK

Python

import struct, win32file

h = win32file.CreateFile(
    rf"\\.\pipe\daba_{pid}",
    win32file.GENERIC_READ | win32file.GENERIC_WRITE,
    0, None, win32file.OPEN_EXISTING, 0, None)

# Ping
win32file.WriteFile(h, b"\x01")
_, resp = win32file.ReadFile(h, 1)  # b"\x01" = OK

h.Close()

Command reference

Every command starts with a single byte identifying the operation. Parameters follow immediately. Responses are synchronous: read after each write.

0x01

PING

no params

Health check. Returns 0x01 if Daba is connected to the game.

Request01
Response01
0x02

INFO

no params

Returns the game's PID, architecture, and executable path.

Request02
Response[4:pid] [1:is32] [2:pathLen] [pathLen bytes: path]
pid
Game process ID (uint32)
is32
1 = 32-bit, 0 = 64-bit
pathLen
Length of the executable path (uint16)
path
Null-terminated executable path (ASCII)
0x10

READ

read

Read raw bytes from the game's virtual address space.

Request10 [4:address] [4:length]
Response[4:actualLen] [actualLen bytes: data]
address
Virtual address to read from (uint32)
length
Number of bytes to read (uint32, max 1 MB)
actualLen
Bytes actually read (uint32). 0 on failure.
0x11

WRITE

write

Write raw bytes into the game's memory.

Request11 [4:address] [4:length] [length bytes: data]
Response[1:ok]
address
Virtual address to write to (uint32)
length
Number of bytes to write (uint32)
ok
1 = success, 0 = failed
0x12

VMQUERY

read

Query memory region info (base, size, state, protection).

Request12 [4:address]
Response[4:base] [4:size] [4:state] [4:prot]
base
Region base address (uint32)
size
Region size in bytes (uint32)
state
MEM_COMMIT / MEM_FREE / MEM_RESERVE
prot
PAGE_* protection flags
0x20

MODULES

no params

Enumerate all loaded modules (DLLs) in the game process.

Request20
Response[2:count] then per entry: [4:base] [4:size] [1:nameLen] [name]
0x30

PKT_INIT

packet

Initialize in-game packet capture. Must be called before other PKT commands.

Request30
Response[1:ok]
0x31

PKT_SEND

packet

Inject a packet into the game's network stream.

Request31 [2:length] [length bytes: data]
Response[1:ok]
0x32

PKT_READ

packet

Read all captured packets since last clear.

Request32
Response[4:count] then per packet: [1:type] [2:len] [len bytes: data]
type
0 = received, 1 = sent
0x33

PKT_CLEAR

packet

Clear the captured packet buffer.

Request33
Response[1:ok]
0x34

PKT_STOP

packet

Stop packet capture and clean up hooks.

Request34
Response[1:ok]
0x40

VALLOC

write

Allocate virtual memory inside the game process (MEM_COMMIT | MEM_RESERVE).

Request40 [4:size] [4:protect]
Response[4:address]
size
Allocation size in bytes (uint32)
protect
PAGE_* protection (e.g. 0x04 = PAGE_READWRITE, 0x40 = PAGE_EXECUTE_READWRITE)
address
Base address of allocation (uint32). 0 on failure.
0x41

VFREE

write

Free memory previously allocated with VALLOC (MEM_RELEASE).

Request41 [4:address]
Response[1:ok]
0x42

CTHREAD

write

Create a thread inside the game process and wait for it to complete (10 second timeout). Equivalent to CreateRemoteThread + WaitForSingleObject.

Request42 [4:startAddress] [4:parameter]
Response[1:ok] [4:exitCode]
startAddress
Thread entry point (e.g. address of LoadLibraryA)
parameter
Argument passed to the thread (e.g. address of a DLL path string)
ok
1 = thread created and completed, 0 = failed
exitCode
Thread exit code (uint32). For LoadLibraryA, this is the loaded module handle.
0x43

HIDE_MODULE

write

Hide a loaded module from the game's module list. Removes it from all PEB linked lists and erases its PE header, making it invisible to external module scans. Typically used after injecting a DLL with CTHREAD + LoadLibraryA.

Request43 [4:baseAddress]
Response[1:ok]
baseAddress
Base address of the module to hide (uint32). This is the value returned by LoadLibraryA via CTHREAD.
ok
1 = success, 0 = failed

Input commands

Send keyboard input to the game window without needing direct access to User32. Daba handles the input calls internally, so your app never touches the game process. When the game is focused, use SENDINPUT for realistic hardware-level input. When the game is unfocused (background), use KEYDOWN / KEYUP or KEYPRESS which work via PostMessage.

0x50

INPUT_FINDWND

read

Find the game's main window by class name. Only returns windows belonging to the attached game process. Use this to get an HWND for the other input commands.

Request50 [2:classLen] [classLen bytes: className]
Response[4:hwnd] [1:found]
classLen
Length of the window class name (uint16). Max 255.
className
Window class name to search for (ASCII, e.g. "GxWindowClass").
hwnd
Window handle (uint32). 0 if not found.
found
1 = found, 0 = not found
0x51

INPUT_POSTMSG

input

Post any window message to the game. Works even when the game is not focused. Use for WM_KEYDOWN (0x0100), WM_KEYUP (0x0101), or any other window message. For simpler key input, use KEYDOWN / KEYUP / KEYPRESS instead.

Request51 [4:hwnd] [4:msg] [4:wParam]
Response[1:ok]
hwnd
Target window handle (from FINDWND)
msg
Window message ID (uint32, e.g. 0x0100 = WM_KEYDOWN)
wParam
Message parameter (uint32, e.g. virtual key code)
ok
1 = posted, 0 = failed
0x52

INPUT_SENDINPUT

input

Simulate keyboard input via SendInput. This produces hardware-level events that are indistinguishable from real keystrokes. Only works when the game window is focused (foreground). For background input, use KEYDOWN / KEYUP instead.

Request52 [2:vk] [2:flags]
Response[1:ok]
vk
Virtual key code (uint16, e.g. 0x41 = A)
flags
Input flags (uint16). 0 = key down, 0x0002 = key up (KEYEVENTF_KEYUP)
ok
1 = success, 0 = failed
0x53

INPUT_KEYDOWN

input

Send a WM_KEYDOWN message to the game window. Works in the background (unfocused). Automatically computes the correct scan code and lParam.

Request53 [4:hwnd] [1:vk]
Response[1:ok]
hwnd
Target window handle (from FINDWND)
vk
Virtual key code (uint8)
0x54

INPUT_KEYUP

input

Send a WM_KEYUP message to the game window. Works in the background (unfocused). Automatically sets the transition and previous-state bits in lParam.

Request54 [4:hwnd] [1:vk]
Response[1:ok]
hwnd
Target window handle (from FINDWND)
vk
Virtual key code (uint8)
0x55

INPUT_KEYPRESS

input

Send a complete key press: WM_KEYDOWN, wait, then WM_KEYUP. Works in the background. The delay between down and up defaults to 50ms if set to 0, capped at 2000ms.

Request55 [4:hwnd] [1:vk] [2:delayMs]
Response[1:ok]
hwnd
Target window handle (from FINDWND)
vk
Virtual key code (uint8)
delayMs
Milliseconds between key-down and key-up (uint16, 0 = 50ms default, max 2000)

Input example

Background key press (Python)

Send a key press to the game window even when it is not focused. This replaces direct calls to PostMessageW via ctypes — Daba handles the User32 calls internally.

import struct, win32file

h = win32file.CreateFile(
    rf"\\.\pipe\daba_{pid}",
    win32file.GENERIC_READ | win32file.GENERIC_WRITE,
    0, None, win32file.OPEN_EXISTING, 0, None)

# 1. Find the game window by class name
class_name = b"GxWindowClass"  # WoW's main window class
win32file.WriteFile(h, b"\x50" + struct.pack("<H", len(class_name)) + class_name)
_, resp = win32file.ReadFile(h, 5)
hwnd = struct.unpack("<I", resp[:4])[0]
found = resp[4]

if found:
    # 2. Send a full key press (background, works unfocused)
    VK_1 = 0x31  # "1" key
    delay_ms = 80
    win32file.WriteFile(h, b"\x55" + struct.pack("<IBH", hwnd, VK_1, delay_ms))
    _, resp = win32file.ReadFile(h, 1)
    # resp == b"\x01" -> key press sent

    # 3. Or send individual key-down / key-up for held keys
    VK_W = 0x57  # "W" key (move forward)
    win32file.WriteFile(h, b"\x53" + struct.pack("<IB", hwnd, VK_W))
    win32file.ReadFile(h, 1)  # key down
    # ... hold for desired duration ...
    win32file.WriteFile(h, b"\x54" + struct.pack("<IB", hwnd, VK_W))
    win32file.ReadFile(h, 1)  # key up

h.Close()

Foreground input (Python)

When the game window is focused, use SENDINPUT for hardware-level keyboard events that are indistinguishable from real keystrokes.

# SendInput key down (game must be focused)
VK_1 = 0x31
win32file.WriteFile(h, b"\x52" + struct.pack("<HH", VK_1, 0x0000))
win32file.ReadFile(h, 1)

# SendInput key up
win32file.WriteFile(h, b"\x52" + struct.pack("<HH", VK_1, 0x0002))
win32file.ReadFile(h, 1)

DLL injection example

Inject a DLL into the game process and protect it from external scans using VALLOC + WRITE + CTHREAD + HIDE_MODULE:

// 1. Get LoadLibraryA address (same across processes)
DWORD loadLib = (DWORD)GetProcAddress(
    GetModuleHandleA("kernel32.dll"), "LoadLibraryA");

// 2. Allocate memory for DLL path
BYTE req[9] = {0x40};
DWORD pathLen = strlen(dllPath) + 1;
*(DWORD*)(req+1) = pathLen;
*(DWORD*)(req+5) = 0x04; // PAGE_READWRITE
WriteFile(pipe, req, 9, &n, NULL);
DWORD remoteAddr;
ReadFile(pipe, &remoteAddr, 4, &n, NULL);

// 3. Write DLL path into allocated memory
BYTE writeReq[9 + MAX_PATH] = {0x11};
*(DWORD*)(writeReq+1) = remoteAddr;
*(DWORD*)(writeReq+5) = pathLen;
memcpy(writeReq+9, dllPath, pathLen);
WriteFile(pipe, writeReq, 9 + pathLen, &n, NULL);
BYTE ok; ReadFile(pipe, &ok, 1, &n, NULL);

// 4. Create thread at LoadLibraryA(remoteAddr)
BYTE threadReq[9] = {0x42};
*(DWORD*)(threadReq+1) = loadLib;
*(DWORD*)(threadReq+5) = remoteAddr;
WriteFile(pipe, threadReq, 9, &n, NULL);
BYTE tOk; DWORD hModule;
ReadFile(pipe, &tOk, 1, &n, NULL);
ReadFile(pipe, &hModule, 4, &n, NULL);
// hModule = loaded DLL base address

// 5. Free the path buffer
BYTE freeReq[5] = {0x41};
*(DWORD*)(freeReq+1) = remoteAddr;
WriteFile(pipe, freeReq, 5, &n, NULL);
ReadFile(pipe, &ok, 1, &n, NULL);

// 6. Hide the injected DLL from module scans
BYTE hideReq[5] = {0x43};
*(DWORD*)(hideReq+1) = hModule;
WriteFile(pipe, hideReq, 5, &n, NULL);
ReadFile(pipe, &ok, 1, &n, NULL);
// ok == 1 -> module is now hidden

Error handling

  • If Daba is not attached to a game, CreateFile will fail with ERROR_FILE_NOT_FOUND (error 2). Retry after Daba attaches.
  • If another client is already connected, CreateFile may return ERROR_PIPE_BUSY (error 231). Call WaitNamedPipe with a timeout, then retry.
  • If the game exits while you are connected, reads and writes will return 0 bytes. Reconnect after Daba attaches to a new instance.
  • READ returns actualLen = 0 if the address is unreadable (unmapped, guarded, or no-access).
  • WRITE returns ok = 0 if the address is not writable.

Security model

Daba handles all communication with the game process internally. Your application connects to Daba's pipe and never interacts with the game directly. This means:

  • Your app does not need to open a handle to the game process.
  • Your app stays isolated — there is no cross-process access to flag.
  • All memory operations happen inside the game process itself, invisible to external monitors.
  • Input commands (PostMessage, SendInput) are executed by Daba, not your app — input originates from a trusted source.

Limits

Max read size
1 MB (1,048,576 bytes) per READ command
Max packet payload
65,535 bytes (uint16 length)
Concurrent clients
Unlimited. Each connection gets its own handle.
Supported architectures
x86 (32-bit) and x64 (64-bit) game processes