Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created July 21, 2018 19:57
Show Gist options
  • Save vasa-develop/190050f6cfd58902701e0796489d159f to your computer and use it in GitHub Desktop.
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.
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