This file contains hidden or 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
| // initialize switch state variable | |
| int switchState = 0; | |
| // setup function runs once: when arduino is powered on | |
| void setup() { | |
| // configure digital pins | |
| pinMode(2, INPUT); | |
| pinMode(3, OUTPUT); | |
| pinMode(4, OUTPUT); | |
| pinMode(5, OUTPUT); |
This file contains hidden or 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 FlashLoanAttacker is IFlashLoanEtherReceiver { | |
| Web3BridgeCXIPool private immutable pool; | |
| constructor(address poolAddress) { | |
| pool = Web3BridgeCXIPool(poolAddress); | |
| } | |
| function attack() external { | |
| pool.flashLoan(address(pool).balance); | |
This file contains hidden or 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
| // SPDX-License-Identifier: UNLICENSED | |
| pragma solidity ^0.8.13; | |
| import {Test, console2} from "forge-std/Test.sol"; | |
| import {ChallengeTwo, Exploit} from "../src/ChallengeTwo.sol"; | |
| contract ChallengeTwoTest is Test { | |
| ChallengeTwo public challenge; | |
| Exploit public exploit; | |
| uint count; |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.26; | |
| interface IVIPBank { | |
| function deposit() external payable; | |
| function addVIP(address addr) external; | |
| function withdraw(uint _amount) external; | |
| } | |
| contract DoS_Attack { |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.22; | |
| contract StudentPortal { | |
| address owner; | |
| struct Student { | |
| address walletAddress; | |
| string name; | |
| string email; |
NewerOlder