Skip to content

Instantly share code, notes, and snippets.

View psychemist's full-sized avatar
👽
getting cracked

DIKE psychemist

👽
getting cracked
View GitHub Profile
@psychemist
psychemist / hyperdrive.cpp
Last active November 25, 2025 13:26
Arduino Starter Project 2
// 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);
contract FlashLoanAttacker is IFlashLoanEtherReceiver {
Web3BridgeCXIPool private immutable pool;
constructor(address poolAddress) {
pool = Web3BridgeCXIPool(poolAddress);
}
function attack() external {
pool.flashLoan(address(pool).balance);
// 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;
@psychemist
psychemist / Exploits.sol
Created October 22, 2024 17:17
VIPBank Exploits
// 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 {
@psychemist
psychemist / StudentPortal.sol
Last active August 27, 2024 17:07
Classwork for Web3Bridge Week 4 Day 2: Smart Contracts
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
contract StudentPortal {
address owner;
struct Student {
address walletAddress;
string name;
string email;