以太坊智能合约漏洞安全测试

以太坊智能合约漏洞安全测试

演练平台地址:https://capturetheether.com/challenges/lotteries/guess-the-new-number/

参考文档:https://www.anquanke.com/post/id/154104

 

1 Warmup

  1.1  Deploy a contract

题目要求:

  1. Install MetaMask.
  2. Switch to the Ropsten test network.
  3. Get some Ropsten ether. Clicking the “buy” button in MetaMask will take you to a faucet that gives out free test ether.

 

代码:

pragma solidity ^0.4.21; contract DeployChallenge {

   // This tells the CaptureTheFlag contract that the challenge is complete.

   function isComplete() public pure returns (bool) {

      return true;

   }

}}

  1.2  Call me

代码:

 

  1.3 Choose a nickname

题目要求:

It’s time to set your Capture the Ether nickname! This nickname is how you’ll show up on the leaderboard.

The CaptureTheEther smart contract keeps track of a nickname for every player. To complete this challenge, set your nickname to a non-empty string. The smart contract is running on the Ropsten test network at the address 0x71c46Ed333C35e4E6c62D32dc7C8F00D125b4fee.

代码:

 

 

2 Lotteries

  2.1 Guess the number

  2.2 Guess secret number

  2.3 Guess the random number

  2.4 Guess the new number

 

代码:

 

3 Math

4 Accounts

5 Miscellaneous

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值