Created
November 28, 2018 08:05
-
-
Save xunnun/ee8ce6b94fb18316dde868c11c313890 to your computer and use it in GitHub Desktop.
测试短地址攻击
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.10; | |
contract A { | |
address public owner; | |
event Log(bytes,address, uint256); | |
function A() payable { owner = msg.sender;} | |
function() public payable {} | |
function deposit() payable { } | |
function getData() public returns(address,uint256){ | |
return (owner,this.balance); | |
} | |
function trans(address _to,uint256 _amount) public { | |
_to.transfer(_amount); | |
Log(msg.data,_to,_amount); | |
} | |
function delegatecallB(bytes _data) public { | |
this.delegatecall(_data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment