Skip to content

Instantly share code, notes, and snippets.

@maboloshi
Last active November 16, 2024 15:06
Show Gist options
  • Save maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 to your computer and use it in GitHub Desktop.
Save maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 to your computer and use it in GitHub Desktop.
Crack Sublime Text and Sublime Merge

Note

  1. If you can, please purchase the genuine license through the official channel and support the software developer.
  2. All crack methods here are implemented by @leogx9r.
  3. All data is not guaranteed to be authoritative or correct, nor has it been tested across the platform, nor is it responsible for any errors, lost data, etc. in practice! Please assess yourself!!!
  4. I am only within the ability to update the information based on the existing crack methods until the existing rules fail.

Sublime Patcher Script for personal use

The code implementation is very poor.
https://gist.github.com/maboloshi/5baecbddacf43855f13240b63be5673d

ToC

Sublime Text Sublime Merge
Stable channel win / linux / mac / mac-arm64 win / linux / mac / mac-arm64
Dev channel win / linux / mac / mac-arm64 win / linux / mac / mac-arm64

How to Crack Sublime Text, Stable Channel, Build 4152

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3803204#gistcomment-3803204

Win64

Desciption Offset Original Patched
Initial License Check 0x000A8D78 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x000071D0 E8 17 FE 20 00 90 90 90 90 90
Persistent License Check 2 0x000071E9 E8 FE FD 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000AAB3E 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x000A8945 55 C3
Disable Crash Reporter 0x00000400 41 C3

for 4117, 4118: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3927712#gistcomment-3927712

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "15BB398D5663B89A44372EF15F70A46F" || exit
echo 000A8D78: 48 31 C0 C3          | xxd -r - sublime_text.exe
echo 000071D0: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000071E9: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000AAB3E: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A8945: C3                   | xxd -r - sublime_text.exe
echo 00000400: C3                   | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

The license can be any string.

Blocked by Microsoft Defender SmartScreen -> More Info -> Run Anyway

Screenshot
![Screenshot](https://i.imgur.com/t4QlRZ6.png)

![Screenshot](https://i.imgur.com/18372Rh.png)

Linux

Desciption Offset Original Patched
Initial License Check 0x00415013 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x00409037 E8 C0 CC 12 00 90 90 90 90 90
Persistent License Check 2 0x0040904F E8 A8 CC 12 00 90 90 90 90 90
Disable Server Validation Thread 0x00416CA4 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00414C82 41 C3
Disable Crash Reporter 0x003FA310 55 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"7038C3B1CC79504602DA70599D4CCCE9  sublime_text" || exit
echo 00415013: 48 31 C0 C3          | xxd -r - sublime_text
echo 00409037: 90 90 90 90 90       | xxd -r - sublime_text
echo 0040904F: 90 90 90 90 90       | xxd -r - sublime_text
echo 00416CA4: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00414C82: C3                   | xxd -r - sublime_text
echo 003FA310: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009F313 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x00009CEF E8 3C 2D 13 00 90 90 90 90 90
Persistent License Check 2 0x00009D07 E8 24 2D 13 00 90 90 90 90 90
Disable Server Validation Thread 0x000A085D 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009EF0E 55 C3
Disable Crash Reporter 0x00002A87 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 0009F313: 48 31 C0 C3          | xxd -r - sublime_text
echo 00009CEF: 90 90 90 90 90       | xxd -r - sublime_text
echo 00009D07: 90 90 90 90 90       | xxd -r - sublime_text
echo 000A085D: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009EF0E: C3                   | xxd -r - sublime_text
echo 00002A87: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3929427#gistcomment-3929427

Desciption Offset Original Patched
Initial License Check 0x01060C90 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x00FEAD18 40 BB 03 94 1F 20 03 D5
Persistent License Check 2 0x00FEAD2C 3B BB 03 94 1F 20 03 D5
Disable Server Validation Thread 0x01061F28 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01060908 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x00FE5780 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 01060C90: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 00FEAD18: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FEAD2C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01061F28: C0 03 5F D6             | xxd -r - sublime_text
echo 01060908: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE5780: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Text, Dev Channel, Build 4154

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3803204#gistcomment-3803204

Win64

Desciption Offset Original Patched
Initial License Check 0x0009E47C 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0000647C E8 23 7C 20 00 90 90 90 90 90
Persistent License Check 2 0x00006495 E8 0A 7C 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000A0222 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009E043 55 C3

for 4117, 4118: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3927712#gistcomment-3927712

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "ADF277D39672D83637AB708FC45413C8" || exit
echo 0009E47C: 48 31 C0 C3          | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000A0222: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 0009E043: C3                   | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

The license can be any string.

Blocked by Microsoft Defender SmartScreen -> More Info -> Run Anyway

Screenshot
![Screenshot](https://i.imgur.com/t4QlRZ6.png)

![Screenshot](https://i.imgur.com/18372Rh.png)

Linux

Desciption Offset Original Patched
Initial License Check 0x00443F94 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0042B210 E8 37 44 14 00 90 90 90 90 90
Persistent License Check 2 0x0042B228 E8 1F 44 14 00 90 90 90 90 90
Disable Server Validation Thread 0x00445EB6 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00443BF8 41 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"8836FE092DBB7BC8D3D2375D34510CA9  sublime_text" || exit
echo 00443F94: 48 31 C0 C3          | xxd -r - sublime_text
echo 0042B210: 90 90 90 90 90       | xxd -r - sublime_text
echo 0042B228: 90 90 90 90 90       | xxd -r - sublime_text
echo 00445EB6: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00443BF8: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009D527 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x000097F5 E8 AE 12 13 00 90 90 90 90 90
Persistent License Check 2 0x0000980D E8 96 12 13 00 90 90 90 90 90
Disable Server Validation Thread 0x0009EA9D 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009D122 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit
echo 0009D527: 48 31 C0 C3          | xxd -r - sublime_text
echo 000097F5: 90 90 90 90 90       | xxd -r - sublime_text
echo 0000980D: 90 90 90 90 90       | xxd -r - sublime_text
echo 0009EA9D: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009D122: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3929427#gistcomment-3929427

Desciption Offset Original Patched
Initial License Check 0x010758B8 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x01000360 33 A4 03 94 1F 20 03 D5
Persistent License Check 2 0x01000374 2E A4 03 94 1F 20 03 D5
Disable Server Validation Thread 0x01076B54 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01075534 FC 6F BD A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit
echo 010758B8: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 01000360: 1F 20 03 D5             | xxd -r - sublime_text
echo 01000374: 1F 20 03 D5             | xxd -r - sublime_text
echo 01076B54: C0 03 5F D6             | xxd -r - sublime_text
echo 01075534: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Merge, Stable Channel, Build 2083

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3823090#gistcomment-3823090 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762883#gistcomment-3762883 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197

Win64

Desciption Offset Original Patched
Initial License Check 0x000251A8 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x000286A3 E8 70 AA 26 00 90 90 90 90 90
Persistent License Check 2 0x000286BC E8 57 AA 26 00 90 90 90 90 90
Disable Server Validation Thread 0x000269B8 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00024DCD 55 C3
Disable Crash Reporter 0x00023F18 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "E33B76ADA6E7E7577CD4E81A7A4580C7" || exit
echo 000251A8: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 000286A3: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000286BC: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000269B8: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 00024DCD: C3                      | xxd -r - sublime_merge.exe
echo 00023F18: C3                      | xxd -r - sublime_merge.exe

PS:xxd.exe extracted from git for windows

Linux

thinks @urxi here

Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"86F61A82E7EE8DD9BDC4CF16A7C8E825  sublime_merge" || exit
echo 0045A360: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0045D21D: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0045D23A: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0045B990: C3                      | xxd -r - sublime_merge
echo 0045A05A: C3                      | xxd -r - sublime_merge
echo 00459ABA: C3                      | xxd -r - sublime_merge

macOS

Desciption Offset Original Patched
Initial License Check 0x0002C2DF 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x0002E96C E8 1F B9 18 00 90 90 90 90 90
Persistent License Check 2 0x0002E98B E8 00 B9 18 00 90 90 90 90 90
Disable Server Validation Thread 0x0002D295 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0002BF6A 55 C3
Disable Crash Reporter 0x0002B7AB 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "B1AADED4F196EEEEBF8D5A6F98B11288" || exit
echo 0002C2DF: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002E96C: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002E98B: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D295: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002BF6A: C3                      | xxd -r - sublime_merge
echo 0002B7AB: C3                      | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

!!!! May have expired !!!!

Based on:

Desciption Offset Original Patched
Initial License Check 0x014D9060 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x014DAF68 AB B6 04 94 1F 20 03 D5
Persistent License Check 2 0x014DAF7C A6 B6 04 94 1F 20 03 D5
Disable Server Validation Thread 0x014D9DBC F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x014D8D9C FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x014D86E4 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "B1AADED4F196EEEEBF8D5A6F98B11288" || exit
echo 014D9060: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014DAF68: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014DAF7C: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014D9DBC: C0 03 5F D6             | xxd -r - sublime_merge
echo 014D8D9C: C0 03 5F D6             | xxd -r - sublime_merge
echo 014D86E4: C0 03 5F D6             | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Merge, Dev Channel, Build 2085

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3823090#gistcomment-3823090 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762883#gistcomment-3762883 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197

Win64

Desciption Offset Original Patched
Initial License Check 0x00025300 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x00028813 E8 B8 7F 27 00 90 90 90 90 90
Persistent License Check 2 0x0002882C E8 9F 7F 27 00 90 90 90 90 90
Disable Server Validation Thread 0x00026B20 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00024F25 55 C3
Disable Crash Reporter 0x00024070 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "8B6590708E6AAE98AC3AE29135DB084F" || exit
echo 00025300: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 00028813: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0002882C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026B20: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 00024F25: C3                      | xxd -r - sublime_merge.exe
echo 00024070: C3                      | xxd -r - sublime_merge.exe

PS:xxd.exe extracted from git for windows

Linux

thinks @urxi here

Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"958DA6B7EC687B25F55A16FF6A3D9BD0  sublime_merge" || exit
echo 0045F22C: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004620F9: 90 90 90 90 90          | xxd -r - sublime_merge
echo 00462116: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0046086C: C3                      | xxd -r - sublime_merge
echo 0045EF26: C3                      | xxd -r - sublime_merge
echo 0045E986: C3                      | xxd -r - sublime_merge

macOS

Desciption Offset Original Patched
Initial License Check 0x0002C4CB 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x0002EB48 E8 15 23 19 00 90 90 90 90 90
Persistent License Check 2 0x0002EB67 E8 F6 22 19 00 90 90 90 90 90
Disable Server Validation Thread 0x0002D471 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0002C156 55 C3
Disable Crash Reporter 0x0002B997 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "D67510219FB14938A47BE39260C87215" || exit
echo 0002C4CB: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002EB48: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EB67: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D471: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002C156: C3                      | xxd -r - sublime_merge
echo 0002B997: C3                      | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

!!!! May have expired !!!!

Based on:

Desciption Offset Original Patched
Initial License Check 0x015027EC FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x015046D4 78 C9 04 94 1F 20 03 D5
Persistent License Check 2 0x015046E8 73 C9 04 94 1F 20 03 D5
Disable Server Validation Thread 0x0150352C F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01502528 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x01501E70 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "D67510219FB14938A47BE39260C87215" || exit
echo 015027EC: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 015046D4: 1F 20 03 D5             | xxd -r - sublime_merge
echo 015046E8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0150352C: C0 03 5F D6             | xxd -r - sublime_merge
echo 01502528: C0 03 5F D6             | xxd -r - sublime_merge
echo 01501E70: C0 03 5F D6             | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

ST's new version of hexadecimal editing method

From: https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945

Search : 80 78 05 00 0f 94 c1 first result , replace: c6 40 05 01 48 85 c9

This patch is applicable to all x86-64 CPU platforms of ST.

ST's old version hexadecimal editing method

From: https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945?permalink_comment_id=4495369#gistcomment-4495369

97 94 0D --> 00 00 00

License Key:

----- BEGIN LICENSE -----
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
------ END LICENSE ------
@Bruskyer
Copy link

Bruskyer commented Sep 6, 2023

the fixed SB Merge 2091 stable doesnt work :( on windows 11(after patching app is not runing)

cd /d "C:\Program Files\Sublime Merge" || exit 
certutil -hashfile sublime_merge.exe md5 | find /i "6330681B8EA4BFADCC1C1DE4E187251C" || exit
 
echo 00025776: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 000288BF: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000288D8: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026F28: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 0006F730: C3                      | xxd -r - sublime_merge.exe

I tested it and it works. @urxi's patch also works.

屏幕截图 2023-09-04 213544

sorry but it doesnt work, all value replaced by written
echo 00025776: 48 C7 C0 01 00 00 00 C3 | xxd -r - sublime_merge.exe
echo 000288BF: 90 90 90 90 90 | xxd -r - sublime_merge.exe
echo 000288D8: 90 90 90 90 90 | xxd -r - sublime_merge.exe
echo 00026F28: C3 | xxd -r - sublime_merge.exe
echo 00025397: C3 | xxd -r - sublime_merge.exe
and patched exe and orgnl exe are have same kb when running just loading cursor appears and goes no app windows and any error pls can you share patched exe
I did all step in hexit editör one by one in windows 11

@Destitute-Streetdwelling-Guttersnipe
Copy link

@Bruskyer
Copy link

Bruskyer commented Sep 7, 2023

@Bruskyer This patch won't run on a modified sublime_merge.exe You should uninstall it and try again from the beginning.

I didnt applied to modified exe each time I re-installed it and I tried on new exe
before that I modified many sublime text and merge successfully

@Destitute-Streetdwelling-Guttersnipe
Copy link

@Bruskyer
Copy link

Bruskyer commented Sep 15, 2023

@Destitute-Streetdwelling-Guttersnipe @maboloshi thanks for your replies, this was my mistake
I have already patched, the problem was 00025776 > 0x00025776 (must search like this in hexit )
now its working very good thanks to all 🙏

@STSMHQ
Copy link

STSMHQ commented Sep 15, 2023

Thank you, @urxi. Your cracks worked really well for me on Windows 10.

@urxi
Copy link

urxi commented Sep 18, 2023

Sublime Text (Dev Channel, Build 4156)

macOS (tested)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "7FD14E63D09E504A3BE395452F975008" || exit

echo 0009D327: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00009555: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000956D: 90 90 90 90 90          | xxd -r - sublime_text
echo 0009E865: C3                      | xxd -r - sublime_text
echo 0009CF22: C3                      | xxd -r - sublime_text

echo 0107B918: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 01006304: 1F 20 03 D5             | xxd -r - sublime_text
echo 01006318: 1F 20 03 D5             | xxd -r - sublime_text
echo 0107CB88: C0 03 5F D6             | xxd -r - sublime_text
echo 0107B594: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (untested)
cd /opt/sublime_text || exit
md5sum -c <<< "2D51DE980D578B69BF66CEE50125E20C  sublime_text" || exit

echo 00444894: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042BA70: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042BA88: 90 90 90 90 90          | xxd -r - sublime_text
echo 004467B6: C3                      | xxd -r - sublime_text
echo 004444F8: C3                      | xxd -r - sublime_text
Windows (tested)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "47F6B92FC065A82D87E66AC91E751BE2" || exit

echo 0009E47C: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 000A022C: C3                      | xxd -r - sublime_text.exe
echo 0009E043: C3                      | xxd -r - sublime_text.exe

@wangcl
Copy link

wangcl commented Sep 19, 2023

4156 works on win10.

Copy link

ghost commented Sep 19, 2023

Hi, I made a simple python script for windows that patches it (open source), all Info is on my repo.
https://github.com/socialfright/subzerox

@bms8197
Copy link

bms8197 commented Sep 20, 2023

codesign --force --deep --sign - "/Applications/Sublime Text.app"

I do confirm that 4156 works on MacOS Sonoma, Apple Silicon CPU (M1)

@quachquesh
Copy link

@urxi Build 2091 works on Ubuntu, thank you.

@Destitute-Streetdwelling-Guttersnipe

@urxi Your 4156 patch works in Linux. Congrats, it works in all platforms.

@PythonTryHard
Copy link

PythonTryHard commented Sep 30, 2023

OpenSUSE's Sublime Merge 2091 and "normal" Sublime Merge 2091 differs in non-patch region, making the MD5 check unreliable. sublime_merge bare is from Sublime original, the /opt one is from their OpenSUSE repo.

Difference part
❯ cmp -l sublime_merge /opt/sublime_merge/sublime_merge | gawk '{printf "%08X %02X %02X\n", $1, strtonum(0$2), strtonum(0$3)}' 
00000221 00 40
00000222 D3 E1
00AA13BB 69 73
00AA13BC 6E 68
00AA13BD 69 73
00AA13BF 5F 72
00AA13C0 61 74
00AA13C1 72 61
00AA13C2 72 62
00AA13C3 61 00
00AA13C4 79 2E
00AA13C5 00 69
00AA13C6 2E 6E
00AA13C7 66 74
00AA13C8 69 65
00AA13C9 6E 72
00AA13CA 69 70
00AA13CB 5F 00
00AA13CC 61 2E
00AA13CD 72 6E
00AA13CE 72 6F
00AA13CF 61 74
00AA13D0 79 65
00AA13D1 00 2E
00AA13D2 2E 41
00AA13D3 74 42
00AA13D4 65 49
00AA13D5 78 2D
00AA13D7 00 61
00AA13D8 2E 67
00AA13D9 67 00
00AA13DA 6F 2E
00AA13DB 74 64
00AA13DC 00 79
00AA13DD 2E 6E
00AA13DE 67 73
00AA13DF 6F 79
00AA13E0 74 6D
00AA13E1 2E 00
00AA13E2 70 2E
00AA13E3 6C 67
00AA13E4 74 6E
00AA13E5 00 75
00AA13E7 72 76
00AA13E9 6C 72
00AA13EA 61 73
00AA13EB 2E 69
00AA13EC 70 6F
00AA13ED 6C 6E
00AA13EE 74 00
00AA13EF 00 2E
00AA13F0 2E 67
00AA13F1 69 6E
00AA13F2 6E 75
00AA13F3 69 2E
00AA13F4 74 76
00AA13F5 00 65
00AA13F6 2E 72
00AA13F7 74 73
00AA13F8 62 69
00AA13F9 73 6F
00AA13FA 73 6E
00AA13FB 00 5F
00AA13FC 2E 72
00AA13FD 62 00
00AA13FE 73 2E
00AA13FF 73 67
00AA1400 00 6E
00AA1401 2E 75
00AA1402 64 2E
00AA1403 79 68
00AA1404 6E 61
00AA1406 74 68
00AA1407 72 00
00AA1408 00 2E
00AA1409 2E 64
00AA140A 65 79
00AA140B 68 6E
00AA140C 5F 73
00AA140D 66 74
00AA140F 61 00
00AA1410 6D 2E
00AA1411 65 72
00AA1412 5F 65
00AA1413 68 6C
00AA1414 64 61
00AA1415 72 2E
00AA1416 00 64
00AA1417 2E 79
00AA1418 6A 6E
00AA1419 63 00
00AA141A 72 2E
00AA141B 00 72
00AA141C 2E 65
00AA141D 67 6C
00AA141E 6E 61
00AA141F 75 2E
00AA1420 2E 70
00AA1421 76 6C
00AA1422 65 74
00AA1423 72 00
00AA1424 73 2E
00AA1425 69 72
00AA1427 6E 64
00AA1428 5F 61
00AA1429 72 74
00AA142A 00 61
00AA142B 2E 00
00AA142C 69 2E
00AA142D 6E 67
00AA142E 74 63
00AA142F 65 63
00AA1430 72 5F
00AA1431 70 65
00AA1432 00 78
00AA1433 2E 63
00AA1434 64 65
00AA1435 61 70
00AA1437 61 5F
00AA1438 2E 74
00AA1439 72 61
00AA143A 65 62
00AA143C 2E 65
00AA143D 72 00
00AA143E 6F 2E
00AA143F 00 65
00AA1440 2E 68
00AA1441 72 5F
00AA1442 65 66
00AA1443 6C 72
00AA1445 2E 6D
00AA1446 64 65
00AA1447 79 5F
00AA1448 6E 68
00AA1449 00 64
00AA144A 2E 72
00AA144B 67 00
00AA144C 6E 2E
00AA144D 75 65
00AA144E 2E 68
00AA144F 76 5F
00AA1450 65 66
00AA1452 73 61
00AA1453 69 6D
00AA1454 6F 65
00AA1455 6E 00
00AA1456 00 2E
00AA1457 2E 74
00AA1458 64 65
00AA1459 79 78
00AA145A 6E 74
00AA145B 73 00
00AA145C 79 2E
00AA145D 6D 69
00AA145E 00 6E
00AA145F 2E 69
00AA1460 66 74
00AA1461 69 00
00AA1462 6E 2E
00AA1463 69 66
00AA1464 00 69
00AA1465 2E 6E
00AA1466 67 69
00AA1467 6E 00
00AA1468 75 2E
00AA1469 2E 74
00AA146A 68 64
00AA146C 73 74
00AA146D 68 61
00AA1470 6E 74
00AA1471 6F 62
00AA1472 74 73
00AA1473 65 73
00AA1474 2E 00
00AA1475 41 2E
00AA1476 42 6A
00AA1477 49 63
00AA1478 2D 72
00AA1479 74 00
00AA147A 61 2E
00AA147B 67 66
00AA147C 00 69
00AA147D 2E 6E
00AA147E 65 69
00AA147F 68 5F
00AA1480 5F 61
00AA1481 66 72
00AA1484 6D 79
00AA1485 65 00
00AA1486 00 2E
00AA1487 2E 69
00AA1488 67 6E
00AA1489 63 69
00AA148A 63 74
00AA148C 65 61
00AA148D 78 72
00AA148E 63 72
00AA148F 65 61
00AA1490 70 79
00AA1491 74 00
00AA1492 5F 2E
00AA1493 74 64
00AA1495 62 74
00AA1496 6C 61
00AA1497 65 2E
00AA1498 00 72
00AA1499 2E 65
00AA149A 74 6C
00AA149B 6D 2E
00AA149C 5F 72
00AA149D 63 6F
00AA149E 6C 00
00AA149F 6F 2E
00AA14A0 6E 64
00AA14A1 65 79
00AA14A2 5F 6E
00AA14A3 74 61
00AA14A4 61 6D
00AA14A5 62 69
00AA14A6 6C 63
00AA14A7 65 00
00AA14A8 00 2E
00AA14A9 2E 67
00AA14AA 64 6F
00AA14AB 79 74
00AA14AC 6E 00
00AA14AD 61 2E
00AA14AE 6D 64
00AA14AF 69 61
00AA14B0 63 74
00AA14B1 00 61
00AA14B2 2E 00
00AA14B3 73 2E
00AA14B4 68 74
00AA14B5 73 6D
00AA14B6 74 5F
00AA14B7 72 63
00AA14B8 74 6C
00AA14B9 61 6F
00AA14BA 62 6E
00AA14BB 00 65
00AA14BC 2E 5F
00AA14BE 64 61
00AA14BF 61 62
00AA14C0 74 6C
00AA14C1 61 65
00AA14C4 72 67
00AA14C6 64 74
00AA14C7 61 2E
00AA14C8 74 70
00AA14C9 61 6C
00AA14CA 00 74
00AA14CB 2E 00
00AA14CC 64 2E
00AA14CD 61 62
00AA14CE 74 73
00AA14CF 61 73
00AA1511 72 0B
00AA1551 B6 13
00AA1591 9E 21
00AA15D1 91 29
00AA1611 63 36
00AA1651 AC 45
00AA1691 48 4F
00AA16D1 87 57
00AA1711 2D 61
00AA1719 42 02
00AA173D 1C 11
00AA1751 0A 6B
00AA1752 01 00
00AA1791 CE 73
00AA17D1 50 85
00AA1811 C4 93
00AA1851 19 9D
00AA1891 37 A3
00AA18D1 A6 A9
00AA1911 32 66
00AA1951 03 AF
00AA1952 01 00
00AA1991 3D B6
00AA19D1 5E BC
00AA1A11 0D C1
00AA1A51 01 CD
00AA1A91 7A D9
00AA1AD1 F0 E6
00AA1B11 1F EF
00AA1B51 12 F4
00AA1B52 01 00
00AA1B91 E0 FA
00AA1BD1 24 0A
00AA1BD2 00 01
00AA1C11 43 13
00AA1C12 00 01
00AA1C51 F9 01

@Destitute-Streetdwelling-Guttersnipe
Copy link

@CodigoCristo
Copy link

Sublime Text (Dev Channel, Build 4156)

macOS (tested)
Linux (untested)
Windows (tested)

Work Arch Linux

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

maboloshi commented Oct 20, 2023

Sublime Text Dev Channel, Build 4158 【Untested

Thanks to @urxi's patch:

Windows
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "503708E43F9272946820668C420B1200" || exit

echo 000A0E6C: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 000A2CC6: C3                      | xxd -r - sublime_text.exe
echo 000A0A33: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "6FE664672E1B73A252DDE7D168EE3B94  sublime_text" || exit

echo 00446ED4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042E0A0: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042E0B8: 90 90 90 90 90          | xxd -r - sublime_text
echo 00448DB8: C3                      | xxd -r - sublime_text
echo 00446B38: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3904E05A72714C49D19B28744194EC44" || exit

echo 000A02AB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 000090B1: 90 90 90 90 90          | xxd -r - sublime_text
echo 000090C9: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A17F5: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 0009FEA6: C3                      | xxd -r - sublime_text

echo 010890D4: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010115EC: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011600: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108A360: C0 03 5F D6             | xxd -r - sublime_text
echo 01088D50: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

@pbtrung
Copy link

pbtrung commented Oct 20, 2023

4159 for macOS, please.

@maboloshi
Copy link
Author

Sublime Text Dev Channel, Build 4159 【Untested

Thanks to @urxi's patch:

Windows
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "A3F0011363C50B6D23FB5AE58DAF84FE" || exit

echo 000A0BD8: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 000A298E: C3                      | xxd -r - sublime_text.exe
echo 000A079F: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "556D9221968B7588415603855FE559D4  sublime_text" || exit

echo 00446E24: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042DFF0: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042E008: 90 90 90 90 90          | xxd -r - sublime_text
echo 00448D4C: C3                      | xxd -r - sublime_text
echo 00446A88: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "5741F2FCB214D79258EF7DBDBC6394BF" || exit

echo 000A03CF: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00009191: 90 90 90 90 90          | xxd -r - sublime_text
echo 000091A9: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A1945: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 0009FFCA: C3                      | xxd -r - sublime_text

echo 0108D96C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 01015EE4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01015EF8: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108EC08: C0 03 5F D6             | xxd -r - sublime_text
echo 0108D5EC: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

@wangcl
Copy link

wangcl commented Oct 21, 2023

@urxi
Copy link

urxi commented Oct 21, 2023

Sublime Text (Dev Channel, Build 4160)

macOS (tested)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "D0A397FA68A6F92214D7EE55E23804E3" || exit

echo 000A03FF: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00009191: 90 90 90 90 90          | xxd -r - sublime_text
echo 000091A9: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A194D: C3                      | xxd -r - sublime_text
echo 0009FFFA: C3                      | xxd -r - sublime_text

echo 0108D970: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 01015ED0: 1F 20 03 D5             | xxd -r - sublime_text
echo 01015EE4: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108EBFC: C0 03 5F D6             | xxd -r - sublime_text
echo 0108D5F0: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested, thanks @Destitute-Streetdwelling-Guttersnipe)
cd /opt/sublime_text || exit
md5sum -c <<< "71352954EDFF50BD054602ABA360C2C8  sublime_text" || exit

echo 00446E04: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042DFD0: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042DFE8: 90 90 90 90 90          | xxd -r - sublime_text
echo 00448D2E: C3                      | xxd -r - sublime_text
echo 00446A68: C3                      | xxd -r - sublime_text
Windows (tested, thanks @wangcl)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "D8844C83734D722B815A253598719530" || exit

echo 000A0C14: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 000A29E4: C3                      | xxd -r - sublime_text.exe
echo 000A07DB: C3                      | xxd -r - sublime_text.exe

@maboloshi
Copy link
Author

Under MacOS, if you use homebrew to install ST and SM, you can actually build your own private Tap for maintenance.

sublime-text-crack.rb It's probably not working. It's been a while since I've been out of the macos environment.
cask "sublime-text-crack" do
  version "4160"
  sha256 :no_check

  url "https://download.sublimetext.com/sublime_text_build_#{version}_mac.zip"
  name "Sublime Text"
  desc "Text editor for code, markup and prose"
  homepage "https://www.sublimetext.com/dev"

  #  auto_updates true
  conflicts_with cask: ["sublime-text", "sublime-text-dev"]

  app "Sublime Text.app"
  binary "#{appdir}/Sublime Text.app/Contents/SharedSupport/bin/subl"

  # crack
  postflight do
    shimscript = "#{appdir}/Sublime Text.app/Contents/MacOS/Crack.sh"
    IO.write shimscript, <<~EOS
      #!/bin/bash

      cd "#{appdir}/Sublime Text.app/Contents/MacOS/" || exit
      echo 000A03FF: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text > /dev/null 2>&1
      echo 00009191: 90 90 90 90 90          | xxd -r - sublime_text > /dev/null 2>&1
      echo 000091A9: 90 90 90 90 90          | xxd -r - sublime_text > /dev/null 2>&1
      echo 000A194D: C3                      | xxd -r - sublime_text > /dev/null 2>&1
      echo 0009FFFA: C3                      | xxd -r - sublime_text > /dev/null 2>&1
      echo 0108D970: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text > /dev/null 2>&1
      echo 01015ED0: 1F 20 03 D5             | xxd -r - sublime_text > /dev/null 2>&1
      echo 01015EE4: 1F 20 03 D5             | xxd -r - sublime_text > /dev/null 2>&1
      echo 0108EBFC: C0 03 5F D6             | xxd -r - sublime_text > /dev/null 2>&1
      echo 0108D5F0: C0 03 5F D6             | xxd -r - sublime_text > /dev/null 2>&1

      rm "#{shimscript}"
    EOS

    FileUtils.chmod "a+x", shimscript
    system_command shimscript
  end

  uninstall quit: "com.sublimetext.4"

  # Sublime Text 4 uses `Sublime Text 3` and `com.sublimetext.3` dirs if they exist
  # Otherwise, it creates `Sublime Text` and `com.sublimetext.4`
  # More info: https://www.sublimetext.com/docs/side_by_side.html
  zap trash: [
    "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.sublimetext.4.sfl*",
    "~/Library/Application Support/Sublime Text",
    "~/Library/Application Support/Sublime Text (Safe Mode)",
    "~/Library/Application Support/Sublime Text 3",
    "~/Library/Caches/com.sublimetext.4",
    "~/Library/Caches/com.sublimetext.3",
    "~/Library/Preferences/com.sublimetext.4.plist",
    "~/Library/Preferences/com.sublimetext.3.plist",
    "~/Library/Saved Application State/com.sublimetext.4.savedState",
    "~/Library/Saved Application State/com.sublimetext.3.savedState",
  ]

  caveats <<~EOS
    License:
    Arbitrary String
  EOS
end

@wangcl
Copy link

wangcl commented Oct 22, 2023

Sublime Text (Dev Channel, Build 4160)

macOS (tested)
Linux (untested)
Windows (untested)

cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "D8844C83734D722B815A253598719530" || exit

echo 000A0C14: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 000A29E4: C3                      | xxd -r - sublime_text.exe
echo 000A07DB: C3                      | xxd -r - sublime_text.exe

4160 works on windows 10

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

maboloshi commented Oct 24, 2023

Here is an example powershell patch script for Windows.

sublime_text_crack.ps1
$filePath = ".\sublime_text.exe"

if ((Get-FileHash -Path $filePath -Algorithm MD5).Hash -ne "D8844C83734D722B815A253598719530") { Write-Host "Hash mismatch!"; Exit 1 }

$stream = [System.IO.File]::OpenWrite($filePath)
@'
000A0C14: 48 C7 C0 00 00 00 00 C3
0000647C: 90 90 90 90 90
00006495: 90 90 90 90 90
000A29E4: C3
000A07DB: C3
'@ -split "`r?`n" | ForEach-Object { # 注意此处需要用双引号
    $offset, $data = ($_ -split ':').Trim()

    # 将16进制的偏移量转换为10进制
    $offset = [convert]::ToInt32($offset, 16)

    # 将16进制的数据转换为字节数组
    $data = $data -split ' ' | ForEach-Object { [byte]::Parse($_, 'HexNumber') }

    $stream.Seek($offset, [System.IO.SeekOrigin]::Begin) | Out-Null  # 设置写入的位置
    $stream.Write($data, 0, $data.Length)  # 写入字节数据
}
$stream.Close()

@brian6932
Copy link

brian6932 commented Oct 24, 2023

Or if you have xxd already you can just do this:

if ((Get-FileHash sublime_text.exe -Algorithm MD5).Hash -ne 'D8844C83734D722B815A253598719530') { throw 'Hash mismatch!' }
'000A0C14: 48 C7 C0 00 00 00 00 C3' | xxd -r - sublime_text.exe
'0000647C: 90 90 90 90 90'          | xxd -r - sublime_text.exe
'00006495: 90 90 90 90 90'          | xxd -r - sublime_text.exe
'000A29E4: C3'                      | xxd -r - sublime_text.exe
'000A07DB: C3'                      | xxd -r - sublime_text.exe

@maboloshi
Copy link
Author

Or if you have xxd already you can just do this:

I try to create a private scoop repository and install it using scoop. This pure powershell script is part of its.
sublime-text.json

@dimkagithub
Copy link

dimkagithub commented Oct 27, 2023

# for macOS (ARM64) Stable 4152

cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 01060C90: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 00FEAD18: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FEAD2C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01061F28: C0 03 5F D6             | xxd -r - sublime_text
echo 01060908: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE5780: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

Perfect! :)

@STSMHQ
Copy link

STSMHQ commented Oct 28, 2023

@maboloshi Nice idea creating a private Scoop bucket. Although it's pretty easy to check the JSON and apply the changes manually (if needed), please keep updating this Gist as well.
@urxi Thank you (one more time) for the ST patch.

Have a nice day/week, everyone!

@nullart
Copy link

nullart commented Nov 1, 2023

# for macOS (ARM64) Stable 4152

cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 01060C90: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 00FEAD18: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FEAD2C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01061F28: C0 03 5F D6             | xxd -r - sublime_text
echo 01060908: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE5780: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

Perfect! :)

Works on Sonoma (m2)

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