Skip to content

Instantly share code, notes, and snippets.

@nikkpap
Forked from Fadi002/Crack Sublime Text.md
Created September 24, 2025 09:54
Show Gist options
  • Select an option

  • Save nikkpap/24f9e7c45b580c3c5f6318590d321247 to your computer and use it in GitHub Desktop.

Select an option

Save nikkpap/24f9e7c45b580c3c5f6318590d321247 to your computer and use it in GitHub Desktop.
Crack Sublime Text 4.2.0.0 Build 4200 [latest version]
import sys
import os

NOP = 0x90
offsets_and_values = {
    0x00030170: 0x00,
    0x000A94D0: NOP, 0x000A94D1: NOP, 0x000A94D2: NOP, 0x000A94D3: NOP, 0x000A94D4: NOP, 0x000A94D5: NOP, 0x000A94D6: NOP, 0x000A94D7: NOP, 0x000A94D8: NOP, 0x000A94D9: NOP, 0x000A94DA: NOP, 0x000A94DB: NOP, 0x000A94DC: NOP, 0x000A94DD: NOP, 0x000A94DE: NOP, 0x000A94DF: NOP, 0x000A94E0: NOP, 0x000A94E1: NOP, 0x000A94E2: NOP, 0x000A94E3: NOP, 0x000A94E4: NOP, 0x000A94E5: NOP, 0x000A94E6: NOP, 0x000A94E7: NOP, 0x000A94E8: NOP, 0x000A94E9: NOP, 0x000A94EA: NOP, 0x000A94EB: NOP, 0x000A94EC: NOP, 0x000A94ED: NOP, 0x000A94EE: NOP, 0x000A94EF: NOP, 0x000A94F0: NOP, 0x000A94F1: NOP, 0x000A94F2: NOP, 0x000A94F3: NOP, 0x000A94F4: NOP, 0x000A94F5: NOP, 0x000A94F6: NOP, 0x000A94F7: NOP, 0x000A94F8: NOP, 0x000A94F9: NOP, 0x000A94FA: NOP, 0x000A94FB: NOP, 0x000A94FC: NOP, 0x000A94FD: NOP, 0x000A94FE: NOP, 0x000A94FF: NOP, 0x000A9500: NOP, 0x000A9501: NOP, 0x000A9502: NOP, 0x000A9503: NOP, 0x000A9504: NOP, 0x000A9505: NOP, 0x000A9506: NOP, 0x000A9507: NOP, 0x000A9508: NOP, 0x000A9509: NOP, 0x000A950A: NOP, 0x000A950B: NOP, 0x000A950C: NOP, 0x000A950D: NOP, 0x000A950E: NOP, 0x000A950F: NOP,
    0x001C6CCD: 0x02,
    0x001C6CE4: 0x00,
    0x001C6CFB: 0x00,
}

def patch_exe(input_file, output_file=None):
    output_file = output_file or f"{os.path.splitext(input_file)[0]}_patched.exe"
    try:
        with open(input_file, 'rb') as f:
            data = f.read()
        patched_data = bytearray(data)
        for offset, value in offsets_and_values.items():
            if offset < len(patched_data):
                patched_data[offset] = value
        with open(output_file, 'wb') as f:
            f.write(patched_data)
        print(f"[+] Patch applied successfully! Saved as: {output_file}")

    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python patcher.py <input_file> [output_file]")
    else:
        patch_exe(sys.argv[1], sys.argv[2] if len(sys.argv) > 2 else None)

How to Run:

  1. Save the code in a Python script (e.g., patcher.py).

  2. Open the terminal/command prompt and run the script like so:

    python patcher.py "path_to_sublime_text.exe"

    Replace "path_to_sublime_text.exe" with the actual path to the sublime_text.exe file.

  3. The patched version will be saved in the same directory as the original file (or you can specify a custom output path).

Note:

Please be aware that even after applying the patch, the status may still display as (UNREGISTERED). This is normal, and you can safely disregard this message because the app is already activited.
big thanks to @AdvDebug

@nikkpap
Copy link
Author

nikkpap commented Sep 24, 2025

small gui for the mappers :)

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