Advertisement

capture the ether题解(Account)

阅读量:

题目预览

  • 模糊身份
      • 探究
      • 侵袭
    • 公钥

      • 探究
      • 侵袭
    • 账户接管

      • 探究
      • 侵袭

Fuzzy identity

分析

题目合约:

复制代码
    pragma solidity ^0.4.21;
    
    interface IName {
    function name() external view returns (bytes32);
    }
    
    contract FuzzyIdentityChallenge {
    bool public isComplete;
    
    function authenticate() public {
        require(isSmarx(msg.sender));
        require(isBadCode(msg.sender));
    
        isComplete = true;
    }
    
    function isSmarx(address addr) internal view returns (bool) {
        return IName(addr).name() == bytes32("smarx"

全部评论 (0)

还没有任何评论哟~