Skip to content

Instantly share code, notes, and snippets.

@maboloshi
Last active May 3, 2024 17:16
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 ------
@plakhin
Copy link

plakhin commented May 27, 2022

What about SM2071 macOS (M1 ARM64), any chance it'll be there?

@Destitute-Streetdwelling-Guttersnipe

@maboloshi no problem, find can ignore case:
certutil -hashfile sublimetext md5 | find /i "md5_hash_string" || exit

And xxd is popular in Linux & Mac. Most people has it when they install vim. For Windows, you should ask them to download it from https://github.com/git-for-windows/git-sdk-64/blob/main/usr/bin/xxd.exe?raw=true

BTW, it's funny to say that Note: ARM platform is not supported and then provide the patches for Mac M1 ARM64 :D

ST & SM support both Linux ARM64 and Mac M1 ARM64. Here you provide half the choices on ARM64. Maybe you should say something like "I didn't test it. Use at your own risk."

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Thanks, has unified the command implementation, now much fresher. Also, add a note for the full text.

@maboloshi
Copy link
Author

What about SM2071 macOS (M1 ARM64), any chance it'll be there?

Currently there is no solution, we recommend using the latest beta version.

@Destitute-Streetdwelling-Guttersnipe

Look at @n6333373 's comment

fwiw, you have to return 0 (instead of 281) in SM 2069.

@plakhin You have to modify patch for "Initial License Check". Just make it return 0 and you can use it for SM 2071. If you don't know anything about ARM64, you can use disasm.pro to do that.

@maboloshi
Copy link
Author

maboloshi commented May 28, 2022

@plakhin Please try the method for SM2071 macOS (M1 ARM64)

# for SM2071 macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 sublime_merge) = 07492B244AE4E8EE083C24B6B1FE82CD ] || exit
echo 0146B7C0: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 0146D6E8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0146D6FC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0146C508: C0 03 5F D6             | xxd -r - sublime_merge
echo 0146B518: C0 03 5F D6             | xxd -r - sublime_merge
echo 0146AF5C: C0 03 5F D6             | xxd -r - sublime_merge

OR

# for SM2071 macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 sublime_merge) = 07492B244AE4E8EE083C24B6B1FE82CD ] || exit
echo 0146B7C0: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 0146D6E8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0146D6FC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0146C508: C0 03 5F D6             | xxd -r - sublime_merge
echo 0146B518: C0 03 5F D6             | xxd -r - sublime_merge
echo 0146AF5C: C0 03 5F D6             | xxd -r - sublime_merge

@plakhin
Copy link

plakhin commented May 28, 2022

Both not working, app crashes on start.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@plakhin
Copy link

plakhin commented May 30, 2022

There were 2 patches offered, tried both, one by one, each on "fresh" unpatched file.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

@plakhin Please try to test for SM2073 macOS (M1 ARM64)

@DreamSworK
Copy link

@maboloshi just for case on offset 0x000A6F0F Win64 (Build 4126) there is no original byte 55 (Disable License Notify Thread)

@maboloshi
Copy link
Author

@DreamSworK 😭 The offset is error. The offset of correct is 0xA6E0F.

@Destitute-Streetdwelling-Guttersnipe

Sweet! Now SM 2069 has the same result from license check function as ST. It's a good time to merge the patterns for SM and ST. I hope they won't change to 281 again (like they did before).

It's strange. It came back to 281 again in SM 2072. I wonder if it's a mistake that has happened too many times.

Now they reverted to 0 (instead of 281) in SM 2073. Let's see how long this ping pong game lasts.

@n6333373
Copy link

n6333373 commented Jun 9, 2022

Sweet! Now SM 2069 has the same result from license check function as ST. It's a good time to merge the patterns for SM and ST. I hope they won't change to 281 again (like they did before).

It's strange. It came back to 281 again in SM 2072. I wonder if it's a mistake that has happened too many times.

Now they reverted to 0 (instead of 281) in SM 2073. Let's see how long this ping pong game lasts.

281 for 2074 btw.

@Destitute-Streetdwelling-Guttersnipe

Sweet! Now SM 2069 has the same result from license check function as ST. It's a good time to merge the patterns for SM and ST. I hope they won't change to 281 again (like they did before).

It's strange. It came back to 281 again in SM 2072. I wonder if it's a mistake that has happened too many times.

Now they reverted to 0 (instead of 281) in SM 2073. Let's see how long this ping pong game lasts.

281 for 2074 btw.

@n6333373 yup, 281 is back for another round of applause.
@maboloshi it feels strange to have the patch before SM 2074 showing up in the official download page.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi your gist content is too long. You could add a table of content like this:

  1. stable channel : win - mac
  2. dev channel : win - mac

@maboloshi
Copy link
Author

@maboloshi your gist content is too long. You could add a table of content like this:

  1. stable channel : win - mac
  2. dev channel : win - mac

😆 When I have time I will optimize.

@plakhin
Copy link

plakhin commented Jun 10, 2022

macOS (M1 ARM64) Build 2074 (Stable) works!

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Is it currently cleaner to use the "details" tag to collapse?

@Destitute-Streetdwelling-Guttersnipe

@maboloshi it looks much cleaner. While you're at it, you should also merge the "Thanks to ..." sections.

However, my browser can't search inside collapsed sections, so I have to expand them before I can search for a hash or some hex bytes.

@maboloshi
Copy link
Author

@maboloshi it looks much cleaner. While you're at it, you should also merge the "Thanks to ..." sections.

However, my browser can't search inside collapsed sections, so I have to expand them before I can search for a hash or some hex bytes.

🤣 OK I'll add indexing and expansion later

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe I modified it a bit. How about now?

@Destitute-Streetdwelling-Guttersnipe

@maboloshi I would prefer the ToC to be more compact, something like this:

Sublime Text Sublime Merge
Stable channel win linux mac win linux mac
Dev channel win linux mac win linux mac

@maboloshi
Copy link
Author

@class101
Copy link

class101 commented Jun 15, 2022

Rather than mentionning xxd is in Git for Windows and mess up with environment variables, this works too and is cleaner in my opinion

  • Get MSYS2
  • Replace find /i with find -iname

Works without much changes, xxd is already part of MSYS2 default packages

Nobody uses Git for Windows when it comes to bash executions except noobs, MSYS2 is much up to dates for this.

 pacman -F xxd
msys/bash-completion 2.11-2 [installed]
    usr/share/bash-completion/completions/xxd

@n6333373
Copy link

n6333373 commented Jun 15, 2022

For Git for Windows users: why I need MSYS2?
For MSYS2 users: why I need Git for Windows? You noobs?
For geek users: why I need any of above while OP has provided a single xxd.exe?

PS:xxd.exe extracted from git for windows

@class101
Copy link

class101 commented Jun 15, 2022

Because he seems to suggest

  • Open CMD.exe (because find /i) is Windows
  • Make the necessary actions so that typing xxd in CMD.exe works (which is not the case by defaut, xxd has to be in a a path set by the env variable PATH, that is dirty to do)

Thus why suggesting to

  • Use bash of Windows Git ( find /i) won't work unless you change it to find -iname
  • Use bash of MSYS2 ( find /i) won't work too unless you change it to find -iname

Not sure why he changed the Windows procedure, before you just had to load a CMD.exe, exec the script, job done

@maboloshi
Copy link
Author

You just need to download xxd.exe and put it in the same directory as sublime_text.exe or sublime_merge.exe or in the system folder C:\Windows\.

@BeansIsFat
Copy link

The bash scripts for Mac fail as written, because md5 prints a string that includes the filename. Quiet mode only prints the checksum so the command should be md5 -q.

@maboloshi
Copy link
Author

The bash scripts for Mac fail as written, because md5 prints a string that includes the filename. Quiet mode only prints the checksum so the command should be md5 -q.

Back in the history, once did exist -q. 🤣

@leagueofperez
Copy link

leagueofperez commented Jul 28, 2022

I'm getting error trying to activate Sublime Text Build 4126 and Sublime Merge build 2074 in Linux (Ubuntu)
Installed sublime text from official sources
Apparently the sums doesn't match

  • md5sum -c <<<"FECA809A08FD89F63C7CB9DA23089967 /opt/sublime_text/sublime_text"

    • md5sum: WARNING: 1 computed checksum did NOT match
  • md5sum -c <<<"69ABF4A8D3C77CB8D3D1EF9B5A74CEE0 /opt/sublime_merge/sublime_merge"

    • md5sum: WARNING: 1 computed checksum did NOT match

if i run md5sum in both apps i get the following sums:

  • 69a0ef806580365aea640d61f92588b5 /opt/sublime_text/sublime_text
  • 338d4ebed5f796878e5735ea01dbbd7e /opt/sublime_merge/sublime_merge

@maboloshi
Copy link
Author

@leagueofperez
My source files are from:

There may be differences in the compiled version of MD5 for different systems

@Destitute-Streetdwelling-Guttersnipe

Sweet! Now SM 2069 has the same result from license check function as ST. It's a good time to merge the patterns for SM and ST. I hope they won't change to 281 again (like they did before).

It's strange. It came back to 281 again in SM 2072. I wonder if it's a mistake that has happened too many times.

Now they reverted to 0 (instead of 281) in SM 2073. Let's see how long this ping pong game lasts.

281 for 2074 btw.

@n6333373 yup, 281 is back for another round of applause. @maboloshi it feels strange to have the patch before SM 2074 showing up in the official download page.

SM 2075 switch from 281 to 0 again. Just like a swinging pendulum 😅

@n6333373
Copy link

n6333373 commented Aug 2, 2022

yes, I implements a pendulum

Snipaste_2022-08-02_17-34-26

@Destitute-Streetdwelling-Guttersnipe

yes, I implements a pendulum

Snipaste_2022-08-02_17-34-26

@n6333373 wow, I've just realize that SM 2070 uses neither 0 nor 281. Is this the first version that uses 1? What a mess!

@MarcoHarris
Copy link

does anyone have the address to patch for Both ST/SM running on Linux M1 ?

@Destitute-Streetdwelling-Guttersnipe

does anyone have the address to patch for Both ST/SM running on Linux M1 ?

@MarcoHarris you can use this for ST 4126 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=4202408#gistcomment-4202408
No need to patch anything!
For SM, you can buy a patch at a cheap price (less than $100).

@Fodin
Copy link

Fodin commented Aug 13, 2022

SM macOS 2074 (M1 ARM64) doesn't work. It writes that app is corrupted. I patched app with Hex Fiend and re-signed it.

codesign --force --deep --sign - "/Users/user/Downloads/Sublime Merge.app"
/Users/user/Downloads/Sublime Merge.app: replacing existing signature

@tukusejssirs
Copy link

Thanks! The patch for Sublime Text 2077 is working. I tested it on Arch Linux.

Thanks! 🙏

@Lyahi
Copy link

Lyahi commented Aug 24, 2022

@tukusejssirs On my Arch it shows that the checksum is wrong. Which way did you use. Please give me a hint.

sublime-merge 2077-1

@tukusejssirs
Copy link

tukusejssirs commented Aug 24, 2022

@Lyahi, I installed SM the official way. Make sure you installed build 2077 (either using smerge --version command or HelpAbout Sublime Merge).

Then I simply followed the instructions. I ran commands one by one just make sure everything executes successfully.

You might have forgotten to cd /opt/sublime_merge. Another option would be to use absolute paths (in all command but cd replace sublime_merge with /opt/sublime_merge/sublime_merge.

Also, you need to have xxd installed. All those xdd commands needs to be run as root, as /opt/sublime_merge/sublime_merge are usually owned by root.


@maboloshi, I suggest to change your BASH code to something like this. Although your code works, I still think making a backup wouldn’t hurt and running xxd requires sudo, as files under /opt are owned by root by default.

# for Linux
file='/opt/sublime_merge/sublime_merge'
chsum='189196010502F17EB99A38D8F64163BA'

if md5sum -c --quiet <<< "$chsum $file"; then
   cp "$file"{,".$("$file" -v | grep -o '[0-9]*$')"}
   echo 003CB652: 48 31 C0 C3          | sudo xxd -r - "$file"
   echo 003CE75D: 90 90 90 90 90       | sudo xxd -r - "$file"
   echo 003CE778: 90 90 90 90 90       | sudo xxd -r - "$file"
   echo 003CCC12: 48 31 C0 48 FF C0 C3 | sudo xxd -r - "$file"
   echo 003CB39E: C3                   | sudo xxd -r - "$file"
   echo 003CAFCE: C3                   | sudo xxd -r - "$file"
fi

# Add a dummy licence
cat << EOF > ~/.config/sublime-merge/Local/License.sublime_license
----- BEGIN LICENSE -----
Your Name
Whatever Text
0000-000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
----- END LICENSE -----
EOF

Actually, @maboloshi, I don’t think we need to check if /opt/sublime_merge folder exists, but if $file exists, as the script does not really care about the folder itself nor other files under that folder. I changed that in my suggested code above.

Actually, md5sum already checks if the file exists, therefore checking for file existence is not needed at all. Removing that condition from my suggested code above.

Also I think that mentioning that one needs a dummy licence is a good thing. You might want to add that to Note[s] as the fifth point. It seems to be required by both ST and SM. I added a dummy licence in the suggested code above.

@Lyahi
Copy link

Lyahi commented Aug 24, 2022

@tukusejssirs Does the status remain unregistered after patching the file? In my case it does and I don't know if this is correct.

@tukusejssirs
Copy link

@Lyahi, in HelpAbout Sublime Merge, it says Registered to Unlimited User License. Also in Help, there is an option to Remove License. Therefore my patched SM binary is ‘licensed’. 🤷‍♂️

How did you install install your SM? Did you follow the instructions carefully? What is the checksum of your file (md5sum /opt/sublime_merge/sublime_merge)?

@Lyahi
Copy link

Lyahi commented Aug 24, 2022

@tukusejssirs I am installing from SM.
pacman -Qi sublime-merge
Nazwa : sublime-merge
Wersja : 2077-1
Opis : Sublime Merge is a most excellent git client
Architektura : x86_64
Adres url : https://www.sublimemerge.com
Licencje : custom
Grupy : Brak
Dostarcza : Brak
Zależy od : gtk3 libcurl.so
Opcjonalne zależności : Brak
Wymagany przez : Brak
Opcjonalny dla : Brak
Konfliktuje z : Brak
Zastępuje : Brak
Rozmiar po instalacji : 20,97 MiB
Autor pakietu : Sublime HQ Packager
Data zbudowania : wto, 23 sie 2022, 03:38:45

md5sum /opt/sublime_merge/sublime_merge
189196010502f17eb99a38d8f64163ba /opt/sublime_merge/sublime_merge

After using the patch, the total changed, and the status continued unregistered.
151be274aa54b64a59a8dffb5187c5dd /opt/sublime_merge/sublime_merge

@tukusejssirs
Copy link

tukusejssirs commented Aug 24, 2022

@Lyahi, you have exactly same package installed as I have. Both checksums match mine.

Aargh! 🤦‍♂️ I have installed a dummy licence previously, therefore my patched SM worked as expected. The licence can be anything, you can replace anything in the string below except for ----- BEGIN LICENSE ----- and ----- END LICENSE ----- (and I think also newlines are required). You could also use @rufoa’s dummy licence.

Note that you need to restart SM after adding licence unless you enter the licence via UI or SM is not running when you add the licence.

Even @maboloshi states that [t]he license can be any string, although only in MS Windows instructions for ST 4126 and ST 4134

cat << EOF > ~/.config/sublime-merge/Local/License.sublime_license
----- BEGIN LICENSE -----
Your Name
Whatever Text
0000-000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
----- END LICENSE -----
EOF

@Lyahi
Copy link

Lyahi commented Aug 24, 2022

@tukusejssirs My English is very poor and I probably didn't understand something.
Thanks for your help. After entering the license correct license.

Best.

@Destitute-Streetdwelling-Guttersnipe

Sweet! Now SM 2069 has the same result from license check function as ST. It's a good time to merge the patterns for SM and ST. I hope they won't change to 281 again (like they did before).

It's strange. It came back to 281 again in SM 2072. I wonder if it's a mistake that has happened too many times.

Now they reverted to 0 (instead of 281) in SM 2073. Let's see how long this ping pong game lasts.

281 for 2074 btw.

@n6333373 yup, 281 is back for another round of applause. @maboloshi it feels strange to have the patch before SM 2074 showing up in the official download page.

SM 2075 switch from 281 to 0 again. Just like a swinging pendulum 😅

SM from 2075 to 2077 use 0. Does this pendulum hit a brick wall?

@Destitute-Streetdwelling-Guttersnipe

Aargh! 🤦‍♂️ I have installed a dummy licence previously, therefore my patched SM worked as expected. The licence can be anything, you can replace anything in the string below except for ----- BEGIN LICENSE ----- and ----- END LICENSE ----- (and I think also newlines are required). You could also use @rufoa’s dummy licence.

Note that you need to restart SM after adding licence unless you enter the licence via UI or SM is not running when you add the licence.

Even @maboloshi states that [t]he license can be any string, although only in MS Windows instructions for [ST 4126]

@tukusejssirs You don't need a dummy license. You can type anything (or nothing) into the license input box. It doesn't matter.

@monglung
Copy link

@maboloshi : I think the offsets in SM2076 Linux for Disable License Notify Thread and Disable Crash Reporter are wrong. They both point to the same offset: 0x003CAF8E, since your description for the Original value are: 41 and 55...

@maboloshi
Copy link
Author

@monglung Already fixed.

@HawickMason
Copy link

HawickMason commented Aug 29, 2022

macOS (M1 ARM64) Build 2074 (Stable) works!

@plakhin Would you pls share your case ~ I can't get it work using both of them from
image
and a pseudo license

@plakhin
Copy link

plakhin commented Aug 29, 2022

I'm not using any patches anymore

@maboloshi
Copy link
Author

maboloshi commented Sep 21, 2022

Who can help to test SM for macOS (M1 ARM64)?

SM2076

# for macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_merge) = 2EE9C342B3174C4AE1EE7614C6E2DDC9 ] || exit
echo 014A0090: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014A1FE8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A1FFC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A0E08: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149FDE8: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149F824: C0 03 5F D6             | xxd -r - sublime_merge

SM2077

# for macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_merge) = 7E05D29AF963DE90B683CA748B8A4E50 ] || exit
echo 014A0088: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014A1FEC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A2000: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A0E0C: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149FDE0: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149F81C: C0 03 5F D6             | xxd -r - sublime_merge

@Destitute-Streetdwelling-Guttersnipe

@maboloshi congrats! You've found the correct offsets for both 2076 & 2077.

@Destitute-Streetdwelling-Guttersnipe

@maboloshi The ToC looks crowded, you should add some space.
For example: win -- linux -- mac -- mac-arm64
Or: win / linux / mac / mac-arm64

@maboloshi
Copy link
Author

Sublime Merge supplementary rules for macOS (M1 ARM64)

Desciption Regular Search Rule Relative Offset Patched Rule
Initial License Check (≥ 2075) br'\x00\x04\x40\xF9...\x17\xE6\x03\x1E\xAA...\x94\xFE\x03\x06\xAA' 8 b'\xE0\x03\x1F\xAA\xC0\x03\x5F\xD6'

@Destitute-Streetdwelling-Guttersnipe
Copy link

there are some interesting patches at https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945
One patch even works on all platforms

@ardyfeb
Copy link

ardyfeb commented Oct 4, 2022

Who can help to test SM for macOS (M1 ARM64)?

SM2076

# for macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_merge) = 2EE9C342B3174C4AE1EE7614C6E2DDC9 ] || exit
echo 014A0090: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014A1FE8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A1FFC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A0E08: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149FDE8: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149F824: C0 03 5F D6             | xxd -r - sublime_merge

SM2077

# for macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_merge) = 7E05D29AF963DE90B683CA748B8A4E50 ] || exit
echo 014A0088: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014A1FEC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A2000: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014A0E0C: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149FDE0: C0 03 5F D6             | xxd -r - sublime_merge
echo 0149F81C: C0 03 5F D6             | xxd -r - sublime_merge

not working on me sublime merge 2077 - mac m1

@Destitute-Streetdwelling-Guttersnipe
Copy link

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

maboloshi commented Oct 11, 2022

@Destitute-Streetdwelling-Guttersnipe If your browser supports user-script, I recommend you install this script github-collapse-markdown. Expanded by default, searchable.

@Destitute-Streetdwelling-Guttersnipe

@maboloshi thanks for the tip. GitHub must be crazy because it showed my reply from 4 months ago. Snail mail didn't take that long to deliver.

@PongVL
Copy link

PongVL commented Oct 23, 2022

@maboloshi thanks for those tips. All working well

@AxleUnix
Copy link

:: Sublime Text, Dev Channel, Build 4139
:: for Win64
cd /d ".\Sublime Text" || exit
md5sum sublime_text.exe | find /i "448be4f5ab731605a2c43ccd42cb7ee8" || exit
echo 000A9AB8: 48 31 C0 C3 | xxd -r - sublime_text.exe
echo 000071FE: 90 90 90 90 90 | xxd -r - sublime_text.exe
echo 00007217: 90 90 90 90 90 | xxd -r - sublime_text.exe
echo 000AB8FA: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A9663: C3 | xxd -r - sublime_text.exe
echo 00000400: C3 | xxd -r - sublime_text.exe

@rhcp011235
Copy link

Anyone have the correct patch for the Merge 2077 for M2?

@bms8197
Copy link

bms8197 commented Oct 31, 2022

Anyone having the right patch for ST 4139, MacOS ARM Sillicon version?

@DeveloperKev
Copy link

Anyone having the right patch for ST 4139, MacOS ARM Sillicon version?

dev build?

@maboloshi
Copy link
Author

Anyone having the right patch for ST 4139, MacOS ARM Sillicon version?

# for macOS (M1 ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_text) = A7C2294FE20B904918E2975C79EB121C ] || exit
echo 010595B8: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 00FE8854: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FE8868: 1F 20 03 D5             | xxd -r - sublime_text
echo 0105A8A8: C0 03 5F D6             | xxd -r - sublime_text
echo 01059228: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE3E94: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

@maboloshi
Copy link
Author

Persistent License Check 1 or Persistent License Check 2 on all platforms has changed since st4139
Among them, win64 and macos arm may have been found, and other linux and macos are in doubt

@bms8197
Copy link

bms8197 commented Nov 2, 2022

@maboloshi The patch for ST 4139 MacOS ARM Sillicon works like a charm. Thank you!

@AxleUnix
Copy link

AxleUnix commented Nov 2, 2022

:: Sublime Text, Dev Channel, Build 4140

for Linux

cd /opt/sublime_text || exit
md5sum -c <<<"30a395df2b6ecff2b74a6fc904246d50 sublime_text" || exit
echo 003A3464: 48 31 C0 C3 | xxd -r - sublime_text
echo 00399517: 90 90 90 90 90 | xxd -r - sublime_text
echo 0039952D: 90 90 90 90 90 | xxd -r - sublime_text
echo 003A5078: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 003A30F4: C3 | xxd -r - sublime_text
echo 0038CB80: C3 | xxd -r - sublime_text

@maboloshi
Copy link
Author

maboloshi commented Nov 3, 2022

Anyone having the right patch for ST 4139, MacOS ARM Sillicon version?

dev build?

@DeveloperKev Updated to ST4140, You can try it.

@Bruskyer
Copy link

Bruskyer commented Nov 3, 2022

Thanks for 4140

@maboloshi
Copy link
Author

Anyone have the correct patch for the Merge 2077 for M2?

@rhcp011235 You can try it.

SM2077

Bash Script

# for macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_merge) = 7E05D29AF963DE90B683CA748B8A4E50 ] || exit
echo 014A0088: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014A1FEC: 1F 20 03 D5             | xxd -r - sublime_merge 
echo 014A2000: 1F 20 03 D5             | xxd -r - sublime_merge 
echo 014A0E0C: C0 03 5F D6             | xxd -r - sublime_merge 
echo 0149FDE0: C0 03 5F D6             | xxd -r - sublime_merge 
echo 0149F81C: C0 03 5F D6             | xxd -r - sublime_merge

Re-Sign App

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

@rhcp011235
Copy link

Anyone have the correct patch for the Merge 2077 for M2?

@rhcp011235 You can try it.

SM2077

Bash Script

# for macOS (M1 ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 -q sublime_merge) = 7E05D29AF963DE90B683CA748B8A4E50 ] || exit
echo 014A0088: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014A1FEC: 1F 20 03 D5             | xxd -r - sublime_merge 
echo 014A2000: 1F 20 03 D5             | xxd -r - sublime_merge 
echo 014A0E0C: C0 03 5F D6             | xxd -r - sublime_merge 
echo 0149FDE0: C0 03 5F D6             | xxd -r - sublime_merge 
echo 0149F81C: C0 03 5F D6             | xxd -r - sublime_merge

Re-Sign App

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

Ive tried this one and it still says it's unregistered? is that normal?
Screenshot 2022-11-03 at 2 52 48 PM

@maboloshi
Copy link
Author

@rhcp011235 It seems that the previous Initial License Check (≥ SM2075) rule is still problematic. 😢

@rhcp011235
Copy link

@rhcp011235 It seems that the previous Initial License Check (≥ SM2075) rule is still problematic. 😢

I have hopper, if you know where to look. I can prob help find it.

@monglung
Copy link

monglung commented Nov 9, 2022

Update patch for win64 and linux64 to the latest ST 4141 and SM 2078: sublime_patch_2022_11_09

Signature sha-256: be436cda9c4b306706848196b67d2a82e31c35d1b17efd9463fe21498edc1677

slp

@Bruskyer
Copy link

patch is not working on win 10 x64 ?

@monglung
Copy link

You have to run it as Administrator...

@Bruskyer
Copy link

Bruskyer commented Nov 10, 2022

You have to run it as Administrator...

also I tried as Administrator but nothing appear just when clicking shows loading cursor .
it may requires some third party dependencies?

@monglung
Copy link

I tried it on a Win10 64 bit... and it does work!

success

@monglung
Copy link

@maboloshi patching for ST 4142 not working (both win64 and linux)...

@DeveloperKev
Copy link

@maboloshi patching for ST 4142 not working (both win64 and linux)...

can we get a license working?

@monglung
Copy link

On Win64, after patching, it will ask for a license... and on linux, after patching, ST crashes...

@maboloshi
Copy link
Author

On Win64, after patching, it will ask for a license... and on linux, after patching, ST crashes...

It seems there is a problem with the ST 4142 rules for the linux version.😢

@monglung
Copy link

Same problem with win64 also.... No matter what you enter, it will keep asking for a license... and not start at all...

@Bruskyer
Copy link

Same problem with win64 also.... No matter what you enter, it will keep asking for a license... and not start at all...

I have tried again but same result, no error no any information not launching any ui / windows just a few seconds loading appear very strange

@Destitute-Streetdwelling-Guttersnipe
Copy link

@n6333373
Copy link

n6333373 commented Nov 10, 2022

Patched binary with fake license done by me.

@sublimegist
Copy link

sublimegist commented Nov 10, 2022

Works normally on win 10 and arch linux following maboloshi's instructions, except on win I prefer to open MSYS2 and I replace /i to -iname
image
image

@Bruskyer
Copy link

@Bruskyer let's hope that you don't get a virus from this patcher, he he

I have av but there was not any activities, but I hope :)

Copy link

ghost commented Nov 10, 2022

I've updated my open-source patcher to support all the latest ST versions (<= 4142) for Winx64: https://github.com/rainbowpigeon/sublime-text-4-patcher
Let me know if there are any issues.

@Destitute-Streetdwelling-Guttersnipe

Patched binary with fake license done by me.

@n6333373 wow, I almost forget that ST still supports Win 32bit.
And you're too naughty when you removed the digital signature in the patched file.

@n6333373
Copy link

n6333373 commented Nov 11, 2022

And you're too naughty when you removed the digital signature in the patched file.

  1. The digital sig must fail for a modified binary.
  2. Remove the digital sig from the modified binary.

I am not sure which one is better.

  1. AV may warn that the digital sig verification failed.
  2. AV may warn that the file has no digital sig.

Copy link

ghost commented Nov 11, 2022

I've updated my open-source patcher to support all the latest ST versions (<= 4142) for Winx64: https://github.com/rainbowpigeon/sublime-text-4-patcher Let me know if there are any issues.

Updated for 4143 now.

@monglung
Copy link

Update patch for win64 and linux64 to the latest ST 4143 and SM 2078: sublime_patch

Signature sha-256: 6ca4768d0a599cb57a1ffae7855f87feac2930c0a3dbe325c37e83c26d0f8583

@DeveloperKev
Copy link

@maboloshi anyone tested on mac arm?

@rhcp011235
Copy link

I've updated my open-source patcher to support all the latest ST versions (<= 4142) for Winx64: https://github.com/rainbowpigeon/sublime-text-4-patcher
Let me know if there are any issues.

Possible to update this for Mac as well?

@rhcp011235
Copy link

@maboloshi anyone tested on mac arm?

I patched Sublime text 4143 on M2 and it works fine.

@rhcp011235
Copy link

@DeveloperKev Tested on M2 and works fine. Using version 4143 now

@DeveloperKev
Copy link

@DeveloperKev Tested on M2 and works fine. Using version 4143 now

using this thread?

@rhcp011235
Copy link

@rainbowpigeon
Copy link

I've updated my open-source patcher to support all the latest ST versions (<= 4142) for Winx64: https://github.com/rainbowpigeon/sublime-text-4-patcher
Let me know if there are any issues.

Possible to update this for Mac as well?

Possible yes, but I don't have the time to work on it for now 🙁

@monglung
Copy link

Update patch for win64 and linux64 to the latest ST 4143 and SM 2079: sublime_patch_2022_11_16

Signature sha-256: 5f2f99f14e9e8e9091e1d4ecc54e23dcc3301c8e9875397a1f2406e3d0b5725d

@Destitute-Streetdwelling-Guttersnipe
Copy link

@monglung
Copy link

@Destitute-Streetdwelling-Guttersnipe It runs on linux.... The compressed file has two disctinct files... for win64 and linux separately...

@Bruskyer
Copy link

pyhton based patch is working for both S.Text and S.Merge latest versions?

@Destitute-Streetdwelling-Guttersnipe
Copy link

@monglung
Copy link

Yes... I wrote it using C++ .... It is big because of the GUI....

@rhcp011235
Copy link

Yes... I wrote it using C++ .... It is big because of the GUI....

Nice to see something written in a real language :) I’d prefer to see it in C ;)

@Destitute-Streetdwelling-Guttersnipe

Yes... I wrote it using C++ .... It is big because of the GUI....

@monglung The GUI library is too bloated. Your patcher has much less features than ST/SM but it has the same size as ST/SM.

Yes... I wrote it using C++ .... It is big because of the GUI....

Nice to see something written in a real language :) I’d prefer to see it in C ;)

@rhcp011235 It's better to be able to read the source with 10 lines of bash/python. Patching is a simple task. It doesn't need 10MB of compiled C/C++.

@monglung
Copy link

It is just an exercise for fun. After being written, the patches for newer version are simple by just enter new patching data into the program and recompile.
A GUI program will be always bigger in size....
And you are right, patching is a simple task. You don't even need a script. You just use a hex editor....

@14thDay
Copy link

14thDay commented Dec 3, 2022

Works on Mac M1 4143 ST.
However you can't just copy the code it will exit on the MD5 line... Mac's MD5 function returns lower case instead (70909b4bccb3209c6f6c80122171ba84) so you will need to remove that line

@arcanisgk
Copy link

Hello guys, any version of the downloadable *.exe already patched?

@Destitute-Streetdwelling-Guttersnipe
Copy link

@n6333373
Copy link

n6333373 commented Dec 6, 2022

Hello guys, any version of the downloadable *.exe already patched?

If you dare to use it, I uploaded one
https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=4364875#gistcomment-4364875

@Loaft
Copy link

Loaft commented Dec 8, 2022

I cant get this to work on m1, ran bash and resigned but still unregistered

@AxleUnix
Copy link

4146:
"license_notify": Patch(
Sig(
"55 56 57 48 81 EC ? ? ? ? 48 8D AC 24 ? ? ? ? 48 C7 85 ? ? ? ? ? ? ? ? 48 89 CF"
),

@maboloshi
Copy link
Author

4146: "license_notify": Patch( Sig( "55 56 57 48 81 EC ? ? ? ? 48 8D AC 24 ? ? ? ? 48 C7 85 ? ? ? ? ? ? ? ? 48 89 CF" ),

Thank you, 4146 has changed a lot

@monglung
Copy link

Update patch for win64 and linux64 to the latest ST 4146 and SM 2081: sublime_patch_2022_12_19.rar

Signature sha-256: 05e2d3f90efb6c70814acdbb120e3853035dcfa6ddd7502a7c8f709e7052ee5e

For those who like to do manual, here is the table for the new ST 4146:

Description : Offset | Original Value

*** Win64 ***
Initial License Check : 0xA7CEC | 55 41 57 41
Persistent License Check 1 : 0x71D0 | E8 23 7C 20 00
Persistent License Check 2 : 0x71E9 | E8 0A 7C 20 00
Disable Server Validation Thread : 0xA9AE2 | 55 56 57 48 83 EC 30
Disable License Notify Thread : 0xA78B9 | 55
Disable Crash Reporter : 0x400 | 41

*** Linux ***
Initial License Check : 0x413CCF | 55 41 57 41
Persistent License Check 1 : 0x407CD9 | E8 0E B4 12 00
Persistent License Check 2 : 0x407CF1 | E8 F6 B3 12 00
Disable Server Validation Thread : 0x41594C | 55 41 56 53 41 89 F6
Disable License Notify Thread : 0x432C88 | 41
Disable Crash Reporter : 0x3F9280 | 55

@maboloshi
Copy link
Author

@monglung Thank you for your offset information. 👍

@maboloshi
Copy link
Author

D:\APP\crack_st_sm>python crack_st_sm.py st4147
==========================================================================================
[*] Download: sublime_text_build_4147_x64.zip, from: https://download.sublimetext.com/sublime_text_build_4147_x64.zip ...
>>>: 23.1MB [00:05, 3.90MB/s]
[*] Extract: sublime_text.exe, from: sublime_text_build_4147_x64.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Win64, Dev Channel, Build 4147
    MD5 Checksum -> DF04D9F76E97293A098D7E73DDB529B8

[>] Found RVA pattern for "isValidLicense for 4117" at 0x7B90 -> 0xA01AB -> 0xA7D40 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x71D0 ...
[*] Rewrite data 'E8 43 7D 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x71E9 ...
[*] Rewrite data 'E8 2A 7D 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xA9BBE ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...

[!] No pattern found for "licenseNotifyThread" ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0xA790D ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x400 ...
[*] Rewrite data '41' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4147_x64.tar.xz, from: https://download.sublimetext.com/sublime_text_build_4147_x64.tar.xz ...
>>>: 16.5MB [00:04, 3.47MB/s]
[*] Extract: sublime_text/sublime_text, from: sublime_text_build_4147_x64.tar.xz ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Linux, Dev Channel, Build 4147
    MD5 Checksum -> 16187B1938EEF0AAD09972030709D69F

[>] Found RVA pattern for "isValidLicense" at 0x415489 -> 0xFFFFE841 -> 0x413CCF ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139" at 0x407CD9 ...
[*] Rewrite data 'E8 50 B4 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x407CF1 ...
[*] Rewrite data 'E8 38 B4 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x415952 ...
[*] Rewrite data '55 41 56 53 41 89 F6' -> '48 31 C0 48 FF C0 C3' ...

[!] No pattern found for "licenseNotifyThread" ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0x41393E ...
[*] Rewrite data '41' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x3F9280 ...
[*] Rewrite data '55' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4147_mac.zip, from: https://download.sublimetext.com/sublime_text_build_4147_mac.zip ...
>>>: 39.9MB [00:07, 5.39MB/s]
[*] Extract: Sublime Text.app/Contents/MacOS/sublime_text, from: sublime_text_build_4147_mac.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, macOS, Dev Channel, Build 4147
    MD5 Checksum -> B96A77CE7F8C51233E2A961E0C14EA06

[>] Found RVA pattern for "isValidLicense" at 0x9ECAE -> 0xFFFFF0D4 -> 0x9DD87 ...
[*] Rewrite data '55 48 89 E5' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139 " at 0x9A0F ...
[*] Rewrite data 'E8 6E 13 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x9A27 ...
[*] Rewrite data 'E8 56 13 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x9F2D1 ...
[*] Rewrite data '55 48 89 E5 41 57 41' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x9D982 ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x2A57 ...
[*] Rewrite data '55' -> 'C3' ...

[!] No pattern found for "isValidLicense_arm64 for 4114" ...

[!] No pattern found for "invalidationFunction_arm64" ...

[!] No pattern found for "validationFunction_arm64 for 4139" ...

[>] Found pattern for "serverThread_arm64" at 0x105E35C ...
[*] Rewrite data 'F6 57 BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "licenseNotifyThread_arm64" at 0x105CD40 ...
[*] Rewrite data 'FC 6F BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "crashReporte_arm64" at 0xFE2788 ...
[*] Rewrite data 'FC 6F BC A9' -> 'C0 03 5F D6' ...

@maboloshi
Copy link
Author

@monglung Hey Buddy, your "Disable License Notify Thread" offset for Linux is different from mine.

\x41\x56\x53\x48\x81\xEC....\x48\x89\xFB\x48\x8D\x3D....\xE8....\x48\x8D\x15....

@maboloshi
Copy link
Author

D:\APP\crack_st_sm>python crack_st_sm.py st4146
==========================================================================================
[*] Download: sublime_text_build_4146_x64.zip, from: https://download.sublimetext.com/sublime_text_build_4146_x64.zip ...
[*] The sublime_text_build_4146_x64.zip already exists.
[*] Extract: sublime_text.exe, from: sublime_text_build_4146_x64.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Win64, Dev Channel, Build 4146
    MD5 Checksum -> A352F37D67B747595E124CF3CD5928E3

[>] Found RVA pattern for "isValidLicense for 4117" at 0x7B90 -> 0xA0157 -> 0xA7CEC ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x71D0 ...
[*] Rewrite data 'E8 23 7C 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x71E9 ...
[*] Rewrite data 'E8 0A 7C 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xA9AE2 ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...

[!] No pattern found for "licenseNotifyThread" ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0xA78B9 ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x400 ...
[*] Rewrite data '41' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4146_x64.tar.xz, from: https://download.sublimetext.com/sublime_text_build_4146_x64.tar.xz ...
[*] The sublime_text_build_4146_x64.tar.xz already exists.
[*] Extract: sublime_text/sublime_text, from: sublime_text_build_4146_x64.tar.xz ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Linux, Dev Channel, Build 4146
    MD5 Checksum -> 4A36EDA80930AA381A75BC1A1F478607

[>] Found RVA pattern for "isValidLicense" at 0x415483 -> 0xFFFFE847 -> 0x413CCF ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139" at 0x407CD9 ...
[*] Rewrite data 'E8 0E B4 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x407CF1 ...
[*] Rewrite data 'E8 F6 B3 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x41594C ...
[*] Rewrite data '55 41 56 53 41 89 F6' -> '48 31 C0 48 FF C0 C3' ...

[!] No pattern found for "licenseNotifyThread" ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0x41393E ...
[*] Rewrite data '41' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x3F9280 ...
[*] Rewrite data '55' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4146_mac.zip, from: https://download.sublimetext.com/sublime_text_build_4146_mac.zip ...
[*] The sublime_text_build_4146_mac.zip already exists.
[*] Extract: Sublime Text.app/Contents/MacOS/sublime_text, from: sublime_text_build_4146_mac.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, macOS, Dev Channel, Build 4146
    MD5 Checksum -> B7D1FBC9765259E31740ADFBC1206AE3

[>] Found RVA pattern for "isValidLicense" at 0x9EC0A -> 0xFFFFF0D8 -> 0x9DCE7 ...
[*] Rewrite data '55 48 89 E5' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139 " at 0x99DF ...
[*] Rewrite data 'E8 AE 12 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x99F7 ...
[*] Rewrite data 'E8 96 12 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x9F22D ...
[*] Rewrite data '55 48 89 E5 41 57 41' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x9D8E2 ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x2A27 ...
[*] Rewrite data '55' -> 'C3' ...

[!] No pattern found for "isValidLicense_arm64 for 4114" ...

[!] No pattern found for "invalidationFunction_arm64" ...

[!] No pattern found for "validationFunction_arm64 for 4139" ...

[>] Found pattern for "serverThread_arm64" at 0x10622E8 ...
[*] Rewrite data 'F6 57 BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "licenseNotifyThread_arm64" at 0x1060CD8 ...
[*] Rewrite data 'FC 6F BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "crashReporte_arm64" at 0xFE6764 ...
[*] Rewrite data 'FC 6F BC A9' -> 'C0 03 5F D6' ...

@monglung
Copy link

@maboloshi Yours is correct...

So, here is the new updated patch for win64 and linux64 to the latest ST 4147 and SM 2081: sublime_patch_2022_12_22.rar

Signature sha-256: 01e51261a3bdcd91074e9f640855e0edae0ff2a51ec69808c85e08018d57e2cc

@bms8197
Copy link

bms8197 commented Dec 29, 2022

Did anyone manage to patch ST 4147 for MacOS ARM?

@Destitute-Streetdwelling-Guttersnipe
Copy link

Copy link

ghost commented Jan 30, 2023

Hi, I wrote a patcher for linux, and you guys can use the code and just change the patterns. thanks to everyone for writing the offsets and hex patterns, https://github.com/socialfright/subzero, Thanks, I will make one for all OS's but I just wanted to send a proof of concept.

@bohdantverdyi
Copy link

Thanks, it works on Mac m1. But i have entered some license key to activate.

@luckykong
Copy link

Thanks, it works on Mac m1. But i have entered some license key to activate.

could you please share your offset information? I have tried crack sublime text 4147,but failed...

@bohdantverdyi
Copy link

Thanks, it works on Mac m1. But i have entered some license key to activate.

could you please share your offset information? I have tried crack sublime text 4147,but failed...

Don't know how to check it.

I made clean install of sublime, then followed steps from script. At the end put some license key to activate it.

Copy link

ghost commented Feb 1, 2023

@maboloshi How did you find these offsets?, which tools did you use on linux.

@maboloshi
Copy link
Author

maboloshi commented Feb 1, 2023

@maboloshi How did you find these offsets?, which tools did you use on linux.

All crack methods here are implemented by @leogx9r. Currently, many rules are starting to fail.

Copy link

ghost commented Feb 1, 2023

Updated my patcher script for Windows, it might not work but it seems to find all the offsets.

[-] sublime patch for 4143 linux and windows x64, python port
[>] Linux ELF: Detected -> 9055008
Continue? Y/Ny
[+] Found unpatched value for 'isValidLicense'at 0x3a31f2
[+] Writing patch --- b'UAWA' --> b'H1\xc0\xc3'
[+] Found unpatched value for 'invalidationFunction'at 0x399387
[+] Writing patch --- b'\xe8\x08\x0e\x12\x00' --> b'\x90\x90\x90\x90\x90'
[+] Found unpatched value for 'validationFunction' at 0x39939d
[+] Writing patch --- b'\xe8\xf2\r\x12\x00' --> b'\x90\x90\x90\x90\x90'
[+] Found unpatched value for 'serverThread' at 0x3a4e30
[+] Writing patch --- b'UAVSA\x89\xf6' --> b'H1\xc0H\xff\xc0\xc3'
[+] Found unpatched value for 'licenseNotifyThread' at 0x3a2e82
[+] Writing patch --- b'A' --> b'\xc3'
[+] Found unpatched value for 'crashReporter' at 0x38c9f0
[+] Writing patch --- b'U' --> b'\xc3'
[=] Saving file to /home/kennedy/Downloads/sublime_text/sublime_text
[+] DONE =]

@luckykong
Copy link

Thanks, it works on Mac m1. But i have entered some license key to activate.

could you please share your offset information? I have tried crack sublime text 4147,but failed...

Don't know how to check it.

I made clean install of sublime, then followed steps from script. At the end put some license key to activate it.

which script? Do you mean the script of @maboloshi for 4146?
Is it works for 4147? I will have a try.

@leagueofperez
Copy link

hi @leogx9r @maboloshi first of all thanks for posting this.
Sublime Merge build 2083 is out, can you add cracking method for this build?

@maboloshi
Copy link
Author

Except for Win64, the rest are invalid

D:\APP\crack_st_sm>python crack_st_sm.py sm2083
==========================================================================================
[*] Download: sublime_merge_build_2083_x64.zip, from: https://download.sublimetext.com/sublime_merge_build_2083_x64.zip ...
[*] The sublime_merge_build_2083_x64.zip already exists.
[*] Extract: sublime_merge.exe, from: sublime_merge_build_2083_x64.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, Win64, Stable Channel, Build 2083
    MD5 Checksum -> E33B76ADA6E7E7577CD4E81A7A4580C7

[>] Found RVA pattern for "isValidLicense" at 0x28B77 -> 0xFFFFC62C -> 0x251A8 ...
[*] Rewrite data '55 41 57 41 56 41 55 41' -> '48 C7 C0 19 01 00 00 C3' ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x286A3 ...
[*] Rewrite data 'E8 70 AA 26 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction" at 0x286BC ...
[*] Rewrite data 'E8 57 AA 26 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x269B8 ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x7174A ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x23F18 ...
[*] Rewrite data '41' -> 'C3' ...

==========================================================================================
[*] Download: sublime_merge_build_2083_x64.tar.xz, from: https://download.sublimetext.com/sublime_merge_build_2083_x64.tar.xz ...
>>>: 5.15MB [00:04, 1.18MB/s]
[*] Extract: sublime_merge/sublime_merge, from: sublime_merge_build_2083_x64.tar.xz ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, Linux, Stable Channel, Build 2083
    MD5 Checksum -> 86F61A82E7EE8DD9BDC4CF16A7C8E825

[!] No pattern found for "isValidLicense" ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x45D21D ...
[*] Rewrite data 'E8 1C 9E 16 00' -> '90 90 90 90 90' ...

[!] No pattern found for "invalidationFunction for 2078" ...

[!] No pattern found for "validationFunction" ...

[>] Found pattern for "serverThread" at 0x45B990 ...
[*] Rewrite data '55 41 56 53 41 89 F6' -> '48 31 C0 48 FF C0 C3' ...

[!] No pattern found for "licenseNotifyThread" ...

[>] Found pattern for "crashReporter" at 0x459ABA ...
[*] Rewrite data '55' -> 'C3' ...

==========================================================================================
[*] Download: sublime_merge_build_2083_mac.zip, from: https://download.sublimetext.com/sublime_merge_build_2083_mac.zip ...
>>>: 35.9MB [00:08, 4.27MB/s]
[*] Extract: Sublime Merge.app/Contents/MacOS/sublime_merge, from: sublime_merge_build_2083_mac.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, macOS, Stable Channel, Build 2083
    MD5 Checksum -> B1AADED4F196EEEEBF8D5A6F98B11288

[>] Found RVA pattern for "isValidLicense" at 0x2FB04 -> 0xFFFFC7D6 -> 0x2C2DF ...
[*] Rewrite data '55 48 89 E5 41 57 41 56' -> '48 C7 C0 19 01 00 00 C3' ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x2E96C ...
[*] Rewrite data 'E8 1F B9 18 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction" at 0x2E98B ...
[*] Rewrite data 'E8 00 B9 18 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x2D295 ...
[*] Rewrite data '55 48 89 E5 41 57 41' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x2BF6A ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x2B7AB ...
[*] Rewrite data '55' -> 'C3' ...

[!] No pattern found for "isValidLicense_arm64 for 2062" ...

[!] No pattern found for "isValidLicense_arm64 for 2075" ...

[>] Found pattern for "invalidationFunction_arm64 for 2065" at 0x14DAF68 ...
[*] Rewrite data 'AB B6 04 94' -> '1F 20 03 D5' ...

[!] No pattern found for "validationFunction_arm64 for 2065" ...

[>] Found pattern for "validationFunction_arm64 for 2078" at 0x14DAF7C ...
[*] Rewrite data 'A6 B6 04 94' -> '1F 20 03 D5' ...

[>] Found pattern for "serverThread_arm64" at 0x14D9DBC ...
[*] Rewrite data 'F6 57 BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "licenseNotifyThread_arm64" at 0x14D8D9C ...
[*] Rewrite data 'FC 6F BD A9' -> 'C0 03 5F D6' ...

[>] Found pattern for "crashReporter_arm64" at 0x14D86E4 ...
[*] Rewrite data 'FC 6F BC A9' -> 'C0 03 5F D6' ...

@STSMHQ
Copy link

STSMHQ commented Feb 19, 2023

@n6333373 Thanks a lot!

@coaperator
Copy link

@n6333373
Copy link

n6333373 commented Feb 19, 2023

Pre-patched Tarballs

Sublime Merge 2083 Stable

and there are offsets like here https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#bash-script-6 ?

Unfortunately no. My patcher just did some simple string (or bytes, whatever) replacements. Someone may compare binaries to find out what have been modified though.

@brian6932
Copy link

@gildas-ld
Copy link

Pre-patched Tarballs

Sublime Merge 2083 Stable

and there are offsets like here https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#bash-script-6 ?

Unfortunately no. My patcher just did some simple string (or bytes, whatever) replacements. Someone may compare binaries to find out what have been modified though.

Here :

#!/usr/bin/env sh
md5sum -c <<<"86F61A82E7EE8DD9BDC4CF16A7C8E825 sublime_merge" || exit

echo 000EFF60: 2F00 0000 0000 0000 0000 0000 0000 0000  | xxd -r - sublime_merge
echo 000EFF70: 0000 0000 0000 4541 3745 0050 7572 6368  | xxd -r - sublime_merge
echo 000FB2E0: 6500 2D00 7477 0072 2B62 0054 6875 0000  | xxd -r - sublime_merge
echo 000FB2F0: 0000 0000 0000 0000 0000 0000 0000 206D  | xxd -r - sublime_merge
echo 00102DB0: 0000 0000 0000 0000 0000 0000 0000 0000  | xxd -r - sublime_merge
echo 00102DC0: 0000 0000 0000 7072 6576 696F 7573 5F63  | xxd -r - sublime_merge
echo 001075A0: 6E64 6F77 003D 3D3D 206E 3633 3333 3337  | xxd -r - sublime_merge
echo 001075B0: 3320 3D3D 3D00 0000 0000 002E 6D69 7373  | xxd -r - sublime_merge
echo 0045A360: B819 0100 00C3 5541 5453 4881 EC88 2400  | xxd -r - sublime_merge
echo 0045D210: 0048 8D3D D00F 0000 BA88 1300 0090 9090  | xxd -r - sublime_merge
echo 0045D220: 9090 4889 5C24 0848 8BB3 1003 0000 488D  | xxd -r - sublime_merge
echo 0045D230: 3D10 1200 00BA 983A 0000 9090 9090 9048  | xxd -r - sublime_merge
echo 0047AF90: 3A00 0090 9090 9090 4C89 E748 89DE E8AB  | xxd -r - sublime_merge

@leagueofperez
Copy link

Pre-patched Tarballs

Sublime Merge 2083 Stable

and there are offsets like here https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#bash-script-6 ?

Unfortunately no. My patcher just did some simple string (or bytes, whatever) replacements. Someone may compare binaries to find out what have been modified though.

Here :

#!/usr/bin/env sh
md5sum -c <<<"86F61A82E7EE8DD9BDC4CF16A7C8E825 sublime_merge" || exit

echo 000EFF60: 2F00 0000 0000 0000 0000 0000 0000 0000  | xxd -r - sublime_merge
echo 000EFF70: 0000 0000 0000 4541 3745 0050 7572 6368  | xxd -r - sublime_merge
echo 000FB2E0: 6500 2D00 7477 0072 2B62 0054 6875 0000  | xxd -r - sublime_merge
echo 000FB2F0: 0000 0000 0000 0000 0000 0000 0000 206D  | xxd -r - sublime_merge
echo 00102DB0: 0000 0000 0000 0000 0000 0000 0000 0000  | xxd -r - sublime_merge
echo 00102DC0: 0000 0000 0000 7072 6576 696F 7573 5F63  | xxd -r - sublime_merge
echo 001075A0: 6E64 6F77 003D 3D3D 206E 3633 3333 3337  | xxd -r - sublime_merge
echo 001075B0: 3320 3D3D 3D00 0000 0000 002E 6D69 7373  | xxd -r - sublime_merge
echo 0045A360: B819 0100 00C3 5541 5453 4881 EC88 2400  | xxd -r - sublime_merge
echo 0045D210: 0048 8D3D D00F 0000 BA88 1300 0090 9090  | xxd -r - sublime_merge
echo 0045D220: 9090 4889 5C24 0848 8BB3 1003 0000 488D  | xxd -r - sublime_merge
echo 0045D230: 3D10 1200 00BA 983A 0000 9090 9090 9048  | xxd -r - sublime_merge
echo 0047AF90: 3A00 0090 9090 9090 4C89 E748 89DE E8AB  | xxd -r - sublime_merge

Thank you very much!

@maboloshi
Copy link
Author

How to Crack Sublime Text, Dev Channel, Build 4148

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 0x000A8438 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x000071D0 E8 E3 86 20 00 90 90 90 90 90
Persistent License Check 2 0x000071E9 E8 CA 86 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000AA228 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x000A8005 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 "E7E1484E9981268FD1E468531BFA9E88" || exit
echo 000A8438: 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 000AA228: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A8005: 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 0x00414DA9 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x00408DD3 E8 BA B8 12 00 90 90 90 90 90
Persistent License Check 2 0x00408DEB E8 A2 B8 12 00 90 90 90 90 90
Disable Server Validation Thread 0x00416ACC 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00414A18 41 C3
Disable Crash Reporter 0x003FA0B0 55 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"B5FAFC0BCCFCBDA235293B5A79AA4C62  sublime_text" || exit
echo 00414DA9: 48 31 C0 C3          | xxd -r - sublime_text
echo 00408DD3: 90 90 90 90 90       | xxd -r - sublime_text
echo 00408DEB: 90 90 90 90 90       | xxd -r - sublime_text
echo 00416ACC: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00414A18: C3                   | xxd -r - sublime_text
echo 003FA0B0: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009EEBB 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x0000A4BF E8 40 15 13 00 90 90 90 90 90
Persistent License Check 2 0x0000A4D7 E8 28 15 13 00 90 90 90 90 90
Disable Server Validation Thread 0x000A0411 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009EAB6 55 C3
Disable Crash Reporter 0x00003257 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "265090B4E919F9EDC4A826B477C03E5D" || exit
echo 0009EEBB: 48 31 C0 C3          | xxd -r - sublime_text
echo 0000A4BF: 90 90 90 90 90       | xxd -r - sublime_text
echo 0000A4D7: 90 90 90 90 90       | xxd -r - sublime_text
echo 000A0411: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009EAB6: C3                   | xxd -r - sublime_text
echo 00003257: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

@bms8197
Copy link

bms8197 commented Mar 15, 2023

I assume the above patch is for MacOS running on Intel CPUs and not on ARM. Is there any patch for Apple Sillicon?

@maboloshi
Copy link
Author

I assume the above patch is for MacOS running on Intel CPUs and not on ARM. Is there any patch for Apple Sillicon?

Currently, there are no patches available for Apple Sillicon.😢

@Destitute-Streetdwelling-Guttersnipe

@bms8197 you can hide the nag to registration by patching 14 to 94 at offset 0x0105DB9D. It's almost the same as having a license.

@bms8197 for ST4148 you can hide the nag by patching at 0x01065B8D. Change 1 bit from 14 to 94, and you won't see it for 3 days.

@monglung
Copy link

monglung commented Mar 18, 2023

Here is my new updated patch for win64 and linux64 to the latest ST 4148 and SM 2083: slp_2023_03_18.rar

Signature sha-256: bd131ee657cfe2e87c65bfda03f0e158a4b8a9862068cf3ffd8e8094e9526a84

Edit: Re-upload the file per @ta2013 request...

@hellzerg
Copy link

@monglung

How do I use this slp exe file?

@ftphikari
Copy link

Is there Sublime Merge 2083 crack for Mac soon?

@monglung
Copy link

@hellzerg Just run in Admin mode. If your sublime text and/or sublime merge is in the default location, it will detect... else you have to specify the location.... then click patch...

@rjbprime
Copy link

@monglung I am able to patch ST4143 with your app, but something bugs out with SM2083. When entering a licence, it refuses to proceed when you cleck the "Use Licence" button, such that that particular button seems like it is disabled.

@monglung
Copy link

@rjbprime Yes, the patch not working for SM2083.... You cannot enter a License... I also test on the new SM2085... same thing happens...

Hope someone else can figure out and have a new method to patch... In the mean time, I guess we have to use the older one then...

@n6333373
Copy link

n6333373 commented Mar 25, 2023

Pre-patched Tarballs

Frequently updated.

https://mega.nz/folder/EHZF0CIC#D0VAnBK5P2wbpoEYdlMxLg

@Destitute-Streetdwelling-Guttersnipe
Copy link

@n6333373
Copy link

@n6333373 it looks like the pattern matches more than once in SM2085. You shouldn't replace all of them. You have a false positive here.

Thanks. Updated.

@QuinTeknoLife
Copy link

any luck for 4148 on linux?

@maboloshi
Copy link
Author

maboloshi commented Apr 28, 2023

@DeveloperKev
Copy link

@maboloshi @leogx9r can this cause leakage of memory?

@maboloshi
Copy link
Author

[*] Download: sublime_text_build_4149_x64.zip, from: https://download.sublimetext.com/sublime_text_build_4149_x64.zip ...
>>>: 23.1MB [00:11, 1.98MB/s]
[*] Extract: sublime_text.exe, from: sublime_text_build_4149_x64.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Win64, Dev Channel, Build 4149
    MD5 Checksum -> 7941C7308CBDE51747D709E68E6D7522

[>] Found RVA pattern for "isValidLicense for 4117" at 0x7B90 -> 0xA13C3 -> 0xA8F58 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x71D0 ...
[*] Rewrite data 'E8 67 00 21 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x71E9 ...
[*] Rewrite data 'E8 4E 00 21 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xAAD54 ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0xA8B25 ...
[*] Rewrite data '55' -> 'C3' ...


[>] Found pattern for "crashReporter" at 0x400 ...
[*] Rewrite data '41' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4149_x64.tar.xz, from: https://download.sublimetext.com/sublime_text_build_4149_x64.tar.xz ...
>>>: 16.5MB [00:10, 1.64MB/s]
[*] Extract: sublime_text/sublime_text, from: sublime_text_build_4149_x64.tar.xz ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Linux, Dev Channel, Build 4149
    MD5 Checksum -> D1708AF8BBD96A8D00221DBC6C8A8E2B

[>] Found RVA pattern for "isValidLicense" at 0x416C33 -> 0xFFFFE841 -> 0x415479 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139" at 0x4094A3 ...
[*] Rewrite data 'E8 A4 CD 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x4094BB ...
[*] Rewrite data 'E8 8C CD 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x4170FC ...
[*] Rewrite data '55 41 56 53 41 89 F6' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0x4150E8 ...
[*] Rewrite data '41' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x3FA780 ...
[*] Rewrite data '55' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4149_mac.zip, from: https://download.sublimetext.com/sublime_text_build_4149_mac.zip ...
>>>: 39.7MB [00:37, 1.06MB/s]
[*] Extract: Sublime Text.app/Contents/MacOS/sublime_text, from: sublime_text_build_4149_mac.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, macOS, Dev Channel, Build 4149
    MD5 Checksum -> D2D11773CAB9894D7C63C54050513A64

[>] Found RVA pattern for "isValidLicense" at 0xA08E8 -> 0xFFFFF0D2 -> 0x9F9BF ...
[*] Rewrite data '55 48 89 E5' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139 " at 0xA2BF ...
[*] Rewrite data 'E8 88 2E 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0xA2D7 ...
[*] Rewrite data 'E8 70 2E 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xA0F0D ...
[*] Rewrite data '55 48 89 E5 41 57 41' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x9F5BA ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x3057 ...
[*] Rewrite data '55' -> 'C3' ...

@elguaxo
Copy link

elguaxo commented May 7, 2023

@maboloshi could you share the scripts for patching Build 4149? Thanks in advance.

@brian6932
Copy link

brian6932 commented May 7, 2023

@elguaxo For now, just read the the output from the post above you, and adjust the current hashes and hex offsets to the ones there, works for my personal scripts.
Windows pwsh:

if ((Get-FileHash sublime_text.exe -Algorithm MD5).Hash -ne '7941C7308CBDE51747D709E68E6D7522') { exit }
'crash_reporter.exe', 'update_installer.exe' | ForEach-Object { if (Test-Path $_) { Remove-Item $_ } }
'000A8F58: 48 31 C0 C3'          | xxd -r - sublime_text.exe
'000071D0: 90 90 90 90 90'       | xxd -r - sublime_text.exe
'000071E9: 90 90 90 90 90'       | xxd -r - sublime_text.exe
'000AAD54: 48 31 C0 48 FF C0 C3' | xxd -r - sublime_text.exe
'000A8B25: C3'                   | xxd -r - sublime_text.exe
'00000400: C3'                   | xxd -r - sublime_text.exe

@monglung
Copy link

monglung commented May 8, 2023

Here is my new updated patch for win64 and linux64 to the latest ST 4149: slp_2023_05_08.rar

Signature sha-256: 0e67f2d55e76b865bf7569d66fca69217068154a2ff8079e0539a342a29326d5

@Bruskyer
Copy link

Bruskyer commented May 8, 2023

py file updated for sm 2083 and st 4148 ?
pls can you explane usage of xxd.exe ı got it and paste the bat script into but not working fist ask a required dll and I download it and passed error but script is not working

:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "E7E1484E9981268FD1E468531BFA9E88" || exit
echo 000A8438: 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 000AA228: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A8005: C3 | xxd -r - sublime_text.exe
echo 00000400: C3 | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

@Destitute-Streetdwelling-Guttersnipe
Copy link

@bms8197
Copy link

bms8197 commented May 9, 2023

Anyone managed to patch ST 4149 on MacOS Apple Sillicion CPU?

@Bruskyer
Copy link

Bruskyer commented May 9, 2023

Here is my new updated patch for win64 and linux64 to the latest ST 4149: slp_2023_05_08.rar

Signature sha-256: 0e67f2d55e76b865bf7569d66fca69217068154a2ff8079e0539a342a29326d5

doesnt works in win11 when run slp.exe

@Bruskyer
Copy link

Bruskyer commented May 9, 2023

@Bruskyer you should provide the details. What's the error message or a screenshot of it?

I downloaded xxd.exe and run it
copied script code and paste into the xxd.exe nothing works

@monglung
Copy link

monglung commented May 9, 2023

@Bruskyer You should run slp.exe with Administrator mode...

@Destitute-Streetdwelling-Guttersnipe
Copy link

@Bruskyer
Copy link

@Bruskyer You should run slp.exe with Administrator mode...

yes with admin mode but nothing appear just cursor loading appear and no screen and any message :(

@hellzerg
Copy link

Which are the exact commands that patch the Sublime Merge 2083 ?

@maboloshi
Copy link
Author

[*] Download: sublime_text_build_4150_x64.zip, from: https://download.sublimetext.com/sublime_text_build_4150_x64.zip ...
>>>: 23.1MB [00:06, 3.61MB/s]
[*] Extract: sublime_text.exe, from: sublime_text_build_4150_x64.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Win64, Dev Channel, Build 4150
    MD5 Checksum -> 2E165A9CF8BEB60767E78B6D54996F0B

[>] Found RVA pattern for "isValidLicense for 4117" at 0x7B90 -> 0xA12D3 -> 0xA8E68 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x71D0 ...
[*] Rewrite data 'E8 57 FF 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x71E9 ...
[*] Rewrite data 'E8 3E FF 20 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xAAC58 ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0xA8A35 ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x400 ...
[*] Rewrite data '41' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4150_x64.tar.xz, from: https://download.sublimetext.com/sublime_text_build_4150_x64.tar.xz ...
>>>: 16.5MB [00:05, 3.03MB/s]
[*] Extract: sublime_text/sublime_text, from: sublime_text_build_4150_x64.tar.xz ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Linux, Dev Channel, Build 4150
    MD5 Checksum -> 5DB923AF33C2572EDB83E7DBF4B48E8F

[>] Found RVA pattern for "isValidLicense" at 0x416633 -> 0xFFFFE851 -> 0x414E89 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139" at 0x408EB3 ...
[*] Rewrite data 'E8 F6 CC 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x408ECB ...
[*] Rewrite data 'E8 DE CC 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0x416AFC ...
[*] Rewrite data '55 41 56 53 41 89 F6' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread for 4146" at 0x414AF8 ...
[*] Rewrite data '41' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x3FA190 ...
[*] Rewrite data '55' -> 'C3' ...

==========================================================================================
[*] Download: sublime_text_build_4150_mac.zip, from: https://download.sublimetext.com/sublime_text_build_4150_mac.zip ...
>>>: 39.7MB [00:08, 4.45MB/s]
[*] Extract: Sublime Text.app/Contents/MacOS/sublime_text, from: sublime_text_build_4150_mac.zip ...

[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, macOS, Dev Channel, Build 4150
    MD5 Checksum -> 330C520A50F79996F078D3634CCBC8A1

[>] Found RVA pattern for "isValidLicense" at 0xA0086 -> 0xFFFFF0C8 -> 0x9F153 ...
[*] Rewrite data '55 48 89 E5' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction for 4139 " at 0x9AFF ...
[*] Rewrite data 'E8 E4 2D 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction for 4139" at 0x9B17 ...
[*] Rewrite data 'E8 CC 2D 13 00' -> '90 90 90 90 90' ...

[>] Found pattern for "serverThread" at 0xA06A9 ...
[*] Rewrite data '55 48 89 E5 41 57 41' -> '48 31 C0 48 FF C0 C3' ...

[>] Found pattern for "licenseNotifyThread" at 0x9ED4E ...
[*] Rewrite data '55' -> 'C3' ...

[>] Found pattern for "crashReporter" at 0x2897 ...
[*] Rewrite data '55' -> 'C3' ...

@monglung
Copy link

monglung commented May 11, 2023

Again, my new updated patch for win64 and linux64 to the latest ST 4150: slp_2023_05_11.rar

Signature sha-256: 1da188d3575a914354a9daba769b425c0067e300172ba0c38e324bd90805e95e

@minayko
Copy link

minayko commented May 19, 2023

[>] Found RVA pattern for "isValidLicense for 4117" at 0x7B90 -> 0xA12D3 -> 0xA8E68 ...

Why are there three addresses?

Where can I learn more about RVA?

@Destitute-Streetdwelling-Guttersnipe
Copy link

@Destitute-Streetdwelling-Guttersnipe
Copy link

There's also a plugin to automatically close the nag popup at https://gist.github.com/egel/b7beba6f962110596660
The Windows version is at https://gist.github.com/altbdoor/6c36d2c83accd3095145085d04c84f3b

You don't have to patch ST anymore with this method.

@DarkXero-dev
Copy link

DarkXero-dev commented Jun 24, 2023

I cannot patch SM Linux latest stable is 2083 and none of the SLPs here have it in the list max I found was 2081 Dev .. Patched binaries of 2085 Dev .. I don't want Dev I need 2083 Stable..

Thanks

@urxi
Copy link

urxi commented Jul 5, 2023

Here are my patches for the most recent macOS (both Intel and ARM) builds:

Sublime Text (Stable Channel, Build 4143)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "70909B4BCCB3209C6F6C80122171BA84" || exit

echo 00096206: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 000086A4: 90 90 90 90 90          | xxd -r - sublime_text
echo 000086BC: 90 90 90 90 90          | xxd -r - sublime_text
echo 0009779F: C3                      | xxd -r - sublime_text
echo 00095DF0: C3                      | xxd -r - sublime_text
echo 000026A7: C3                      | xxd -r - sublime_text

echo 01055A38: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00FE4E80: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FE4E94: 1F 20 03 D5             | xxd -r - sublime_text
echo 01056D2C: C0 03 5F D6             | xxd -r - sublime_text
echo 010556A0: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE04C0: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Sublime Text (Dev Channel, Build 4150)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "330C520A50F79996F078D3634CCBC8A1" || exit

echo 0009F153: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00009AFF: 90 90 90 90 90          | xxd -r - sublime_text
echo 00009B17: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A06A9: C3                      | xxd -r - sublime_text
echo 0009ED4E: C3                      | xxd -r - sublime_text
echo 00002897: C3                      | xxd -r - sublime_text

echo 010647D0: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00FEE68C: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FEE6A0: 1F 20 03 D5             | xxd -r - sublime_text
echo 01065A74: C0 03 5F D6             | xxd -r - sublime_text
echo 01064448: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE90EC: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Sublime Merge (Stable Channel, Build 2083)
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: C3                      | xxd -r - sublime_merge
echo 0002BF6A: C3                      | xxd -r - sublime_merge
echo 0002B7AB: C3                      | xxd -r - sublime_merge

echo 014D9060: 20 23 80 D2 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

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Sublime Merge (Dev Channel, Build 2085)
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: C3                      | xxd -r - sublime_merge
echo 0002C156: C3                      | xxd -r - sublime_merge
echo 0002B997: C3                      | xxd -r - sublime_merge

echo 015027EC: 20 23 80 D2 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

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

@luckykong
Copy link

Sublime Text (Dev Channel, Build 4150)

Great, at least this patch is working. Thank you very much.

@bms8197
Copy link

bms8197 commented Jul 5, 2023

Works like a charm. Thank you!

@maboloshi
Copy link
Author

@urxi Thank you! 👍

@urxi
Copy link

urxi commented Jul 7, 2023

Here are my patches for the most recent Linux (x64) builds:

Sublime Text (Stable Channel, Build 4143)
cd /opt/sublime_text || exit
md5sum -c <<< "AFDEBB91F2BF42C9B491BAFD517C0A49  sublime_text" || exit

echo 003A31F2: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00399387: 90 90 90 90 90          | xxd -r - sublime_text
echo 0039939D: 90 90 90 90 90          | xxd -r - sublime_text
echo 003A4E30: C3                      | xxd -r - sublime_text
echo 003A2E82: C3                      | xxd -r - sublime_text
echo 0038C9F0: C3                      | xxd -r - sublime_text
Sublime Text (Dev Channel, Build 4150)
cd /opt/sublime_text || exit
md5sum -c <<< "5DB923AF33C2572EDB83E7DBF4B48E8F  sublime_text" || exit

echo 00414E89: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00408EB3: 90 90 90 90 90          | xxd -r - sublime_text
echo 00408ECB: 90 90 90 90 90          | xxd -r - sublime_text
echo 00416AFC: C3                      | xxd -r - sublime_text
echo 00414AF8: C3                      | xxd -r - sublime_text
echo 003FA190: C3                      | xxd -r - sublime_text
Sublime Merge (Stable Channel, Build 2083)
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
Sublime Merge (Dev Channel, Build 2085)
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

Note that I could not test these myself, so let me know if there are any issues.

@urxi
Copy link

urxi commented Jul 9, 2023

And to finish things off, my patches for the most recent Windows (x64) builds:

Sublime Text (Stable Channel, Build 4143)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe MD5 | find /i "654F4259E066F90F4964E695CF808AD0" || exit

echo 000A9864: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 000071FE: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00007217: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 000AB682: C3                      | xxd -r - sublime_text.exe
echo 000A940F: C3                      | xxd -r - sublime_text.exe
echo 00000400: C3                      | xxd -r - sublime_text.exe
Sublime Text (Dev Channel, Build 4150)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe MD5 | find /i "2E165A9CF8BEB60767E78B6D54996F0B" || exit

echo 000A8E68: 48 C7 C0 00 00 00 00 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 000AAC58: C3                      | xxd -r - sublime_text.exe
echo 000A8A35: C3                      | xxd -r - sublime_text.exe
echo 00000400: C3                      | xxd -r - sublime_text.exe
Sublime Merge (Stable Channel, Build 2083)
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: C3                      | xxd -r - sublime_merge.exe
echo 00024DCD: C3                      | xxd -r - sublime_merge.exe
echo 00023F18: C3                      | xxd -r - sublime_merge.exe
Sublime Merge (Dev Channel, Build 2085)
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: C3                      | xxd -r - sublime_merge.exe
echo 00024F25: C3                      | xxd -r - sublime_merge.exe
echo 00024070: C3                      | xxd -r - sublime_merge.exe

@maboloshi Feel free to use these and update your main document 🙂

@Destitute-Streetdwelling-Guttersnipe
Copy link

@urxi
Copy link

urxi commented Jul 19, 2023

You're welcome! I think @norambna just copied all of my patches into a single comment -- don't think they changed or added anything.

@norambna
Copy link

norambna commented Jul 19, 2023

You're welcome! I think @norambna just copied all of my patches into a single comment -- don't think they changed or added anything.

Sorry! I was copy pasting your patches, but posted them here. Thanks @urxi

@rjbprime
Copy link

rjbprime commented Aug 3, 2023

I just opened Sublime Text, and it's popped up with an update nag. Version 4153 for Windows is out.

@kenexllc
Copy link

kenexllc commented Aug 3, 2023

`[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Text, Win64, Stable Channel, Build 4152
MD5 Checksum -> 4BD0A178BBEDA7765A1C58029D20CF37

[>] Found RVA pattern for "isValidLicense" at 0x7C56 -> 0xA111D -> 0xA8D78 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...
[=] Patched "isValidLicense" successfully.

[>] Found pattern for "invalidationFunction" at 0x71D0 ...
[*] Rewrite data 'E8 17 FE 20 00' -> '90 90 90 90 90' ...
[=] Patched "invalidationFunction" successfully.

[>] Found pattern for "validationFunction" at 0x71E9 ...
[*] Rewrite data 'E8 FE FD 20 00' -> '90 90 90 90 90' ...
[=] Patched "validationFunction" successfully.

[>] Found pattern for "serverThread" at 0xAAB3E ...
[*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ...
[=] Patched "serverThread" successfully.

[>] Found pattern for "licenseNotifyThread" at 0xA8945 ...
[*] Rewrite data '55' -> 'C3' ...
[=] Patched "licenseNotifyThread" successfully.

[>] Found pattern for "crashReporter" at 0x400 ...
[*] Rewrite data '41' -> 'C3' ...
[=] Patched "crashReporter" successfully.`

@Destitute-Streetdwelling-Guttersnipe
Copy link

@Bruskyer
Copy link

Bruskyer commented Aug 3, 2023

`[>] Attempting to autodetect input file ... [*] Input file -> Sublime Text, Win64, Stable Channel, Build 4152 MD5 Checksum -> 4BD0A178BBEDA7765A1C58029D20CF37

[>] Found RVA pattern for "isValidLicense" at 0x7C56 -> 0xA111D -> 0xA8D78 ... [*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ... [=] Patched "isValidLicense" successfully.

[>] Found pattern for "invalidationFunction" at 0x71D0 ... [*] Rewrite data 'E8 17 FE 20 00' -> '90 90 90 90 90' ... [=] Patched "invalidationFunction" successfully.

[>] Found pattern for "validationFunction" at 0x71E9 ... [*] Rewrite data 'E8 FE FD 20 00' -> '90 90 90 90 90' ... [=] Patched "validationFunction" successfully.

[>] Found pattern for "serverThread" at 0xAAB3E ... [*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ... [=] Patched "serverThread" successfully.

[>] Found pattern for "licenseNotifyThread" at 0xA8945 ... [*] Rewrite data '55' -> 'C3' ... [=] Patched "licenseNotifyThread" successfully.

[>] Found pattern for "crashReporter" at 0x400 ... [*] Rewrite data '41' -> 'C3' ... [=] Patched "crashReporter" successfully.`

Thanks good work

@rjbprime
Copy link

rjbprime commented Aug 4, 2023

@kenexllc and @Bruskyer How does one do this on windows?

@Destitute-Streetdwelling-Guttersnipe

@kenexllc you remind me of @leogx9r I hope that @leogx9r is still alive and kicking

Nope! @kenexllc just use the script by @maboloshi and may improve a bit for new build of ST.

@taozhiyu
Copy link

taozhiyu commented Aug 5, 2023

`[>] Attempting to autodetect input file ... [*] Input file -> Sublime Text, Win64, Stable Channel, Build 4152 MD5 Checksum -> 4BD0A178BBEDA7765A1C58029D20CF37

[>] Found RVA pattern for "isValidLicense" at 0x7C56 -> 0xA111D -> 0xA8D78 ... [*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ... [=] Patched "isValidLicense" successfully.

[>] Found pattern for "invalidationFunction" at 0x71D0 ... [*] Rewrite data 'E8 17 FE 20 00' -> '90 90 90 90 90' ... [=] Patched "invalidationFunction" successfully.

[>] Found pattern for "validationFunction" at 0x71E9 ... [*] Rewrite data 'E8 FE FD 20 00' -> '90 90 90 90 90' ... [=] Patched "validationFunction" successfully.

[>] Found pattern for "serverThread" at 0xAAB3E ... [*] Rewrite data '55 56 57 48 83 EC 30' -> '48 31 C0 48 FF C0 C3' ... [=] Patched "serverThread" successfully.

[>] Found pattern for "licenseNotifyThread" at 0xA8945 ... [*] Rewrite data '55' -> 'C3' ... [=] Patched "licenseNotifyThread" successfully.

[>] Found pattern for "crashReporter" at 0x400 ... [*] Rewrite data '41' -> 'C3' ... [=] Patched "crashReporter" successfully.`

Is it automatically generated in some way?

@maboloshi
Copy link
Author

Currently, only the Linux rules for SM have not been fixed yet.

@urxi Can you share your rules?

@maboloshi
Copy link
Author

ST4154 Crash Reporter rule fail, linux rules fail.

@AxleUnix
Copy link

AxleUnix commented Aug 10, 2023

#!/bin/bash

########## ST4154 for those who are waiting for the Linux version (crash reporter is redundant)
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

@maboloshi
Copy link
Author

@AxleUnix I fixed some of the rules to get the same offset as you.😊

@urxi
Copy link

urxi commented Aug 10, 2023

@maboloshi I don't use rules or patterns, just some "manual" inspection via a debugger. Regarding the Crash Reporter: it seems to have been replaced with Crashpad in Build 4154.

Here are my patches. Linux and Windows are untested, but all offsets seem to match yours:

macOS Build 4152 (Stable)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit

echo 0009F313: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 0009EF0E: C3                      | xxd -r - sublime_text
echo 00002A87: C3                      | xxd -r - sublime_text

echo 01060C90: 00 00 80 D2 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"
macOS Build 4154 (Dev)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit

echo 0009D527: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 0009D122: C3                      | xxd -r - sublime_text

echo 010758B8: 00 00 80 D2 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

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux Build 4152 (Stable)
cd /opt/sublime_text || exit
md5sum -c <<< "7038C3B1CC79504602DA70599D4CCCE9  sublime_text" || exit

echo 00415013: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 00414C82: C3                      | xxd -r - sublime_text
echo 003FA310: C3                      | xxd -r - sublime_text
Linux Build 4154 (Dev)
cd /opt/sublime_text || exit
md5sum -c <<< "8836FE092DBB7BC8D3D2375D34510CA9  sublime_text" || exit

echo 00443F94: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 00443BF8: C3                      | xxd -r - sublime_text
Windows Build 4152 (Stable)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "15BB398D5663B89A44372EF15F70A46F" || exit

echo 000A8D78: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text.exe
echo 000A8945: C3                      | xxd -r - sublime_text.exe
echo 00000400: C3                      | xxd -r - sublime_text.exe
Windows Build 4154 (Dev)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "ADF277D39672D83637AB708FC45413C8" || 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 000A0222: C3                      | xxd -r - sublime_text.exe
echo 0009E043: C3                      | xxd -r - sublime_text.exe

@maboloshi
Copy link
Author

@urxi 👍

@urxi
Copy link

urxi commented Aug 11, 2023

Here are my patches for the new Sublime Merge builds. Linux and Windows versions are untested.

macOS Build 2087 (Dev)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "E5A8FCCB85909D494A1692907A00E494" || exit

echo 0002C297: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002E8E8: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002E907: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D249: C3                      | xxd -r - sublime_merge
echo 0002BF22: C3                      | xxd -r - sublime_merge

echo 0151F88C: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 0152175C: 1F 20 03 D5             | xxd -r - sublime_merge
echo 01521770: 1F 20 03 D5             | xxd -r - sublime_merge
echo 015205D4: C0 03 5F D6             | xxd -r - sublime_merge
echo 0151F5C4: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux Build 2087 (Dev)
cd /opt/sublime_merge || exit
md5sum -c <<< "900DA7CE425F64B0D9AC710A2F6D6CD1  sublime_merge" || exit

echo 004E12B8: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004E4469: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E4481: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E2B60: C3                      | xxd -r - sublime_merge
echo 004E0FC2: C3                      | xxd -r - sublime_merge
Windows Build 2087 (Dev)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe MD5 | find /i "92B8F7B507AE902A39583AC4754BBFE8" || exit

echo 00025758: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 000288C5: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000288DE: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026F1A: C3                      | xxd -r - sublime_merge.exe
echo 00025379: C3                      | xxd -r - sublime_merge.exe

@Destitute-Streetdwelling-Guttersnipe

LOL, the patch c6 40 05 01 48 85 c9 still works for stable builds (up to 4152). It also works in all x64 OS.
See https://gist.github.com/marcpinet/27c6de31a6b25a99248abc859cc09c9b

@STSMHQ
Copy link

STSMHQ commented Aug 13, 2023

@urxi Thank you 💙

@maboloshi
Copy link
Author

maboloshi commented Aug 22, 2023

Sublime Merge, Dev Channel, Build 2090

Untested

✅Windows
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "420CECC76BF4A1C477EE4B6DA3002810" || exit

echo 00025754: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 000288CF: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000288E8: 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 0006F740: C3                      | xxd -r - sublime_merge.exe
✅Linux
cd /opt/sublime_merge || exit
md5sum -c <<< "2DAA23CEFADB55DE662B9E626B231C29  sublime_merge" || exit

echo 004E1714: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004E48C7: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E48DF: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E2FBC: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 004E141E: C3                      | xxd -r - sublime_merge
❎macOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "9022E5B0147E11FF3746AA8EE7138632" || exit

echo 0002C88F: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002EEDC: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EEFB: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D83D: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002C51A: C3                      | xxd -r - sublime_merge

echo 0151EF3C: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 01520E10: 1F 20 03 D5             | xxd -r - sublime_merge
echo 01520E24: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0151FC88: C0 03 5F D6             | xxd -r - sublime_merge
echo 0151EC74: C0 03 5F D6             | xxd -r - sublime_merge

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

The Linux rules have been updated, please try it

@wtask
Copy link

wtask commented Aug 22, 2023

@maboloshi worked on win11 x64, thank you

@CodigoCristo
Copy link

@maboloshi it does not open on Linux x64, thank you

@ask6483
Copy link

ask6483 commented Aug 25, 2023

Sublime Merge 2091 is out, any update coming?

@maboloshi
Copy link
Author

maboloshi commented Aug 26, 2023

Sublime Text Dev Channel, Build 4155

Untested

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

echo 0009E450: 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 000A020A: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text.exe
echo 0009E017: C3                      | xxd -r - sublime_text.exe
echo 00000400: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "76AC20636E4173A69016AA3E9F7F462D  sublime_text" || exit

echo 00444104: 48 31 C0 C3             | xxd -r - sublime_text
echo 0042B380: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042B398: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044601A: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 00443D68: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "653C989D7579960AB4B3A6E243B25AEE" || exit

echo 0009D01F: 48 31 C0 C3             | xxd -r - sublime_text
echo 00009275: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000928D: 90 90 90 90 90          | xxd -r - sublime_text
echo 0009E565: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 0009CC1A: C3                      | xxd -r - sublime_text

echo 01078440: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 01002E58: 1F 20 03 D5             | xxd -r - sublime_text
echo 01002E6C: 1F 20 03 D5             | xxd -r - sublime_text
echo 010796BC: C0 03 5F D6             | xxd -r - sublime_text
echo 010780BC: C0 03 5F D6             | xxd -r - sublime_text

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

Sublime Merge, Stable Channel, Build 2091

Untested

✅Windows 【Fixed】
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
❎Linux
cd /opt/sublime_merge || exit
md5sum -c <<< "4F1CF25B84FA66F5C24E7801FB652011  sublime_merge" || exit

echo 004E1752: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004E48DD: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E48F5: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E2FD6: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 004E145C: C3                      | xxd -r - sublime_merge
❎macOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "C69155318089F0D37DA219759A29BBA3" || exit

echo 0002C8C1: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002EEBC: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EEDB: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D81D: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002C54C: C3                      | xxd -r - sublime_merge

echo 0151EF38: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 01520DF4: 1F 20 03 D5             | xxd -r - sublime_merge
echo 01520E08: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0151FC6C: C0 03 5F D6             | xxd -r - sublime_merge
echo 0151EC70: C0 03 5F D6             | xxd -r - sublime_merge

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

@ask6483
Copy link

ask6483 commented Aug 26, 2023

@maboloshi I can confirm that 2091 patch is not working on linux, reverted to 2083.
2091 build is already official so why dev channel?

@maboloshi
Copy link
Author

@ask6483 Please test the SM2090 Linux patch works?

@maboloshi
Copy link
Author

The SM Linux patch needs @urxi for help!

@wangcl
Copy link

wangcl commented Aug 26, 2023

2091 doesn't work on Win10.
4155 works on Win10.

@ask6483
Copy link

ask6483 commented Aug 27, 2023

@maboloshi SM2090 patch is working on Linux

@huo-feng-ding
Copy link

2091 doesn't work on Win10.

@maboloshi
Copy link
Author

2091 doesn't work on Win10. 4155 works on Win10.

The sm2091 for win has been fixed.

@huo-feng-ding
Copy link

2091 doesn't work on Win10. 4155 works on Win10.

The sm2091 for win has been fixed.

fixed sm2091 work well on Win10,thanks

@wangcl
Copy link

wangcl commented Aug 28, 2023

2091 doesn't work on Win10. 4155 works on Win10.

The sm2091 for win has been fixed.

thank u, it works.

@urxi
Copy link

urxi commented Aug 29, 2023

Here are my patches for all current builds:

Sublime Text (Stable Channel, Build 4152)

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

echo 0009F313: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 0009EF0E: C3                      | xxd -r - sublime_text

echo 01060C90: 00 00 80 D2 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

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested)
cd /opt/sublime_text || exit
md5sum -c <<< "7038C3B1CC79504602DA70599D4CCCE9  sublime_text" || exit

echo 00415013: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 00414C82: C3                      | xxd -r - sublime_text
Windows (tested)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "15BB398D5663B89A44372EF15F70A46F" || exit

echo 000A8D78: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text.exe
echo 000A8945: C3                      | xxd -r - sublime_text.exe

Sublime Text (Dev Channel, Build 4155)

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

echo 0009D01F: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 00009275: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000928D: 90 90 90 90 90          | xxd -r - sublime_text
echo 0009E565: C3                      | xxd -r - sublime_text
echo 0009CC1A: C3                      | xxd -r - sublime_text

echo 01078440: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 01002E58: 1F 20 03 D5             | xxd -r - sublime_text
echo 01002E6C: 1F 20 03 D5             | xxd -r - sublime_text
echo 010796BC: C0 03 5F D6             | xxd -r - sublime_text
echo 010780BC: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested)
cd /opt/sublime_text || exit
md5sum -c <<< "76AC20636E4173A69016AA3E9F7F462D  sublime_text" || exit

echo 00444104: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042B380: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042B398: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044601A: C3                      | xxd -r - sublime_text
echo 00443D68: C3                      | xxd -r - sublime_text
Windows (tested)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "19A3AC1AA7A135A2C230C871EE9FCC5B" || exit

echo 0009E450: 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 000A020A: C3                      | xxd -r - sublime_text.exe
echo 0009E017: C3                      | xxd -r - sublime_text.exe

Sublime Merge (Stable Channel, Build 2091)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "C69155318089F0D37DA219759A29BBA3" || exit

echo 0002C8C1: 48 C7 C0 01 00 00 00 C3 | xxd -r - sublime_merge
echo 0002EEBC: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EEDB: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D81D: C3                      | xxd -r - sublime_merge
echo 0002C54C: C3                      | xxd -r - sublime_merge

echo 0151EF38: 20 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 01520DF4: 1F 20 03 D5             | xxd -r - sublime_merge
echo 01520E08: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0151FC6C: C0 03 5F D6             | xxd -r - sublime_merge
echo 0151EC70: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (tested)
cd /opt/sublime_merge || exit
md5sum -c <<< "4F1CF25B84FA66F5C24E7801FB652011  sublime_merge" || exit

echo 004E1752: 48 C7 C0 01 00 00 00 C3 | xxd -r - sublime_merge
echo 004E48DD: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E48F5: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E2FD6: C3                      | xxd -r - sublime_merge
echo 004E145C: C3                      | xxd -r - sublime_merge
Windows (tested)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "6330681B8EA4BFADCC1C1DE4E187251C" || exit

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

Sublime Merge (Dev Channel, Build 2090)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "9022E5B0147E11FF3746AA8EE7138632" || exit

echo 0002C88F: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002EEDC: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EEFB: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D83D: C3                      | xxd -r - sublime_merge
echo 0002C51A: C3                      | xxd -r - sublime_merge

echo 0151EF3C: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 01520E10: 1F 20 03 D5             | xxd -r - sublime_merge
echo 01520E24: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0151FC88: C0 03 5F D6             | xxd -r - sublime_merge
echo 0151EC74: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (tested)
cd /opt/sublime_merge || exit
md5sum -c <<< "2DAA23CEFADB55DE662B9E626B231C29  sublime_merge" || exit

echo 004E1714: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004E48C7: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E48DF: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E2FBC: C3                      | xxd -r - sublime_merge
echo 004E141E: C3                      | xxd -r - sublime_merge
Windows (tested)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "420CECC76BF4A1C477EE4B6DA3002810" || exit

echo 00025754: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 000288CF: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000288E8: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026F28: C3                      | xxd -r - sublime_merge.exe
echo 00025375: C3                      | xxd -r - sublime_merge.exe

@ask6483
Copy link

ask6483 commented Aug 30, 2023

@urxi Linux build 2091 patch works, thanks a lot.

@sparatan117
Copy link

@urxi 's Sublime Merge isn't working mac-arm64
md5 for 2091 is showing as "ED7304316B77276215C6FCC8793DD917"

@urxi
Copy link

urxi commented Aug 31, 2023

That's weird! I just downloaded it again, still got the C691...BBA3 version.

Have you tried downloading a fresh copy of the binary?

@sparatan117
Copy link

Fresh eyes on it - Downloaded a fresh copy.
MD5 checks out now and everything finished successfully.
Program runs but still unregistered

@urxi
Copy link

urxi commented Aug 31, 2023

You still have to enter some text as a license. Can be anything though, even a single space.

@sparatan117
Copy link

/facepalm that works - thanks!

@heavymagic
Copy link

It worked on Windows 11, thanks.
2023-09-01 22_44_22-Sublime Merge

@Bruskyer
Copy link

Bruskyer commented Sep 3, 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

@Bruskyer
Copy link

Bruskyer commented Sep 4, 2023

@Bruskyer Please try @urxi's patch https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=4675177#gistcomment-4675177

unfortunatelly doesn't work after I replaced all keys on hexit and saved/ app exe is loading but not working
pls anyone can explain how to run this command line in windows with xxd -r command package

cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "6330681B8EA4BFADCC1C1DE4E187251C" || exit

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

also I tried with vim editör but it didnt work

@maboloshi
Copy link
Author

maboloshi commented Sep 4, 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

@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)

@AxleUnix
Copy link

AxleUnix commented Nov 2, 2023

Sublime Merge (Dev Channel) Build 2092 (Win64)

:: Sublime Merge b2092 for Win64
cd /d ".\Sublime Merge" || exit
md5sum sublime_merge.exe | find /i "0b2e4149714cdce4de603cc4004d23ab" || exit
echo 00025800: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 00028971: 90 90 90 90 90 | xxd -r - sublime_merge.exe
echo 0002898A: 90 90 90 90 90 | xxd -r - sublime_merge.exe
echo 00026FC4: C3 | xxd -r - sublime_merge.exe
echo 00025421: C3 | xxd -r - sublime_merge.exe

@wangcl
Copy link

wangcl commented Nov 2, 2023

Sublime Merge (Dev Channel) Build 2092 (Win64)

:: Sublime Merge b2092 for Win64 cd /d ".\Sublime Merge" || exit md5sum sublime_merge.exe | find /i "0b2e4149714cdce4de603cc4004d23ab" || exit echo 00025800: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe echo 00028971: 90 90 90 90 90 | xxd -r - sublime_merge.exe echo 0002898A: 90 90 90 90 90 | xxd -r - sublime_merge.exe echo 00026FC4: C3 | xxd -r - sublime_merge.exe echo 00025421: C3 | xxd -r - sublime_merge.exe

works on win10 x64

@maboloshi
Copy link
Author

maboloshi commented Nov 8, 2023

Sublime Text Dev Channel, Build 4163 【Untested

Thanks to @urxi's patch:

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

echo 000A0F8C: 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 000A2DBE: C3                      | xxd -r - sublime_text.exe
echo 000A0B53: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "913712969127EA29DBF7F5BC4C2C7BD4  sublime_text" || exit

echo 00446394: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D560: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D578: 90 90 90 90 90          | xxd -r - sublime_text
echo 004482BE: C3                      | xxd -r - sublime_text
echo 00445FF8: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B1B22DE4873C7DEC6DF832C21F8F13A4" || exit

echo 000A5AA7: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C6F5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C70D: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A7015: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A56A2: C3                      | xxd -r - sublime_text

echo 0108A7FC: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 0101161C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011630: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BA7C: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A47C: C0 03 5F D6             | xxd -r - sublime_text

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

@wangcl
Copy link

wangcl commented Nov 8, 2023

Sublime Text (Dev Channel, Build 4164)

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

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

echo 000A0F8C: 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 000A2DBE: C3                      | xxd -r - sublime_text.exe
echo 000A0B53: C3                      | xxd -r - sublime_text.exe

works on win10 x64

@urxi
Copy link

urxi commented Nov 8, 2023

Here are my patches for all current builds:

Sublime Text (Stable Channel, Build 4152)

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

echo 0009F313: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 0009EF0E: C3                      | xxd -r - sublime_text

echo 01060C90: 00 00 80 D2 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

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested)
cd /opt/sublime_text || exit
md5sum -c <<< "7038C3B1CC79504602DA70599D4CCCE9  sublime_text" || exit

echo 00415013: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text
echo 00414C82: C3                      | xxd -r - sublime_text
Windows (tested)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "15BB398D5663B89A44372EF15F70A46F" || exit

echo 000A8D78: 48 C7 C0 00 00 00 00 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: C3                      | xxd -r - sublime_text.exe
echo 000A8945: C3                      | xxd -r - sublime_text.exe

Sublime Text (Dev Channel, Build 4164)

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

echo 000A5FF7: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000CC45: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000CC5D: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A7565: C3                      | xxd -r - sublime_text
echo 000A5BF2: C3                      | xxd -r - sublime_text

echo 01086D38: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 0100DB80: 1F 20 03 D5             | xxd -r - sublime_text
echo 0100DB94: 1F 20 03 D5             | xxd -r - sublime_text
echo 01087FB8: C0 03 5F D6             | xxd -r - sublime_text
echo 010869B8: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested, thanks @riccnico)
cd /opt/sublime_text || exit
md5sum -c <<< "88642E81A1CA0F040A7258EE56D7420D  sublime_text" || exit

echo 00446304: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D4D0: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D4E8: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044822E: C3                      | xxd -r - sublime_text
echo 00445F68: 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 "09450A504C9C29900D9FD226EA919390" || exit

echo 000A0F8C: 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 000A2DBE: C3                      | xxd -r - sublime_text.exe
echo 000A0B53: C3                      | xxd -r - sublime_text.exe

Sublime Merge (Stable Channel, Build 2091)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "C69155318089F0D37DA219759A29BBA3" || exit

echo 0002C8C1: 48 C7 C0 01 00 00 00 C3 | xxd -r - sublime_merge
echo 0002EEBC: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EEDB: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D81D: C3                      | xxd -r - sublime_merge
echo 0002C54C: C3                      | xxd -r - sublime_merge

echo 0151EF38: 20 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 01520DF4: 1F 20 03 D5             | xxd -r - sublime_merge
echo 01520E08: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0151FC6C: C0 03 5F D6             | xxd -r - sublime_merge
echo 0151EC70: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (tested)
cd /opt/sublime_merge || exit
md5sum -c <<< "4F1CF25B84FA66F5C24E7801FB652011  sublime_merge" || exit

echo 004E1752: 48 C7 C0 01 00 00 00 C3 | xxd -r - sublime_merge
echo 004E48DD: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E48F5: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E2FD6: C3                      | xxd -r - sublime_merge
echo 004E145C: C3                      | xxd -r - sublime_merge
Windows (tested)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "6330681B8EA4BFADCC1C1DE4E187251C" || exit

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

Sublime Merge (Dev Channel, Build 2092)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "FE04894E2C8DFFC0E7015D9C7EA7742E" || exit

echo 0002BE13: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002E458: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002E477: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CDB9: C3                      | xxd -r - sublime_merge
echo 0002BA9E: C3                      | xxd -r - sublime_merge

echo 0150E678: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 01510538: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0151054C: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0150F3B4: C0 03 5F D6             | xxd -r - sublime_merge
echo 0150E3B4: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (tested, thanks @riccnico)
cd /opt/sublime_merge || exit
md5sum -c <<< "AA6494BF85A17AA3BF5F2C9904832991  sublime_merge" || exit

echo 004E3EF2: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004E709F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E70B7: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004E5796: C3                      | xxd -r - sublime_merge
echo 004E3BFC: C3                      | xxd -r - sublime_merge
Windows (tested, thanks @wangcl)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "0B2E4149714CDCE4DE603CC4004D23AB" || exit

echo 00025800: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 00028971: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0002898A: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026FC4: C3                      | xxd -r - sublime_merge.exe
echo 00025421: C3                      | xxd -r - sublime_merge.exe

@wangcl
Copy link

wangcl commented Nov 9, 2023

@urxi
Sublime Merge b2092 works on win10 x64.

@riccnico
Copy link

@urxi
Sublime Text 4164 and Sublime Merge 2092 works on linux

@Bruskyer
Copy link

thanks working.

@maboloshi
Copy link
Author

maboloshi commented Nov 16, 2023

Sublime Text Dev Channel, Build 4165 【Untested

Thanks to @urxi's patch:

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

echo 000A0E9C: 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 000A2C56: C3                      | xxd -r - sublime_text.exe
echo 000A0A63: C3                      | xxd -r - sublime_text.exe
Linux ✅
cd /opt/sublime_text || exit
md5sum -c <<< "99B140A503A79E562700344E0AA07E4A  sublime_text" || exit

echo 00446824: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D9F0: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042DA08: 90 90 90 90 90          | xxd -r - sublime_text
echo 004486E4: C3                      | xxd -r - sublime_text
echo 00446488: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3B284CCCE3A434D99E582F1018AAF1CD" || exit

echo 000A5957: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C675: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C68D: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A6E9D: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A5552: C3                      | xxd -r - sublime_text

echo 0108A77C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 0101164C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011660: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108B9E8: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A3FC: C0 03 5F D6             | xxd -r - sublime_text

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

@riccnico
Copy link

@urxi @maboloshi
Sublime Text 4165 patch works on linux

@thepenguinthatwants
Copy link

Sublime Text Dev Channel, Build 4165 【Untested

Thanks to @urxi's patch:

Windows ✅
Linux ✅
macOS

Should it ask licenses when trying to change theme etc? Tested on linux and it gives ok after commands, but when trying out certain functions it's only for registered users?

@maboloshi
Copy link
Author

maboloshi commented Nov 20, 2023

Sublime Text Stable Channel, Build 4166 【Untested

Thanks to @urxi's patch:

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

echo 000A0D9C: 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 000A2BC0: C3                      | xxd -r - sublime_text.exe
echo 000A0963: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "3A316B30F5FCAABD9088C5A246F13496  sublime_text" || exit

echo 00446664: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D940: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D958: 90 90 90 90 90          | xxd -r - sublime_text
echo 00448518: C3                      | xxd -r - sublime_text
echo 004462C8: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "EF3ED80435218C9716B0E9BDA8447C86" || exit

echo 000A5AE3: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C835: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C84D: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A7031: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A56DE: C3                      | xxd -r - sublime_text

echo 0108A93C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 01011940: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011954: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BBB4: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A5BC: C0 03 5F D6             | xxd -r - sublime_text

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

@wangcl
Copy link

wangcl commented Nov 20, 2023

@theartefak
Copy link

theartefak commented Nov 20, 2023

@bms8197
Copy link

bms8197 commented Nov 20, 2023

@STSMHQ
Copy link

STSMHQ commented Nov 20, 2023

@maboloshi Thank you (one more time) for the ST 4166 patch.

@maboloshi
Copy link
Author

Sublime Text Dev Channel, Build 4167 【Untested

Thanks to @urxi's patch:

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

echo 000A0E9C: 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 000A2C74: C3                      | xxd -r - sublime_text.exe
echo 000A0A63: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "A496DD7AAEC5085874A5F0064196A21F  sublime_text" || exit

echo 00446824: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D9F0: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042DA08: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044873A: C3                      | xxd -r - sublime_text
echo 00446488: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "2C11A7A4E5B34CBADDAA5DC6D6501090" || exit

echo 000A59A7: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C6C5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C6DD: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A6EE9: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A55A2: C3                      | xxd -r - sublime_text

echo 0108A7E4: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010116B4: 1F 20 03 D5             | xxd -r - sublime_text
echo 010116C8: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BA5C: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A464: C0 03 5F D6             | xxd -r - sublime_text

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

@wangcl
Copy link

wangcl commented Nov 22, 2023

@maboloshi 4167 works on win10 x64

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

Sublime Text Dev Channel, Build 4168 【Untested

Thanks to @urxi's patch:

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

echo 000A0EBC: 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 000A2C74: C3                      | xxd -r - sublime_text.exe
echo 000A0A83: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "9200ABEE0026C64E875051DD6DA2E65B  sublime_text" || exit

echo 00446834: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042DA00: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042DA18: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044874E: C3                      | xxd -r - sublime_text
echo 00446498: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "A6A71D3677519F1A8209EC6F296D4E53" || exit

echo 000A59AF: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C6A5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C6BD: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A6EED: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A55AA: C3                      | xxd -r - sublime_text

echo 0108A800: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010116B8: 1F 20 03 D5             | xxd -r - sublime_text
echo 010116CC: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BA60: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A480: C0 03 5F D6             | xxd -r - sublime_text

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

@bithack3r
Copy link

Sublime Text Stable Channel, Build 4166 【Untested

Thanks to @urxi's patch:

Windows

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

echo 000A0D9C: 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 000A2BC0: C3                      | xxd -r - sublime_text.exe
echo 000A0963: C3                      | xxd -r - sublime_text.exe

Linux

cd /opt/sublime_text || exit
md5sum -c <<< "3A316B30F5FCAABD9088C5A246F13496  sublime_text" || exit

echo 00446664: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D940: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D958: 90 90 90 90 90          | xxd -r - sublime_text
echo 00448518: C3                      | xxd -r - sublime_text
echo 004462C8: C3                      | xxd -r - sublime_text

macOS

The Linux patch is not working for me in Kali and Ubuntu. What am I doing wrong? I copied the script and ran with sudo. It shows sublime_text: OK but the program is not patched. Still shows UNRREGISTERED.

@maboloshi
Copy link
Author

@bithack3r You may need to enter any characters as the registration code.

@wangcl
Copy link

wangcl commented Nov 23, 2023

4168 works on win10 x64

@bithack3r
Copy link

@bithack3r You may need to enter any characters as the registration code.

Thanks a lot. It worked on Ubuntu, Kali, Debian, and Fedora. Windows 10 works but 11 doesn't.

@monglung
Copy link

@bithack3r For windows 11, I use the following (the old way):

ST 4166:
echo 000A0D9C: 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 000A2BC0: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A0963: C3 | xxd -r - sublime_text.exe
echo 00000400: C3 | xxd -r - sublime_text.exe

ST 4168:
echo 000A0EBC: 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 000A2C74: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A0A83: C3 | xxd -r - sublime_text.exe
echo 00000400: C3 | xxd -r - sublime_text.exe

@Viterzgir
Copy link

Build 4169 is out

@maboloshi
Copy link
Author

maboloshi commented Nov 24, 2023

Sublime Text Stable Channel, Build 4169 【Untested

Thanks to @urxi's patch:

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

echo 000A0DBC: 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 000A2B52: C3                      | xxd -r - sublime_text.exe
echo 000A0983: C3                      | xxd -r - sublime_text.exe
Linux
cd /opt/sublime_text || exit
md5sum -c <<< "EA51D76D34A1EE908FD88CB8F0F351A6  sublime_text" || exit

echo 00446684: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D960: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D978: 90 90 90 90 90          | xxd -r - sublime_text
echo 004485AA: C3                      | xxd -r - sublime_text
echo 004462E8: C3                      | xxd -r - sublime_text
macOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3AEA5F094739BC66C5A6C11A4EA08B58" || exit

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

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

@Destitute-Streetdwelling-Guttersnipe
Copy link

@wangcl
Copy link

wangcl commented Nov 24, 2023

4169 works on win10 x64

@Viterzgir
Copy link

4169 linux works. Thanks

@bithack3r
Copy link

Sublime Text Stable Channel, Build 4169 【Untested

Thanks to @urxi's patch:

Windows
Linux
macOS

Works on Ubuntu 22.10, Debian 12, Kali2023, Fedora39, and Windows 10.

@bithack3r
Copy link

@bithack3r For windows 11, I use the following (the old way):

ST 4166: echo 000A0D9C: 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 000A2BC0: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe echo 000A0963: C3 | xxd -r - sublime_text.exe echo 00000400: C3 | xxd -r - sublime_text.exe

ST 4168: echo 000A0EBC: 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 000A2C74: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe echo 000A0A83: C3 | xxd -r - sublime_text.exe echo 00000400: C3 | xxd -r - sublime_text.exe

I get following error

PS C:\Program Files\Sublime Text> echo 000A0EBC: 48 31 C0 C3 | xxd -r - sublime_text.exe
xxd: The term 'xxd' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Suggestion [3,General]: The command "xxd" was not found, but does exist in the current location.
PowerShell does not load commands from the current location by default (see ''Get-Help about_Command_Precedence'').

If you trust this command, run the following command instead:

@rhcp011235
Copy link

@maboloshi
Copy link
Author

@bithack3r Please download xxd.exe yourself.

@monglung
Copy link

I don't understand... you successfully run the script in windows 10... but you have problem for windows 11?

@n6333373
Copy link

n6333373 commented Nov 25, 2023

So for Windows/Linux x64, I have created a Sublime Text 4 plugin which can patch itself.
Tested working on Sublime Text latest stable/dev build: 4168/4169

https://github.com/n6333373/warehouse/raw/main/SelfPatcher.zip

Quick Demo

dev.mp4
stable.mp4

@bithack3r
Copy link

I don't understand... you successfully run the script in windows 10... but you have problem for windows 11?

That's correct. Same script runs fine on Win10 and patches, but doesn't do anything on Win11.

@Destitute-Streetdwelling-Guttersnipe
Copy link

Destitute-Streetdwelling-Guttersnipe commented Nov 25, 2023 via email

@Destitute-Streetdwelling-Guttersnipe
Copy link

Destitute-Streetdwelling-Guttersnipe commented Nov 25, 2023 via email

@rhcp011235
Copy link

So for Windows x64, I have created a Sublime Text 4 plugin which can patch itself. Tested working on Sublime Text latest stable/dev build: 4168/4169

https://github.com/n6333373/warehouse/raw/main/SelfPatcher.zip

Quick Demo

dev.mp4

stable.mp4

Can you open source this? Because the PYD file I assume is the python compiled file with the actual magic in it. this should be able to work on all versions I assume?

@n6333373
Copy link

n6333373 commented Nov 25, 2023

You can make it run on all platforms. But you hide some code in a PYD file, so it can only run in Windows.

Technically the real issue I encountered is that Sublime Merge's patch on Linux x64 is not stable. It's sort of randomly patched to 0/1/281. Most likely 281 but sometimes it requires 0/1.


Just make it works on Linux x64 too. I think patch patterns for Linux x64 are stable since I've used them for months.

As for arm64 or mac-x64, unfortunately I don't have condition for testing them.

I wonder whether I should open source it since there seems to be no one open sourcing a fully automatic patcher here. I know there is a Python patcher skeleton you provided but people has to figure out what they should put in there.

@n6333373
Copy link

this should be able to work on all versions I assume?

Yes, for all Sublime Text 4 (likely future) releases.

@bithack3r
Copy link

@bithack3r If you read the error message again, you will see the suggestion: use .\xxd.exe instead of xxd Because Win11 uses PowerShell instead of cmd.exe, and PowerShell doesn't use programs in the current folder by default.

I'm sorry but I don't follow what you're saying. Is there a difference in the script? or do I move xxd file to somewhere else?

@bithack3r
Copy link

So for Windows/Linux x64, I have created a Sublime Text 4 plugin which can patch itself. Tested working on Sublime Text latest stable/dev build: 4168/4169

https://github.com/n6333373/warehouse/raw/main/SelfPatcher.zip

Quick Demo

dev.mp4
stable.mp4

I extracted the contents and copied the folder to C:\Users\User\AppData\Roaming\Sublime Text\Packages but it doesn't show up in the Help Menu after restarting the application.

@n6333373
Copy link

I extracted the contents and copied the folder to C:\Users\User\AppData\Roaming\Sublime Text\Packages but it doesn't show up in the Help Menu after restarting the application.

That looks like the correct place. Even if on a unsupported platform, it should show in the "Help Menu" but blacked out. Is there any error in Sublime Text console?

@bithack3r
Copy link

I extracted the contents and copied the folder to C:\Users\User\AppData\Roaming\Sublime Text\Packages but it doesn't show up in the Help Menu after restarting the application.

That looks like the correct place. Even if on a unsupported platform, it should show in the "Help Menu" but blacked out. Is there any error in Sublime Text console?

Fixed it by ensuring it's copied only in C:\Users\User\AppData\Roaming\Sublime Text\Packages. It also helped in patching the application in Windows11 (which I was struggling with the script).

@rhcp011235
Copy link

So for Windows/Linux x64, I have created a Sublime Text 4 plugin which can patch itself. Tested working on Sublime Text latest stable/dev build: 4168/4169

https://github.com/n6333373/warehouse/raw/main/SelfPatcher.zip

Quick Demo

Going to ask again. since it seems I was ignored.

@n6333373 Can you open source this, so we can make it work for linux/macOS?

Thank you

@Bruskyer
Copy link

Bruskyer commented Nov 27, 2023

@bithack3r If you read the error message again, you will see the suggestion: use .\xxd.exe instead of xxd Because Win11 uses PowerShell instead of cmd.exe, and PowerShell doesn't use programs in the current folder by default.
hello when I use it in windows 11
image
@Destitute-Streetdwelling-Guttersnipe

@HJSC00
Copy link

HJSC00 commented Nov 27, 2023

Sublime Text Stable Channel, Build 4169 【Untested

Thanks to @urxi's patch:

Windows
Linux
macOS

It didn't work for me on Ubuntu 22.04 LTS. The sublime_text doesn't open after the fixes.

@n6333373
Copy link

@rhcp011235

open source this

Not at this moment. But if you are interested in helping for either arm64 or Mac, I can add you into my private repository.
@maboloshi actually has access to it like years ago but maybe he just doesn't care.

@bms8197
Copy link

bms8197 commented Nov 27, 2023

Sublime Text Stable Channel, Build 4169 【Untested

Thanks to @urxi's patch:

Windows
Linux
macOS

I do confirm this works on MacOS Sonoma 14.1.1 on Apple Silicon CPU (M1).

Thank you!

@maboloshi
Copy link
Author

@rhcp011235

open source this

Not at this moment. But if you are interested in helping for either arm64 or Mac, I can add you into my private repository. @maboloshi actually has access to it like years ago but maybe he just doesn't care.

Actually, it is being used quietly.😊
My idea is to increase the threshold and limit the use to a small area. That's why I don't provide more detailed or simpler ways to use it and reduce abuse.

@rhcp011235
Copy link

@rhcp011235

open source this

Not at this moment. But if you are interested in helping for either arm64 or Mac, I can add you into my private repository. @maboloshi actually has access to it like years ago but maybe he just doesn't care.

Would love to help. https://github.com/rhcp011235 Is my user name

@Destitute-Streetdwelling-Guttersnipe

@Bruskyer @bithack3r Win 11 use PowerShell by default, but the patch of maboloshi should be run in "Command Prompt".
You can use the shortcut Ctrl+Shift+2 to open it, or click on the "down arrow" and select "Command Prompt".

image

hello when I use it in windows 11
image

@AbhJ
Copy link

AbhJ commented Dec 9, 2023

@sam2909
Copy link

sam2909 commented Dec 21, 2023

Work like a champ. Mac M1 Pro, Ventura

@Destitute-Streetdwelling-Guttersnipe
Copy link

I got a patcher in web browser that you can use to patch ST 4169 to allow the famous TwitterInc license
https://destitute-streetdwelling-guttersnipe.github.io/patcher-in-browser/#{"name":"sublime_text.exe_4169_TwitterInc_license","patches":["6687D8~~97~94~0D~00"]}

The web browser can't write to your application files. You have to manually overwrite it with the patched file.

This new patcher is much simpler than my previous one (which has many more functions)
https://destitute-streetdwelling-guttersnipe.github.io/RomPatcher.js/#{"PATCHER":[{"name":"sublime_text_4154","file":"data:;base64,VVBTMQAgboMAIG6D+pUXwPqVF8AybecD"}]}

@AbhJ
Copy link

AbhJ commented Jan 21, 2024

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=4771093#gistcomment-4771093 tested on MacBook Pro M3 Works perfectly Thanks man

Did you have to do anything to your mac with permissions, security, etc? I keep getting permission denied, even when I do "su ..."

Screenshot 2024-01-21 at 7 00 56 AM

enable this on your Mac and you're good to go

@Destitute-Streetdwelling-Guttersnipe
Copy link

I got a patcher in web browser that you can use to patch ST 4169 to allow the famous TwitterInc license https://destitute-streetdwelling-guttersnipe.github.io/patcher-in-browser/#{"name":"sublime_text.exe_4169_TwitterInc_license","patches":["6687D8~~97~94~0D~00"]}

The web browser can't write to your application files. You have to manually overwrite it with the patched file.

This new patcher is much simpler than my previous one (which has many more functions) https://destitute-streetdwelling-guttersnipe.github.io/RomPatcher.js/#{"PATCHER":[{"name":"sublime_text_4154","file":"data:;base64,VVBTMQAgboMAIG6D+pUXwPqVF8AybecD"}]}

I updated my patcher to support search & replace. This patch should work everywhere:
https://destitute-streetdwelling-guttersnipe.github.io/patcher-in-browser/#{"name":"sublime_text_4169_TwitterInc_license","patches":["97~94~0D~00=79"]}

Another tool can be used to patch is CyberChef which allow search & replace hex bytes:
https://gchq.github.io/CyberChef/#recipe=To_Hex('Colon',0)Find_/_Replace({'option':'Regex','string':'97:94:0D:00'},'79:94:0D:00',true,false,true,false)From_Hex('Auto')

@dawning7670
Copy link

Sublime Text Stable Channel, Build 4169 【Untested

Thanks to @urxi's patch:

Windows
Linux
macOS

cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3AEA5F094739BC66C5A6C11A4EA08B58" || exit

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

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

Tested on MacOS with M3 Pro, it works perfectly.

Thanks

@ezamelczyk
Copy link

I don't know what I'm doing wrong. Every command executes correctly but I still have unregistered app on m1 mac. @dawning7670 can you tell how exactly did you do it?

@dawning7670
Copy link

@ezamelczyk Remove Sublime Text 4 and try again. Here are my steps:

  1. Install sublime_text_build_4169_mac.zip
  2. Save patch script code to patch.sh
> cat patch.sh
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3AEA5F094739BC66C5A6C11A4EA08B58" || exit

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
  1. Run bash patch.sh
image

That's all.
image

@ezamelczyk
Copy link

idk man that's exactly what I did and it didn't work. checksum is correct and the signature is replaced and I still have an unregistered product.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

Currently, the rules for ST4170, 4171 have changed considerably and are basically obsolete.

The plugin SelfPatcher.sublime-package made by @n6333373 continues to work!

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi
Copy link
Author

@n6333373
Copy link

n6333373 commented Feb 24, 2024

@n6333373 What patterns do you use in SelfPatcher? Can you give a hint?

@Destitute-Streetdwelling-Guttersnipe I think I used bad1dea's patterns on Windows x32/x64 and leogx9r's patterns on Linux x64.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@n6333373 What patterns do you use in SelfPatcher? Can you give a hint?

@Destitute-Streetdwelling-Guttersnipe I think I used bad1dea's patterns on Windows x32/x64 and leogx9r's patterns on Linux x64.

@maboloshi that's a great screenshot. It show all the changes. What tool did you use for comparison?

@n6333373 Thank you. From the screenshot, I can see that you combine several patches from bad1dea, leogx9r and your own patches.

@maboloshi
Copy link
Author

@maboloshi that's a great screenshot. It show all the changes. What tool did you use for comparison?

@Destitute-Streetdwelling-Guttersnipe I use Beyond Compare for file comparison.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@n6333373
Copy link

n6333373 commented Mar 1, 2024

  • The 1st and last changes are only for the certificate. It's optional.

I was wondering which one is better

  • Remove the invalid certificate
  • Or keep the invalid certificate

@AxleUnix
Copy link

AxleUnix commented Mar 4, 2024

Sublime Text Dev Channel, Build 4173
Win x64

cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "b555dd9841329a56e1044931825a92b7" || exit
echo 0007F818: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00080F44: C3                      | xxd -r - sublime_text.exe
echo 0007F4B9: C3                      | xxd -r - sublime_text.exe

Sublime Text Dev Channel, Build 4173
Linux

#!/bin/bash

# for Linux
cd /opt/sublime_text || exit
md5sum -c <<< "CFAA168CF236D9F4AE5586BBB42A0DFC  sublime_text" || exit
echo 0044D836: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0043765B: 90 90 90 90 90          | xxd -r - sublime_text
echo 00437673: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044F5AE: C3                      | xxd -r - sublime_text
echo 0044D4FA: C3                      | xxd -r - sublime_text

@jomifepe
Copy link

jomifepe commented Mar 7, 2024

@urxi macOS is not working in either stable or dev on an M1 with Sonoma.

@bad1dea
Copy link

bad1dea commented Mar 12, 2024

Was wondering why I was getting so many weird notifications, did 4173 change that much - I can take a look at the windows and linux (x64) versions if there's an issue, ping me if there is and I can update accordingly.

@STSMHQ
Copy link

STSMHQ commented Apr 16, 2024

@AxleUnix Thank you very much for the Win64 Patch.

@HassanMirza01
Copy link

Sublime merge 2095 ?

@Fidenciano
Copy link

Please anyone has for Sublime merge 2096 linux?

@urxi
Copy link

urxi commented Apr 26, 2024

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "F18216115A7A3CBFEFC5AF58AF87E0B1" || exit

echo 0002ADDD: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAEE: C3                      | xxd -r - sublime_merge

echo 013D7C3C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D9784: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D9798: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88AC: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D79C0: C0 03 5F D6             | xxd -r - sublime_merge

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

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "E4136CD1C8179FCC6E7B76C5F006513E" || exit

echo 0002ADE9: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAFA: C3                      | xxd -r - sublime_merge

echo 013D7CBC: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D97B8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D97CC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88E0: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D7A40: C0 03 5F D6             | xxd -r - sublime_merge

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

@urxi
Copy link

urxi commented Apr 26, 2024

Sublime Text (Stable Channel, Build 4169)

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

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: C3                      | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

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

Sublime Text (Dev Channel, Build 4173)

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

echo 000D5E63: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0004797F: 90 90 90 90 90          | xxd -r - sublime_text
echo 00047997: 90 90 90 90 90          | xxd -r - sublime_text
echo 000D724D: C3                      | xxd -r - sublime_text
echo 000D5AE4: C3                      | xxd -r - sublime_text

echo 00FF5468: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00F86838: 1F 20 03 D5             | xxd -r - sublime_text
echo 00F8684C: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FF65DC: C0 03 5F D6             | xxd -r - sublime_text
echo 00FF512C: C0 03 5F D6             | xxd -r - sublime_text

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

@HassanMirza01
Copy link

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)

can share patcher for mac? i have Linux, will try to adapt it for linux

@urxi
Copy link

urxi commented Apr 26, 2024

I don't have a patcher, it's just my brain and a decompiler ;-)

@HassanMirza01
Copy link

I don't have a patcher, it's just my brain and a decompiler ;-)

well, i'd request to do little tutorial then? or write steps? i tried hexed.it and offline hex editor but dont know why its hard to search for some patches whcih actually work, but are not showing in my search on hexed.it, i tried big endian, small endian, all possibilities, there are many many matches but i can't understand the tag on left of colon here ( 000D5E63: 48 C7 C0 00 00 00 00 C3 )

@Destitute-Streetdwelling-Guttersnipe
Copy link

@HassanMirza01
Copy link

@HassanMirza01 There's a patcher by @maboloshi at the beginning of this gist. There's also a link to the guide by @leogx9r at https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200

really appreciated this link, now i can patch any binary too, tbh, it was straight forward thing, replace given line and hex value at first tag/point with that value given next haha, appreciated <3

@wtask
Copy link

wtask commented Apr 26, 2024

Python patcher by @maboloshi is little bit outdated under Windows for SM 2096 :(

> python .\crack_st_sm.py .\sublime_merge.exe
[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, Win64, Stable Channel, Build 2096
    MD5 Checksum -> B4E6827719B1B2FB7E3F6744DCDF0286

[!] No pattern found for "isValidLicense" ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x1FC3E ...
[*] Rewrite data 'E8 5D 0A 1F 00' -> '90 90 90 90 90' ...


[>] Found pattern for "validationFunction" at 0x1FC57 ...
[*] Rewrite data 'E8 44 0A 1F 00' -> '90 90 90 90 90' ...


[!] No pattern found for "serverThread" ...

[!] No pattern found for "licenseNotifyThread" ...

[!] No pattern found for "licenseNotifyThread for 2082" ...

[!] No pattern found for "licenseNotifyThread for 2091" ...

@HassanMirza01
Copy link

Python patcher by @maboloshi is little bit outdated under Windows for SM 2096 :(

> python .\crack_st_sm.py .\sublime_merge.exe
[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, Win64, Stable Channel, Build 2096
    MD5 Checksum -> B4E6827719B1B2FB7E3F6744DCDF0286

[!] No pattern found for "isValidLicense" ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x1FC3E ...
[*] Rewrite data 'E8 5D 0A 1F 00' -> '90 90 90 90 90' ...


[>] Found pattern for "validationFunction" at 0x1FC57 ...
[*] Rewrite data 'E8 44 0A 1F 00' -> '90 90 90 90 90' ...


[!] No pattern found for "serverThread" ...

[!] No pattern found for "licenseNotifyThread" ...

[!] No pattern found for "licenseNotifyThread for 2082" ...

[!] No pattern found for "licenseNotifyThread for 2091" ...

same on linux 2096, need to find hooks again

@EchoEngineer77
Copy link

EchoEngineer77 commented Apr 27, 2024

Sublime Merge Linux AMD64 Build 2096

cd /opt/sublime_merge || exit
md5sum -c <<< "afcbef3317f68eb631418474dfce4497  sublime_merge" || exit

echo 004A421C: 48 31 C0 C3 90 90 90 90 90 90 90 90 90 90 90 90 90 | xxd -r - sublime_merge
echo 004A6D9C: 90 90 90 90 90                                     | xxd -r - sublime_merge
echo 004A6DB5: 90 90 90 90 90                                     | xxd -r - sublime_merge
echo 004A5892: C3                                                 | xxd -r - sublime_merge
echo 004A3F86: C3                                                 | xxd -r - sublime_merge

@urxi
Copy link

urxi commented Apr 27, 2024

@EchoEngineer77: I'm not sure the last two offsets are correct -- I found other values.

Here are my patches for all current builds. Please let me know if the untested ones work or not.

Sublime Text (Stable Channel, Build 4169)

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

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: C3                      | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested, thanks @leagueofperez)
cd /opt/sublime_text || exit
md5sum -c <<< "EA51D76D34A1EE908FD88CB8F0F351A6  sublime_text" || exit

echo 00446684: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D960: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D978: 90 90 90 90 90          | xxd -r - sublime_text
echo 004485AA: C3                      | xxd -r - sublime_text
echo 004462E8: C3                      | xxd -r - sublime_text
Windows (tested, thanks @leagueofperez)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "5B3C8CEA0FCA4323F0E8A994209042A8" || exit

echo 000A0DBC: 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 000A2B52: C3                      | xxd -r - sublime_text.exe
echo 000A0983: C3                      | xxd -r - sublime_text.exe

Sublime Text (Dev Channel, Build 4173)

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

echo 000D5E63: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0004797F: 90 90 90 90 90          | xxd -r - sublime_text
echo 00047997: 90 90 90 90 90          | xxd -r - sublime_text
echo 000D724D: C3                      | xxd -r - sublime_text
echo 000D5AE4: C3                      | xxd -r - sublime_text

echo 00FF5468: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00F86838: 1F 20 03 D5             | xxd -r - sublime_text
echo 00F8684C: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FF65DC: C0 03 5F D6             | xxd -r - sublime_text
echo 00FF512C: 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 <<< "CFAA168CF236D9F4AE5586BBB42A0DFC  sublime_text" || exit

echo 0044D836: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0043765B: 90 90 90 90 90          | xxd -r - sublime_text
echo 00437673: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044F5AE: C3                      | xxd -r - sublime_text
echo 0044D4FA: C3                      | xxd -r - sublime_text
Windows (untested)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "B555DD9841329A56E1044931825A92B7" || exit

echo 0007F818: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00080F44: C3                      | xxd -r - sublime_text.exe
echo 0007F4B9: C3                      | xxd -r - sublime_text.exe

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "F18216115A7A3CBFEFC5AF58AF87E0B1" || exit

echo 0002ADDD: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAEE: C3                      | xxd -r - sublime_merge

echo 013D7C3C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D9784: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D9798: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88AC: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D79C0: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (tested, thanks @leagueofperez)
cd /opt/sublime_merge || exit
md5sum -c <<< "AFCBEF3317F68EB631418474DFCE4497  sublime_merge" || exit

echo 004A421C: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge
echo 004A6D9C: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A6DB5: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A5892: C3                      | xxd -r - sublime_merge
echo 004A3F86: C3                      | xxd -r - sublime_merge
Windows (tested, thanks @wtask & @leagueofperez)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "B4E6827719B1B2FB7E3F6744DCDF0286" || exit

echo 0001d6b4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge.exe
echo 0001fc3e: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001fc57: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001e77d: C3                      | xxd -r - sublime_merge.exe
echo 0001d3af: C3                      | xxd -r - sublime_merge.exe

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "E4136CD1C8179FCC6E7B76C5F006513E" || exit

echo 0002ADE9: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAFA: C3                      | xxd -r - sublime_merge

echo 013D7CBC: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D97B8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D97CC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88E0: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D7A40: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (untested)
cd /opt/sublime_merge || exit
md5sum -c <<< "DD9C39264E7ADD0CF05D0A36725222B2  sublime_merge" || exit

echo 004A41B8: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004A6DCA: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A6DE3: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A58BE: C3                      | xxd -r - sublime_merge
echo 004A3F22: C3                      | xxd -r - sublime_merge
Windows (tested, thanks @StarLeet)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "71C74D6B6603246705F947A4F52FFCF6" || exit

echo 0001D6B0: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 0001FC2C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001FC45: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001E76D: C3                      | xxd -r - sublime_merge.exe
echo 0001D3AB: C3                      | xxd -r - sublime_merge.exe

@wtask
Copy link

wtask commented Apr 27, 2024

@urxi Thank you. SM 2096, Windows patch works.

@HassanMirza01
Copy link

@urxi for me @EchoEngineer77's patch worked fine on SM 2096

@StarLeet
Copy link

@EchoEngineer77: I'm not sure the last two offsets are correct -- I found other values.

Here are my patches for all current builds. Please let me know if the untested ones work or not.

Sublime Text (Stable Channel, Build 4169)

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

Sublime Text (Dev Channel, Build 4173)

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

Sublime Merge (Stable Channel, Build 2096)

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

Sublime Merge (Dev Channel, Build 2095)

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

cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "71C74D6B6603246705F947A4F52FFCF6" || exit

echo 0001D6B0: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 0001FC2C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001FC45: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001E76D: C3                      | xxd -r - sublime_merge.exe
echo 0001D3AB: C3                      | xxd -r - sublime_merge.exe

SM2095 works on win10

@leagueofperez
Copy link

leagueofperez commented Apr 27, 2024

@EchoEngineer77: I'm not sure the last two offsets are correct -- I found other values.

Here are my patches for all current builds. Please let me know if the untested ones work or not.

Sublime Text (Stable Channel, Build 4169)

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

Sublime Text (Dev Channel, Build 4173)

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

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
Linux (untested)
Windows (tested, thanks @wtask)

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
Linux (untested)
Windows (tested, thanks @StarLeet)

Tested and working:

  • Windows:
    • Sublime Text 4169
    • Sublime Merge 2096
  • Linux:
    • Sublime Text 4169
    • Sublime Merge 2096

@Destitute-Streetdwelling-Guttersnipe
Copy link

@AxleUnix
Copy link

AxleUnix commented May 1, 2024

Sublime Text (Dev Channel, Build 4174)

@echo off
:: for Win64, ST4B4174

cd /d ".\Sublime Text" || exit
md5sum sublime_text.exe | find /i "3de7ca7a5f5ffc48e4ab8d2d8cc23f20" || exit

echo 0007F9A4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 0007F645: C3                      | xxd -r - sublime_text.exe
echo 000810BA: C3                      | xxd -r - sublime_text.exe

Sublime Text (Dev Channel, Build 4174)

# for Linux64, ST4B4174
md5sum -c <<< "885bfa13309dfaf31dfe5fbbb8ab6d47  sublime_text" || exit

echo 00449984: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0043373B: 90 90 90 90 90          | xxd -r - sublime_text
echo 00433753: 90 90 90 90 90          | xxd -r - sublime_text
echo 00449648: C3                      | xxd -r - sublime_text
echo 0044B6F6: C3                      | xxd -r - sublime_text

@StarLeet
Copy link

StarLeet commented May 1, 2024

Sublime Text (Dev Channel, Build 4174)

@echo off
:: for Win64, ST4B4174

cd /d ".\Sublime Text" || exit
md5sum sublime_text.exe | find /i "3de7ca7a5f5ffc48e4ab8d2d8cc23f20" || exit

echo 0007F9A4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 0007F645: C3                      | xxd -r - sublime_text.exe
echo 000810BA: C3                      | xxd -r - sublime_text.exe

works on win10

@AxleUnix
Copy link

AxleUnix commented May 1, 2024

works on win10
Of course, otherwise I wouldn't be posting this.

@urxi
Copy link

urxi commented May 3, 2024

Here's the patch for the macOS version of ST 4174. Thanks to @Destitute-Streetdwelling-Guttersnipe for the B8 trick!

Clever tricks to improve the ARM64 part are also welcome :)

cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "99F7F9C8FE8AF673697189D456CC3287" || exit

echo 0004793F: B8 | xxd -r - sublime_text
echo 00047957: B8 | xxd -r - sublime_text
echo 000D5A30: C3 | xxd -r - sublime_text
echo 000D5DAF: C3 | xxd -r - sublime_text
echo 000D7199: C3 | xxd -r - sublime_text

echo 00F85AD8: 1F 20 03 D5             | xxd -r - sublime_text
echo 00F85AEC: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FF43C0: C0 03 5F D6             | xxd -r - sublime_text
echo 00FF46FC: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00FF5870: C0 03 5F D6             | xxd -r - sublime_text

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

@Destitute-Streetdwelling-Guttersnipe
Copy link

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