Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created July 21, 2018 18:34
Show Gist options
  • Save vasa-develop/712915bad162a173f738f0e7c15397d5 to your computer and use it in GitHub Desktop.
Save vasa-develop/712915bad162a173f738f0e7c15397d5 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 WalletLibrary is WalletEvents {
...
// throw unless the contract is not yet initialized.
modifier only_uninitialized { if (m_numOwners > 0) throw; _; }
// constructor - just pass on the owner array to the multiowned and
// the limit to daylimit
function initWallet(address[] _owners, uint _required, uint _daylimit) only_uninitialized {
initDaylimit(_daylimit);
initMultiowned(_owners, _required);
}
// kills the contract sending everything to `_to`.
function kill(address _to) onlymanyowners(sha3(msg.data)) external {
suicide(_to);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment