pwndbg_asm
Assembles assembly code into bytes, outputting as hex or string format for shellcode generation.
Instructions
Assemble shellcode into bytes.
pwndbg command: asm Source: pwndbg/commands/asm.py Category: Misc
Assembles the given assembly code and outputs the resulting bytes in the requested format.
Args: session_id: The UUID of the session. shellcode: Assembly code to assemble (e.g. "nop; ret"). format: Output format — "hex" or "string" (default: "hex").
See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/asm/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"shellcode": "<shellcode>"
},
"name": "pwndbg_asm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| shellcode | Yes | ||
| format | No | hex |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |