Skip to content

Instantly share code, notes, and snippets.

@timyc
Last active December 31, 2025 21:54
Show Gist options
  • Select an option

  • Save timyc/99c949bf5fa1cf89ac516a28be397773 to your computer and use it in GitHub Desktop.

Select an option

Save timyc/99c949bf5fa1cf89ac516a28be397773 to your computer and use it in GitHub Desktop.
Remove CurseForge ads from the launcher

This only applies for Windows on the default CurseForge installation. You should have a modern Node.JS installation (I'm using version 20)

  1. Go to C:\Users\<YOUR USER>\AppData\Local\Programs\CurseForge Windows\resources
  2. Run npm init -y in your cmd
  3. Run npm i @electron/asar
  4. Create a new file called hash.js in the directory
  5. Paste the following code into hash.js
const asar = require('@electron/asar');
const crypto = require('crypto');
const path = require('path');

const filePath = path.resolve(__dirname, 'app.asar');

async function main() {
    try {
        const rawHeader = asar.getRawHeader(filePath);
        const hash = crypto.createHash('sha256')
            .update(rawHeader.headerString)
            .digest('hex');

        console.log('SHA256 Hash of ASAR Header:', hash);
    } catch (error) {
        console.error('Error processing ASAR file:', error.message);
    }
}

main();
  1. Run node hash.js and copy the SHA256 Hash value (something like b09141ec49f27b343ed92b532de41dc77d9ddb60ff0c8380a03d85289e9a2878). This will be used later!
  2. Run npx @electron/asar extract app.asar app_made_by_tards
  3. Go to the new app_made_by_tards folder and locate the dist folder
  4. Go to the dist folder and locate the desktop folder
  5. Go to the desktop folder and open desktop.js
  6. Try searching for "curseforge-ad" and change "curseforge-ad":!0,subscribed:!1 to "curseforge-ad":0,subscribed:1

You are only removing the ! marks to emulate being a "subscribed" user

  1. Search for className:"ad-inner",children or regex className:"ad-inner"[^}]*\{show: and replace the function after {show: with 0 so it will look like {show:0.
  2. (OPTIONAL) Search for "ads.intro" and find the span element afterwards which should look something like ("span",{children:[b,"."]}). Change it so nothing is in the brackets: ("span",{children:[]})

Now we're ready to re-pack the app.

  1. Run npx @electron/asar pack app_made_by_tards app.asar in the same directory that the initial unpacked folder is in (C:\Users\<YOUR USER>\AppData\Local\Programs\CurseForge Windows\resources)

  2. Run node hash.js again and remember the new hash.

  3. We will need to edit the CurseForge.exe (located at C:\Users\<YOUR USER>\AppData\Local\Programs\CurseForge Windows\) file. If you can access a Linux machine, the replacement can be done using sed 's/old-hash/new-hash/' CurseForge.exe (replace the hashes with the hashes you have!). We can also manually do this by going to https://hexed.it and searching for the old hash (this will take a while depending on how good your CPU is). You will need to replace the old hash with the new hash by highlighting the entire old hash string and replacing it with the new one. After you are finished, download the new CurseForge.exe and replace your old one with the new one. imageimage

  4. Delete the initial CurseForge data folder located at C:\Users\<YOUR USER>\AppData\Roaming. Should be the folder named CurseForge.

Relaunch the app and you will no longer see ads. You may get a warning from Windows since you've modified the exe without re-signing it.

As of right now, this works but updates to the launcher may change the compiled electron output; I would recommend preventing the app from updating. I believe deleting app-update.yml should do the trick?

If any of the string I used for searching above does not work, search for support.overwolf.com in the file and the line before the opening <style> tag should be the line to edit.

IF for some reason there are still ads showing somewhere, add these domains to an ad blocking client like AdGuard

||adnexus.net^
||sja.yahoo.com^
||criteo.com^
@6er
Copy link

6er commented Dec 27, 2025

Now it doesn't work
2025-12-28

@timyc
Copy link
Author

timyc commented Dec 31, 2025

@6er I've updated the tutorial. It's slightly more complex now that they've added the hash integrity check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment