區塊鏈與智能合約安全(下)

DASP Top 10 of 2018

Decentralized Application Security Project

 

Preparation

  1. 下載 MetaMask 並安裝
  1. 選擇Ropsten Test network
    

 

Level 0.Hello Ethernaut

await contract.info()
->value:You will find what you need in info1().
 
await contract.info2()
->value:Try info2(), but with "hello" as a parameter.
 
await contract.info2("hello")
->value:The property infoNum holds the number of the next info method to call.
 
await contract.infoNum()
->value: 42
 
await contract.info42()
->value: theMethodName is the name of the next method.
 
await contract.theMethodName()
->value: The method name is method7123949.
 
await contract.method7123949()
->value: If you know the password, submit it to authenticate().