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
| // Firecrawl CTF Level 1 Solver - run as IIFE in browser console at https://ctf.firecrawl.dev/ | |
| // Pulls problems via /api/session, maps each to a solution by function signature, submits via /api/level-1/finish. | |
| (async () => { | |
| const SOLUTIONS = { | |
| // ===== EASY ===== | |
| "calculateMaterialCost": `function calculateMaterialCost(bronzeKg, marbleKg, woodKg) { return 45*bronzeKg + 30*marbleKg + 8*woodKg; }`, | |
| "calculateOxygen": `function calculateOxygen(astronauts, days) { return 550 * astronauts * days; }`, | |
| "calculateFuel": `function calculateFuel(distanceKm) { return 8.5 * distanceKm / 1000; }`, | |
| "calculateSwimDistance": `function calculateSwimDistance(laps) { return 100 * laps; }`, | |
| "calculateTaxiFare": `function calculateTaxiFare(kilometers) { return 3.5 + 2 * kilometers; }`, |