Skip to content

Instantly share code, notes, and snippets.

@Woolfy025
Forked from Fadi002/Crack Sublime Text.md
Created April 26, 2025 11:32
Show Gist options
  • Save Woolfy025/67d993a791e1ce14e39cad88fabd1fbb to your computer and use it in GitHub Desktop.
Save Woolfy025/67d993a791e1ce14e39cad88fabd1fbb to your computer and use it in GitHub Desktop.
Crack Sublime Text 4.1.9.2 Build 4192 [latest version]
import sys
import os

NOP = 0x90
offsets_and_values = {
    0x000035FE: 0x01,
    0x0000361D: 0x95,
    0x0000361E: 0x9E,
    0x0000361F: 0x57,
    0x00080F00: NOP, 0x00080EFF: NOP, 0x00080F01: NOP, 0x00080F02: NOP, 0x00080F03: NOP, 0x00080F04: NOP, 0x00080F05: NOP, 0x00080F06: NOP, 0x00080F07: NOP, 0x00080F08: NOP, 0x00080F09: NOP, 0x00080F0A: NOP, 0x00080F0B: NOP, 0x00080F0C: NOP, 0x00080F0D: NOP, 0x00080F0E: NOP, 0x00080F0F: NOP, 0x00080F10: NOP, 0x00080F11: NOP, 0x00080F12: NOP, 0x00080F13: NOP, 0x00080F14: NOP, 0x00080F15: NOP, 0x00080F16: NOP, 0x00080F17: NOP, 0x00080F18: NOP, 0x00080F19: NOP, 0x00080F1A: NOP, 0x00080F1B: NOP, 0x00080F1C: NOP, 0x00080F1D: NOP, 0x00080F1E: NOP, 0x00080F1F: NOP, 0x00080F20: NOP, 0x00080F21: NOP, 0x00080F22: NOP, 0x00080F23: NOP, 0x00080F24: NOP, 0x00080F25: NOP, 0x00080F26: NOP, 0x00080F27: NOP, 0x00080F28: NOP, 0x00080F29: NOP, 0x00080F2A: NOP, 0x00080F2B: NOP, 0x00080F2C: NOP, 0x00080F2D: NOP, 0x00080F2E: NOP, 0x00080F2F: NOP, 0x00080F30: NOP, 0x00080F31: NOP, 0x00080F32: NOP, 0x00080F33: NOP, 0x00080F34: NOP, 0x00080F35: NOP, 0x00080F36: NOP, 0x00080F37: NOP, 0x00080F38: NOP, 0x00080F39: NOP,
    0x0057C8B6: 0x70,
    0x0057C8B7: 0x61,
    0x0057C8B8: 0x74,
    0x0057C8B9: 0x63,
    0x0057C8BA: 0x68,
    0x0057C8BB: 0x65,
    0x0057C8BC: 0x64,
    0x0057C8BD: 0x20,
    0x0057C8BE: 0x62,
    0x0057C8BF: 0x79,
    0x0057C8C0: 0x20,
    0x0057C8C1: 0x30,
    0x0057C8C2: 0x78,
    0x0057C8C3: 0x6D,
    0x0057C8C4: 0x72,
    0x0057C8C5: 0x70,
    0x0057C8C6: 0x65,
    0x0057C8C7: 0x70,
    0x0057C8C8: 0x65,
    0x001BFB05: 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

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