Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created July 21, 2018 20:01
Show Gist options
  • Save vasa-develop/ef905637bb4bad2daf57d120e1d3c253 to your computer and use it in GitHub Desktop.
Save vasa-develop/ef905637bb4bad2daf57d120e1d3c253 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 Phishable {
address public owner;
constructor (address _owner) {
owner = _owner;
}
function () public payable {} // collect ether
function withdrawAll(address _recipient) public {
require(tx.origin == owner);
_recipient.transfer(this.balance);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment