# Puzzle 4

## Puzzle

```
############
# Puzzle 4 #
############

00      34      CALLVALUE
01      38      CODESIZE
02      18      XOR
03      56      JUMP
04      FD      REVERT
05      FD      REVERT
06      FD      REVERT
07      FD      REVERT
08      FD      REVERT
09      FD      REVERT
0A      5B      JUMPDEST
0B      00      STOP

? Enter the value to send: (0) 

```

## Solution

`JUMP` to `XOR(msg.value, 12)`.

The objective is to jump to address `0x0A`. Recall that `XOR(msg.value, 12) = 0x0A` implies `msg.value = XOR(0x0A, 12)`. Do it in Python:

<figure><img src="/files/7l8XHpcfwRps2m3VhLO9" alt=""><figcaption><p>XOR(0x0A, 12)</p></figcaption></figure>

The correct input is 6.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ret2basic.gitbook.io/ctfwriteup/web3-ctf/evm-puzzles/puzzle-4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
