-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathExploit.s.sol
More file actions
23 lines (18 loc) · 772 Bytes
/
Exploit.s.sol
File metadata and controls
23 lines (18 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;
import {Script} from "forge-std/Script.sol";
// forge script src/MetaTrustCTF/ECDSA/Exploit.s.sol:ExploitScript -vvvvv --private-key $PRIVATE_KEY --rpc-url $RPC_URL
contract ExploitScript is Script {
function run() public {
vm.startBroadcast();
address verifyAddr = 0x4A4A7729Fdb49Da1969606631DbC9F201e260A2B;
uint256 r = 0x8ca09723f24865bbc3fd194cc60cc95a77943ed5b38671887007072ba917a5ea;
uint256 s = 0xb36a63f0329d0ad45be9bbdea6f62508a9add0d79c51c97adc11dfb720cad37a;
IVerifier(verifyAddr).solve(r, s);
vm.stopBroadcast();
}
}
interface IVerifier {
function solve(uint256 r, uint256 s) external;
}
// Flag: 0x7ed74b5441f5b7fc85a323ffe63f5e0b