Level 1 Noob Hacker
Ethernaut 04 Telephone
0 / 100 EXP 100 EXP to Junior Hacker
0%

Challenge 4 / Ethernaut

Telephone

Goal

  1. Change the Telephone owner to the player address.

Your task

Read Telephone.sol, then complete Exploit.s.sol.

:~/targets/ethernaut-telephone$
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Telephone {
    address public owner;

    constructor() {
        owner = msg.sender;
    }

    function changeOwner(address _owner) public {
        if (tx.origin != msg.sender) {
            owner = _owner;
        }
    }
}