Last active
July 21, 2018 18:37
-
-
Save vasa-develop/21cc35d8a48d7768ab6acaff28b5a445 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 HashForEther { | |
function withdrawWinnings() { | |
// Winner if the last 8 hex characters of the address are 0. | |
require(uint32(msg.sender) == 0); | |
_sendWinnings(); | |
} | |
function _sendWinnings() { | |
msg.sender.transfer(this.balance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment