Skip to content

Instantly share code, notes, and snippets.

@Fadi002
Created May 23, 2025 22:20
Show Gist options
  • Select an option

  • Save Fadi002/51a505cece648915bc2f32f3b7e6b71d to your computer and use it in GitHub Desktop.

Select an option

Save Fadi002/51a505cece648915bc2f32f3b7e6b71d 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

@erbanku

erbanku commented Sep 8, 2026

Copy link
Copy Markdown

Build 4200 · macOS · Universal Binary

(Apple Silicon native + x86_64 Rosetta)

Screen Shot 2026-09-08 at 15 16 06 PM

Verified on macOS 26 / Apple Silicon, Sublime Text Build 4200 (CFBundleVersion 4200).

Clean universal binary md5 4aa67b38ccfcc37a2e7af0239750f889
Patched universal binary md5 50adbbfb5e5092bb83c749146378126c
ARM64 thin slice md5 88859ce97336a17b4e3eb9fad1f37cf4

1. Quit Sublime Text

osascript -e 'quit app "Sublime Text"' 2>/dev/null || true
sleep 2
pgrep sublime_text && echo "still running" || echo "stopped"

2. Backup

SUBLIME_BIN="/Applications/Sublime Text.app/Contents/MacOS/sublime_text"
sudo cp "$SUBLIME_BIN" "${SUBLIME_BIN}.backup_$(date +%Y%m%d)"

3. Clone ARM64 patcher

git clone --depth 1 https://github.com/saoGITo/ST_crack.git /tmp/ST_crack

Pattern hits on clean Build 4200 universal binary (each exactly once):

Pattern (original) Offset
628F0294 0xEF3570
5D8F0294 0xEF3584
F657BDA9F44F01A9FD7B02A9FD8300918F910A94 0xEFADA4
E6031EAAC7B80A94 0xEF9E24
F657BDA9F44F01A9FD7B02A9FD830091FF430CD1 0xEF9B4C

x86_64 flag-store (Rosetta slice), offset 0x290500:

0F B6 51 05 83 F2 01  →  C6 41 05 01 B2 00 90

Reference: qzzhoulu1995/sublime · patch_sublime.sh

4. Patch (ARM64 + x86_64)

WORK=/tmp/sublime_patch_work
rm -rf "$WORK" && mkdir -p "$WORK"
cp "$SUBLIME_BIN" "$WORK/sublime_text"

python3 "/tmp/ST_crack/build 4200/patch.py" "$WORK/sublime_text" "$WORK/sublime_text_patched"

python3 - <<'PY'
from pathlib import Path
p = Path("/tmp/sublime_patch_work/sublime_text_patched")
data = bytearray(p.read_bytes())
off = 0x290500
old = bytes.fromhex("0FB6510583F201")
new = bytes.fromhex("C6410501B20090")
assert data[off:off+7] == old, f"x86 mismatch: {data[off:off+7].hex()}"
data[off:off+7] = new
p.write_bytes(data)
print("x86 slice patched")
PY

Expected patch.py output: 5 locations patched.

5. Install + re-sign

SUBLIME_APP="/Applications/Sublime Text.app"
sudo cp "$WORK/sublime_text_patched" "$SUBLIME_BIN"
sudo xattr -rc "$SUBLIME_APP"
sudo codesign --force --deep --sign - "$SUBLIME_APP"

6. Verify bytes

python3 - <<'PY'
import hashlib
from pathlib import Path
data = Path("/Applications/Sublime Text.app/Contents/MacOS/sublime_text").read_bytes()
print("md5", hashlib.md5(data).hexdigest())
print("arm nop1", data[0xEF3570:0xEF3574].hex() == "1f2003d5")
print("x86 flag", data[0x290500:0x290507].hex() == "c6410501b20090")
PY

Expected patched md5: 50adbbfb5e5092bb83c749146378126c

Launch check: start. Help → About — Remove License in Help menu = patch OK. Title bar may still show (UNREGISTERED).

Restore

sudo cp "${SUBLIME_BIN}.backup_YYYYMMDD" "$SUBLIME_BIN"
sudo codesign --force --deep --sign - "/Applications/Sublime Text.app"

Sublime updates overwrite the patch — re-run after upgrade.

@erbanku

erbanku commented Sep 8, 2026

Copy link
Copy Markdown

@fredquie

Copy link
Copy Markdown

Stop-Process -Name "sublime_text" -ErrorAction SilentlyContinue; $path = "C:\Program Files\Sublime Text\sublime_text.exe"; if (Test-Path $path) { Copy-Item $path "$path.bak" -Force; [byte[]]$b = [System.IO.File]::ReadAllBytes($path); $s = byte[]; $r = byte[]; for($i=0; $i -le $b.Length - $s.Length; $i++){ $match=$true; for($j=0; $j -lt $s.Length; $j++){ if($b[$i+$j] -ne $s[$j]){ $match=$false; break } }; if($match){ for($j=0; $j -lt $s.Length; $j++){ $b[$i+$j] = $r[$j] }; break } }; [System.IO.File]::WriteAllBytes($path, $b); Write-Host "Patch applied and .bak backup created successfully!" -ForegroundColor Green } else { Write-Host "Error: sublime_text.exe not found in the default path." -ForegroundColor Red }

Works great ! Thx

@drubicza

drubicza commented Sep 15, 2026 •

Copy link
Copy Markdown
  • Sublime Text Dev 4211 (Linux & Windows)
  • Sublime Merge Stable 2130 (Linux & Windows)

st4011-linux sm2130-linux

ss-st-4211 ss-sm-2130

@drubicza

drubicza commented Sep 17, 2026 •

Copy link
Copy Markdown
  • Sublime Text Build 4212 Linux
sublime-text-4212-linux
  • Sublime Merge Build 2132 Linux
sublime-merge-2132

@aljawaid

Copy link
Copy Markdown
  • Sublime Text Build 4212 Linux
sublime-text-4212-linux
* Sublime Merge Build 2132 Linux
sublime-merge-2132

can you please explain how to do it for Windows 11 with python installed in powershell for sublime text and sublime merge? none of the instructions seem to work

@ubuntuvim

Copy link
Copy Markdown
image

very good!!! thank you ...

@ijd

ijd commented Sep 21, 2026

Copy link
Copy Markdown

4213 anyone?

Replace 0F B6 51 0C 83 F2 01 with C6 41 0C 01 31 D2 90

@Ser4ph4

Ser4ph4 commented Sep 21, 2026 •

Copy link
Copy Markdown

4213 anyone?

Replace 0F B6 51 0C 83 F2 01 with C6 41 0C 01 31 D2 90

Thanks :)

Work:
sudo perl -pi -e 's/\x0F\xB6\x51\x0C\x83\xF2\x01/\xC6\x41\x0C\x01\x31\xD2\x90/' /opt/sublime_text/sublime_text

@drubicza

drubicza commented Sep 22, 2026 •

Copy link
Copy Markdown
  • Sublime Text 4213 Windows
st-4213-win
  • Sublime Text 4213 Linux
sublime-text-4213-linux

@kian1990

Copy link
Copy Markdown

4213 macos arm?

@xinshoutw

xinshoutw commented Sep 22, 2026 •

Copy link
Copy Markdown

4213 macos arm?

MacOS Silicon Arm

Replace 09 31 40 39 4A 00 80 52 3F 01 00 71 E9 13 8A 1A with 29 00 80 52 09 31 00 39 E9 03 1F 2A 1F 20 03 D5

  1. Modify: sudo perl -pi -e 's/\x09\x31\x40\x39\x4A\x00\x80\x52\x3F\x01\x00\x71\xE9\x13\x8A\x1A/\x29\x00\x80\x52\x09\x31\x00\x39\xE9\x03\x1F\x2A\x1F\x20\x03\xD5/' /Applications/Sublime\ Text.app/Contents/MacOS/sublime_text
  2. Resign: sudo codesign --force --sign - --preserve-metadata=identifier,entitlements,flags,runtime /Applications/Sublime\ Text.app/Contents/MacOS/sublime_text
Sublime Text 2026-09-22 at 21 31 34@2x

@TheGridRepo

Copy link
Copy Markdown

Sublime Text 4213 Windows any hex code for this

@kian1990

Copy link
Copy Markdown

4213 macos arm?

MacOS Silicon Arm

Replace 09 31 40 39 4A 00 80 52 3F 01 00 71 E9 13 8A 1A with 29 00 80 52 09 31 00 39 E9 03 1F 2A 1F 20 03 D5

  1. Modify: sudo perl -pi -e 's/\x09\x31\x40\x39\x4A\x00\x80\x52\x3F\x01\x00\x71\xE9\x13\x8A\x1A/\x29\x00\x80\x52\x09\x31\x00\x39\xE9\x03\x1F\x2A\x1F\x20\x03\xD5/' /Applications/Sublime\ Text.app/Contents/MacOS/sublime_text
  2. Resign: sudo codesign --force --sign - --preserve-metadata=identifier,entitlements,flags,runtime /Applications/Sublime\ Text.app/Contents/MacOS/sublime_text
Sublime Text 2026-09-22 at 21 31 34@2x

thank you !!!

@wirabae

wirabae commented Sep 23, 2026 •

Copy link
Copy Markdown

Sublime Text Build 4213
Copy the script, save it with the .ps1 extension, and then run it using PowerShell.

change your location path
Happy coding!

gambar
$path = "C:\Program Files\Sublime Text\sublime_text.exe"
$bytes = [System.IO.File]::ReadAllBytes($path)$old = "0F-B6-51-0C-83-F2-01"
$new = "C6-41-0C-01-31-D2-90"

# Lakukan backup file exe terlebih dahulu
Copy-Item $path "$path.bak" -Force

# Konversi hex string ke byte array dan timpa file
$hexOld = $old.Split('-') \vert{} ForEach-Object { [byte]"0x$_" }
$hexNew = $new.Split('-') \vert{} ForEach-Object { [byte]"0x$_" }

# Proses patch
for ($i = 0; $i -le$bytes.Length - $hexOld.Length; $i++) {
    $match =$true
    for ($j = 0; $j -lt $hexOld.Length; $j++) {
        if ($bytes[$i +$j] -ne $hexOld[$j]) { $match =$false; break }
    }
    if ($match) {
        for ($j = 0; $j -lt$hexNew.Length; $j++) {$bytes[$i +$j] = $hexNew[$j]
        }
        [System.IO.File]::WriteAllBytes($path,$bytes)
        Write-Host "Patch Berhasil diterapkan!" -ForegroundColor Green
        break
    }
}

@drubicza

drubicza commented Sep 23, 2026 •

Copy link
Copy Markdown
  • Sublime Text Build 4214 Linux
sublime-text-build-4214-linux
  • Sublime Text Build 4214 Windows
st-4214-win

@iskndrcnr

iskndrcnr commented Sep 23, 2026 •

Copy link
Copy Markdown

Copy the script, save it with the .ps1 extension, and then run it using PowerShell.

change your location path Happy coding!

gambar

Good idea, thanks! But I added some improvements below—it's much better now.

if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))  
{  
 $arguments = "& '" +$myinvocation.mycommand.definition + "'"
 Start-Process powershell -Verb runAs -ArgumentList $arguments
 Break
}

$path = "C:\Program Files\Sublime Text\sublime_text.exe"

$old = "0F-B6-51-0C-83-F2-01"
$new = "C6-41-0C-01-31-D2-90"
$found = $false

Stop-Process -Name sublime_text -Force -ErrorAction SilentlyContinue
Copy-Item $path "$path.bak" -Force
$bytes = [System.IO.File]::ReadAllBytes($path)

$hexOld = $old.Split('-') | ForEach-Object { [byte]"0x$_" }
$hexNew = $new.Split('-') | ForEach-Object { [byte]"0x$_" }

for ($i = 0; $i -le $bytes.Length - $hexOld.Length; $i++) {
   $match = $true

   for ($j = 0; $j -lt $hexOld.Length; $j++) {
       if ($bytes[$i + $j] -ne $hexOld[$j]) {
           $match = $false
           break
       }
   }

   if ($match) {
       for ($j = 0; $j -lt $hexNew.Length; $j++) {
           $bytes[$i + $j] = $hexNew[$j]
       }

       [System.IO.File]::WriteAllBytes($path, $bytes)
       $found = $true
       break
   }
}

if ($found) {
   Write-Host "Done - Target Patched!" -ForegroundColor Green
} else {
   Write-Host "Failed - Target Hex Not Matched!" -ForegroundColor Red
}

Start-Sleep -Seconds 5

@wirabae

wirabae commented Sep 24, 2026

Copy link
Copy Markdown

Good idea, thanks! But I added some improvements below—it's much better now.

ahhh, Thank you for the revisions.

@mdsdtech

Copy link
Copy Markdown

Sublime Text 4 4215?

@xinshoutw

Copy link
Copy Markdown

MacOS Silicon 4215
Replace 09 31 40 39 4A 00 80 52 3F 01 00 71 E9 13 8A 1A with 29 00 80 52 09 31 00 39 E9 03 1F 2A 1F 20 03 D5 too

@TheReplicant07

Copy link
Copy Markdown

Will above work for 4215 - linux?

@Hargriv

Hargriv commented Sep 25, 2026 •

Copy link
Copy Markdown

The Windows version 4215 works with the old instruction 4213.
Patch for version 4215 same as 4213: find and replace 0f b6 51 0c 83 f2 01 with c6 41 0c 01 31 d2 90 in the sublime_text binary

@vatodevops

Copy link
Copy Markdown

Linux 4215 same as 4213:

Work:
sudo perl -pi -e 's/\x0F\xB6\x51\x0C\x83\xF2\x01/\xC6\x41\x0C\x01\x31\xD2\x90/' /opt/sublime_text/sublime_text

@z0h1r-LK

Copy link
Copy Markdown
image Yes! Its working also in ST4 build 4215 Thank you ♥

@TheReplicant07

TheReplicant07 commented Sep 25, 2026 •

Copy link
Copy Markdown

Linux 4215 same as 4213:

Work: sudo perl -pi -e 's/\x0F\xB6\x51\x0C\x83\xF2\x01/\xC6\x41\x0C\x01\x31\xD2\x90/' /opt/sublime_text/sublime_text

Worked - Fedora 44 / 4215. Thank you! 💙

Screenshot From 2026-09-25 19-23-46

@wirabae

wirabae commented Sep 26, 2026 •

Copy link
Copy Markdown
# ==============================================================================
# Script Patch Sublime Text 4 (Build 4213 & 4215) - Windows x64
# ==============================================================================

# 1. Make sure the script is run as Administrator
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host " [!] Please run PowerShell as Administrator!" -ForegroundColor Red
Pause
exit
}

# 2. Close the Sublime Text process if it is running.
$process = Get-Process -Name "sublime_text" -ErrorAction SilentlyContinue
if ($process) {
Write-Host " [*] Closing the running Sublime Text...." -ForegroundColor Yellow
Stop-Process -Name "sublime_text" -Force
Start-Sleep -Seconds 1
}

# 3. Target file location
$path = "C:\Program Files\Sublime Text\sublime_text.exe"

if (-not (Test-Path $path)) {
Write-Host " [!] File sublime_text.exe not found in: $path" -ForegroundColor Red
Pause
exit
}

# 4. Target Byte Pattern (Build 4213 & 4215)
$old = "0F-B6-51-0C-83-F2-01"
$new = "C6-41-0C-01-31-D2-90"

# 5. Create a backup copy (Backup)
Write-Host " [*] Creating backup file: sublime_text.exe.bak...." -ForegroundColor Cyan
Copy-Item $path "$path.bak" -Force

# 6. Convert hex string to byte array
$bytes = [System.IO.File]::ReadAllBytes($path)
$hexOld = $old.Split('-') | ForEach-Object { [byte]"0x$_" }
$hexNew = $new.Split('-') | ForEach-Object { [byte]"0x$_" }

# 7. Byte Search and Replace Process
$patched = $false
for ($i = 0; $i -le $bytes.Length - $hexOld.Length; $i++) {
$match = $true
for ($j = 0; $j -lt $hexOld.Length; $j++) {
if ($bytes[$i + $j] -ne $hexOld[$j]) { 
$match = $false
break 
}
}
if ($match) {
for ($j = 0; $j -lt $hexNew.Length; $j++) {
$bytes[$i + $j] = $hexNew[$j]
}
[System.IO.File]::WriteAllBytes($path, $bytes)
$patched = $true
break
}
}

# 8. Show Execution Results
if ($patched) {
Write-Host " [+] Patch successfully applied to Sublime Text.!" -ForegroundColor Green
} else {
Write-Host " [!] Byte pattern not found. The file may have already been patched, or the version does not match.." -ForegroundColor Yellow
}

Pause 
gambar

@denimus

denimus commented Sep 27, 2026 •

Copy link
Copy Markdown

Thx, don't get it why you ignored so many details if you rewrote your older code, here how proper Power Shell should look:

# ==============================================================================
# Script Patch Sublime Text 4 (Build 4213 & 4215) - Windows x64
# ==============================================================================

# Admin elevation
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit;
}

# Set vars
$path = "C:\Program Files\Sublime Text\sublime_text.exe";
if (-not (Test-Path $path)) { Write-Host " [!] File not found: $path" -ForegroundColor Red; pause; exit; }

[byte[]]$old = @(0x0F, 0xB6, 0x51, 0x0C, 0x83, 0xF2, 0x01);
[byte[]]$new = @(0xC6, 0x41, 0x0C, 0x01, 0x31, 0xD2, 0x90);

# Read file and search for pattern
[byte[]]$bytes = [System.IO.File]::ReadAllBytes($path);$index = -1;
$searchPos = 0;

while ($searchPos -ge 0 -and$searchPos -le ($bytes.Length -$old.Length)) {
    $foundPos = [System.Array]::IndexOf($bytes, $old[0],$searchPos);
    if ($foundPos -eq -1 -or$foundPos -gt ($bytes.Length -$old.Length)) { break; }
    
    $match =$true;
    for ($j = 1; $j -lt $old.Length; $j++) {
        if ($bytes[$foundPos +$j] -ne $old[$j]) { $match =$false; break; }
    }
    
    if ($match) { $index =$foundPos; break; }
    $searchPos =$foundPos + 1;
}

# Stop process, backup and patch if bytes match
if ($index -ge 0) {
    Get-Process "sublime_text" -ErrorAction SilentlyContinue | Stop-Process -Force;
    Copy-Item $path "$path.bak" -Force;
    
    [System.Array]::Copy($new, 0,$bytes, $index,$new.Length);
    [System.IO.File]::WriteAllBytes($path,$bytes);
    
    Write-Host " [+] Patch applied successfully at 0x$($index.ToString('X'))! Backup created." -ForegroundColor Green;
} else {
    Write-Host " [!] Byte pattern not found. No backup created." -ForegroundColor Yellow;
}

pause;

@drubicza

Copy link
Copy Markdown
st-4215

@wirabae

wirabae commented Sep 27, 2026

Copy link
Copy Markdown
# ==============================================================================
# Script Patch Sublime Text 4 (Build 4213 & 4215) - Windows x64
# ==============================================================================

# Admin elevation
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit;
}

# Set vars
$path = "C:\Program Files\Sublime Text\sublime_text.exe";
if (-not (Test-Path $path)) { Write-Host " [!] File not found: $path" -ForegroundColor Red; pause; exit; }

[byte[]]$old = @(0x0F, 0xB6, 0x51, 0x0C, 0x83, 0xF2, 0x01);
[byte[]]$new = @(0xC6, 0x41, 0x0C, 0x01, 0x31, 0xD2, 0x90);

# Read file and search for pattern
[byte[]]$bytes = [System.IO.File]::ReadAllBytes($path);$index = -1;
$searchPos = 0;

while ($searchPos -ge 0 -and$searchPos -le ($bytes.Length -$old.Length)) {
    $foundPos = [System.Array]::IndexOf($bytes, $old[0],$searchPos);
    if ($foundPos -eq -1 -or$foundPos -gt ($bytes.Length -$old.Length)) { break; }
    
    $match =$true;
    for ($j = 1; $j -lt $old.Length; $j++) {
        if ($bytes[$foundPos +$j] -ne $old[$j]) { $match =$false; break; }
    }
    
    if ($match) { $index =$foundPos; break; }
    $searchPos =$foundPos + 1;
}

# Stop process, backup and patch if bytes match
if ($index -ge 0) {
    Get-Process "sublime_text" -ErrorAction SilentlyContinue | Stop-Process -Force;
    Copy-Item $path "$path.bak" -Force;
    
    [System.Array]::Copy($new, 0,$bytes, $index,$new.Length);
    [System.IO.File]::WriteAllBytes($path,$bytes);
    
    Write-Host " [+] Patch applied successfully at 0x$($index.ToString('X'))! Backup created." -ForegroundColor Green;
} else {
    Write-Host " [!] Byte pattern not found. No backup created." -ForegroundColor Yellow;
}

pause;

Sorry, I wasn't focused when I made it; thank you for the correction.

@7p7

7p7 commented Sep 30, 2026

Copy link
Copy Markdown

MacOS Silicon 4215 Replace 09 31 40 39 4A 00 80 52 3F 01 00 71 E9 13 8A 1A with 29 00 80 52 09 31 00 39 E9 03 1F 2A 1F 20 03 D5 too

Not work on macos 26 Apple Silicon.

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