Created
July 21, 2018 19:57
-
-
Save vasa-develop/190050f6cfd58902701e0796489d159f 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 OwnerWallet { | |
address public owner; | |
//constructor | |
function ownerWallet(address _owner) public { | |
owner = _owner; | |
} | |
// fallback. Collect ether. | |
function () payable {} | |
function withdraw() public { | |
require(msg.sender == owner); | |
msg.sender.transfer(this.balance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment