Skip to content

Instantly share code, notes, and snippets.

@driversti
Created May 23, 2025 12:09
Show Gist options
  • Select an option

  • Save driversti/e0281ee6db5275515d0eea18c79d76d6 to your computer and use it in GitHub Desktop.

Select an option

Save driversti/e0281ee6db5275515d0eea18c79d76d6 to your computer and use it in GitHub Desktop.
Automatically dissolve all companies of the holding
(async()=>{for(const c of Object.values(companies).filter(c=>c.holding_company_id=='0')){let id=c.id,d=3000+Math.random()*7000;try{let r=await fetch(`https://www.erepublik.com/en/economy/sell-company/${id}`,{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded','Origin':'https://www.erepublik.com','Referer':`https://www.erepublik.com/en/economy/sell-company/${id}`},body:`disolve=${id}&pin=0000&_token=${SERVER_DATA.csrfToken}`});console.log(`Company ${id}:`,await r.json())}catch(e){console.error(`Fail ${id}:`,e)}await new Promise(r=>setTimeout(r,d))}})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment