Skip to content

Instantly share code, notes, and snippets.

@ijd
Last active November 4, 2026 15:25
Show Gist options
  • Select an option

  • Save ijd/74e725c5d5a248537b7531444302a2f1 to your computer and use it in GitHub Desktop.

Select an option

Save ijd/74e725c5d5a248537b7531444302a2f1 to your computer and use it in GitHub Desktop.
Sublime Text 4215 Crack

Patch with HexEd.it:

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


Windows Script (run as admin):

py -c "open('C:\\Program Files\\Sublime Text\\sublime_text.exe', 'rb+').write(open('C:\\Program Files\\Sublime Text\\sublime_text.exe', 'rb').read().replace(b'\x0F\xB6\x51\x0C\x83\xF2\x01', b'\xC6\x41\x0C\x01\x31\xD2\x90'))"
@ProjectXsent

ProjectXsent commented May 22, 2025 •

Copy link
Copy Markdown

Thank you. Worked on Windows x64.

@hkpD

hkpD commented Sep 22, 2026

Copy link
Copy Markdown

thank you very much

@seshu7k

seshu7k commented Sep 23, 2026

Copy link
Copy Markdown

sudo python3 -c "open('/opt/sublime_text/sublime_text', 'rb+').write(open('/opt/sublime_text/sublime_text', 'rb').read().replace(b'\x0F\xB6\x51\x0C\x83\xF2\x01', b'\xC6\x41\x0C\x01\x31\xD2\x90'))"
for linux

@chard1988

Copy link
Copy Markdown

sudo python3 -c "open('/opt/sublime_text/sublime_text', 'rb+').write(open('/opt/sublime_text/sublime_text', 'rb').read().replace(b'\x0F\xB6\x51\x0C\x83\xF2\x01', b'\xC6\x41\x0C\x01\x31\xD2\x90'))" for linux

Thank you

@z0h1r-LK

z0h1r-LK commented Sep 25, 2026 •

Copy link
Copy Markdown

sudo python3 -c "open('/opt/sublime_text/sublime_text', 'rb+').write(open('/opt/sublime_text/sublime_text', 'rb').read().replace(b'\x0F\xB6\x51\x0C\x83\xF2\x01', b'\xC6\x41\x0C\x01\x31\xD2\x90'))" for linux

There new update build 4215 :)

@ProjectXsent

Copy link
Copy Markdown

Still works on build 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;

@haidarpesebe

Copy link
Copy Markdown

Thank you very much. Worked.

@karlochev

Copy link
Copy Markdown

For version 4215 (Windows 64-bit), do the following:

Open PowerShell as an administrator.

Paste the following:

# 1. Start
$process = Get-Process -Name "sublime_text" -ErrorAction SilentlyContinue
if ($process) { Stop-Process -Name "sublime_text" -Force; Start-Sleep -Seconds 1 }

# 2. Check the default file path
$path = "C:\Program Files\Sublime Text\sublime_text.exe"
if (-not (Test-Path $path)) { 
    Write-Host "[!] File not found in the default file path." -ForegroundColor Red
    exit 
}

# 3. Create an automatic backup (.bak)
Copy-Item $path "$path.bak" -Force
Write-Host "[+] Backup created as sublime_text.exe.bak" -ForegroundColor Green

# 4. Defining Patterns for Build 4215
$oldPattern = "0F-B6-51-0C-83-F2-01"
$newPattern = "C6-41-0C-01-31-D2-90"

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

# 5. Read and Replace Bytess
$bytes = [System.IO.File]::ReadAllBytes($path)
$found = $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] }
        $found = $true
        break
    }
}

if ($found) {
    [System.IO.File]::WriteAllBytes($path, $bytes)
    Write-Host "[+] File successfully modified for Build 4215." -ForegroundColor Green
} else {
    Write-Host "[-] The byte string was not found. Verify that it is Build 4215." -ForegroundColor Yellow
}

Press Enter.

Enjoy!

@smacorp

smacorp commented Nov 1, 2026

Copy link
Copy Markdown

karlochev, it works fine, thank you!

@halibaduoxiansheng

Copy link
Copy Markdown

worked thanks bro

@mvca9574

mvca9574 commented Nov 3, 2026

Copy link
Copy Markdown

sudo python3 -c "open('/opt/sublime_text/sublime_text', 'rb+').write(open('/opt/sublime_text/sublime_text', 'rb').read().replace(b'\x0F\xB6\x51\x0C\x83\xF2\x01', b'\xC6\x41\x0C\x01\x31\xD2\x90'))" for linux

There new update build 4215 :)

would the linux patch works for macos ?

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