Created
July 21, 2018 20:01
-
-
Save vasa-develop/ef905637bb4bad2daf57d120e1d3c253 to your computer and use it in GitHub Desktop.
DO NOT USE THIS CODE. THIS CODE IS USED TO DEMONSTRATE A VULNERABILITY IN A SOLIDITY CODE.
This file contains 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
contract Phishable { | |
address public owner; | |
constructor (address _owner) { | |
owner = _owner; | |
} | |
function () public payable {} // collect ether | |
function withdrawAll(address _recipient) public { | |
require(tx.origin == owner); | |
_recipient.transfer(this.balance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment