Skip to content

Instantly share code, notes, and snippets.

@driversti
Last active February 2, 2024 19:06
Show Gist options
  • Save driversti/60aeaec61684a86965d6b52e84296df6 to your computer and use it in GitHub Desktop.
Save driversti/60aeaec61684a86965d6b52e84296df6 to your computer and use it in GitHub Desktop.
Auto-opening satoshi boxes

Instruction

THE SCRIPT WILL NOT OPEN BOXES IF THEY ALL ARE DEPLETED!!!!!!!!

  1. Navigate to https://www.erepublik.com/en/main/gold-items
  2. Identify how to open the Developer Console on your browser
  3. Make sure you have open the Console tab!!!
  4. Copy the script below
!function e(){let t=erepublik.citizen.boxKeys.crypto_key;if(t<=1){console.log("You have insufficient keys to continue.");return}!function e(t){let o=SERVER_DATA.csrfToken;if(!o){console.error("CSRF token is missing.");return}fetch("https://www.erepublik.com/en/main/buyGoldItems",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest",Accept:"application/json, text/plain, */*","accept-language":navigator.language,origin:"https://www.erepublik.com",referer:document.location.href,"sec-ch-ua":navigator.userAgent,"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":navigator.platform,"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","user-agent":navigator.userAgent},body:`itemId=crypto_box&currency=crypto_key&amount=${t}&shownPrice=&vipShopItem=false&_token=${o}`,credentials:"include"}).then(e=>e.json()).then(t=>{if(console.log(t),t.boxKeys&&void 0!==t.boxKeys.crypto_key){let o=t.boxKeys.crypto_key,r=o>100?100:o;r>1?setTimeout(()=>e(r),500):console.log("Operation completed. No more keys left.")}else console.error("Failed to update the number of keys from the response.")}).catch(e=>{console.error("Error:",e)})}(t>100?100:t)}();
  1. Paste it into the console
  2. Press Enter button
  3. Read carefully logs produced by the script

To stop the script either reload the page or open any other link on the page to change it.

IMPORTANT!!! To avoid overloading game servers DO NOT start the script earlier than 2-3 seconds before the Day Change!

!function e(){let t=erepublik.citizen.boxKeys.crypto_key;if(t<=1){console.log("You have insufficient keys to continue.");return}!function e(t){let o=SERVER_DATA.csrfToken;if(!o){console.error("CSRF token is missing.");return}fetch("https://www.erepublik.com/en/main/buyGoldItems",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest",Accept:"application/json, text/plain, */*","accept-language":navigator.language,origin:"https://www.erepublik.com",referer:document.location.href,"sec-ch-ua":navigator.userAgent,"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":navigator.platform,"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","user-agent":navigator.userAgent},body:`itemId=crypto_box&currency=crypto_key&amount=${t}&shownPrice=&vipShopItem=false&_token=${o}`,credentials:"include"}).then(e=>e.json()).then(t=>{if(console.log(t),t.boxKeys&&void 0!==t.boxKeys.crypto_key){let o=t.boxKeys.crypto_key,r=o>100?100:o;r>1?setTimeout(()=>e(r),500):console.log("Operation completed. No more keys left.")}else console.error("Failed to update the number of keys from the response.")}).catch(e=>{console.error("Error:",e)})}(t>100?100:t)}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment