find_rop_gadgets_hex
Search for ROP gadgets in hex-encoded machine code to construct ROP chains for CTF Pwn challenges.
Instructions
Search for ROP gadgets (instruction sequences ending with ret) in hex-encoded machine code.
Used for ROP chain construction in CTF Pwn challenges.
Args: hex_code: Hex-encoded machine code bytes. arch: CPU architecture. Default: x86_64. base_address: Base address. Default: "0". max_gadget_len: Maximum number of instructions per gadget. Default: 5. max_results: Maximum number of results to return. Default: 100.
Returns: List of ROP gadgets with addresses and instruction sequences.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex_code | Yes | ||
| arch | No | x86_64 | |
| base_address | No | 0 | |
| max_gadget_len | No | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |