16.Assume ownership
2023-06-23 20:36:00 # 01.Capturetheether CTF

Assume ownership

topic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pragma solidity ^0.4.21;

contract AssumeOwnershipChallenge {
address owner;
bool public isComplete;

function AssumeOwmershipChallenge() public {
owner = msg.sender;
}

function authenticate() public {
require(msg.sender == owner);

isComplete = true;
}
}

analyses&solutions

构造器名字写错了,可以随便调用方法重置owner