Created
July 21, 2018 19:51
-
-
Save vasa-develop/a733751d0e54f60c9c0df966bdd4a09f 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 FindThisHash { | |
bytes32 constant public hash = 0xb5b5b97fafd9855eec9b41f74dfb6c38f5951141f9a3ecd7f44d5479b630ee0a; | |
constructor() public payable {} // load with ether | |
function solve(string solution) public { | |
// If you can find the pre image of the hash, receive 1000 ether | |
require(hash == sha3(solution)); | |
msg.sender.transfer(1000 ether); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment