Level 1 Noob Hacker
Ethernaut 08 Vault
0 / 100 EXP 100 EXP to Junior Hacker
0%

Challenge 8 / Ethernaut

Vault

Goal

  1. Read the stored password and unlock the Vault.

Your task

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

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

contract Vault {
    bool public locked;
    bytes32 private password;

    constructor(bytes32 _password) {
        locked = true;
        password = _password;
    }

    function unlock(bytes32 _password) public {
        if (password == _password) {
            locked = false;
        }
    }
}