Skip to content

Instantly share code, notes, and snippets.

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