Skip to content

Instantly share code, notes, and snippets.

@maboloshi
Last active April 16, 2024 17:43
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 ------
@leogx9r
Copy link

leogx9r commented Jul 4, 2021

@backermanbd If you want your name shown so badly in the registration window, you'll need to reverse-engineer it yourself and locate the relevant code segment. I'll outright tell you, the RSA function that you're looking for is inlined within the license validity function in the Linux binaries -- the same patch won't work since there's no separate function for it unlike Windows, you'll need different assembly to patch it after identifying which code is responsible for it. I won't put the work in to figure out the way around that since it's utterly pointless for anyone who just wants the thing registered so that'll be up to you to figure out.


Sublime Merge v2057 Crack

Literally the same patterns work as before. As usual, the same methods do as well. Here are the offsets from my auto-patcher:

Linux

image

Windows

image

MacOS

image

If you looked carefully, you'd see I added two additional things, disabling the crash reporter (which sends telemetry back to the server, not something I personally like) and also disabled the "phoning home" method when a new license is entered. The phoning home method can potentially be used to detect you cracking the application (as it'll send invalid info, also containing your unique identifier) and you may get your IP blacklisted, hence I've decided to disable it entirely, I also recommend you guys do too, just in case. If you'd like the patterns for that:

# Sends the HWID, license Information the moment a license is entered to the server for logging.
# Most likely used to detect when a license key is shared across too many systems with differing HWIDs.
# Simply return 0 here to disable.
Sublime Text
    Windows x64 Pattern: `raw sig: 55 56 57 48 81 EC ? ? ? ? 48 8D AC 24 ? ? ? ? 0F 29 B5 ? ? ? ? 48 C7 85 ? ? ? ? ? ? ? ? 48 89 CF`
    Linux x64   Pattern: `raw sig: 41 56 53 48 81 EC ? ? ? ? 48 89 FB BF ? ? ? ? E8 ? ? ? ? 4C 8D B4 24 ? ? ? ?`
    MacOS x64   Pattern: `raw sig: 55 48 89 E5 53 48 81 EC ? ? ? ? 48 89 FB 48 8B 05 ? ? ? ? 48 8B 00 48 89 45 F0 48 8D 3D ? ? ? ?`

Sublime Merge
    Windows x64 Pattern: `raw sig: 55 56 57 48 81 EC ? ? ? ? 48 8D AC 24 ? ? ? ? 0F 29 B5 ? ? ? ?`
    Linux x64   Pattern: `raw sig: 41 56 53 48 81 EC ? ? ? ? 48 89 FB BF ? ? ? ?`
    MacOS x64   Pattern: `raw sig: 55 48 89 E5 53 48 81 EC ? ? ? ? 48 89 FB 48 8B 05 ? ? ? ? 48 8B 00 48 89 45 F0 48 8D 3D ? ? ? ?`

Proof

image
image
image
image

@maboloshi
Copy link
Author

@leogx9r Thank you! Can you complement the patterns for "Disabled crash reporter"?

@Bruskyer
Copy link

Bruskyer commented Jul 5, 2021

any news about ST4 build 4110?

@leogx9r
Copy link

leogx9r commented Jul 5, 2021

@maboloshi Sure, here ya go:

Sublime Text
    Windows x64 Pattern: `raw sig: 41 57 41 56 41 55 41 54 56 57 55 53 B8 ? ? ? ? E8 ? ? ? ? 48 29 C4 8A 84 24 ? ? ? ?`
    Linux x64   Pattern: `raw sig: 55 41 57 41 56 41 55 41 54 53 48 81 EC ? ? ? ? 41 89 D4 48 89 FD`
    MacOS x64   Pattern: `raw sig: 55 48 89 E5 41 57 41 56 41 55 41 54 53 48 81 EC ? ? ? ? 41 89 CE 49 89 F7`

Sublime Merge
    Windows x64 Pattern: `raw sig: 41 57 41 56 41 55 41 54 56 57 55 53 B8 ? ? ? ? E8 ? ? ? ? 48 29 C4 8A 84 24 ? ? ? ?`
    Linux x64   Pattern: `raw sig: 55 41 57 41 56 41 55 41 54 53 48 81 EC ? ? ? ? 41 89 D4 48 89 FD`
    MacOS x64   Pattern: `raw sig: 55 48 89 E5 41 57 41 56 41 55 41 54 53 48 81 EC ? ? ? ? 41 89 CE 49 89 F7`

I just write a ret instruction to disable it.


@Bruskyer It was released < 12 hours ago, I doubt you'd get news that soon :P

Here's v4110 offsets (patterns are the same):

Linux

image

MacOS

image

Windows

image

image

@Bruskyer
Copy link

Bruskyer commented Jul 6, 2021

Thank you

@Bruskyer
Copy link

Bruskyer commented Jul 6, 2021

After I have applied the same keys on explained offset only accepted the license key that needs upgrade

—– BEGIN LICENSE —–
Die Socialisten GmbH
10 User License
EA7E-800613
51311422 E45F49ED 3F0ADE0C E5B8A508
2F4D9B65 64E1E244 EDA11F0E F9D06110
B7B2E826 E6FDAA72 2C653693 5D80582F
09DCFFB5 113A940C 5045C0CD 5F8332F8
34356CC6 D96F6FDB 4DEC20EA 0A24D83A
2C82C329 E3290B29 A16109A7 EC198EB9
F28EBB17 9C07403F D44BA75A C23C6874
EBF11238 5546C3DD 737DC616 445C2941
—— END LICENSE ——

@maboloshi
Copy link
Author

@Bruskyer If the crack is successful, any string is allowed. What version and platform are you using?

@Bruskyer
Copy link

Bruskyer commented Jul 6, 2021

ST 4 Build4110 on win 10 x64
image
when insert any text/key to register input
image
there wasnt 0x00007143 offset I replaced the value on 0x00007140

@leogx9r
Copy link

leogx9r commented Jul 6, 2021

@Bruskyer Then you did it wrong which is why it isn't working.

1.) You cannot just replace a completely different offset in the file and expect it to work.

2.) What do you mean the offset 0x7143 doesn't exist? It clearly does:

image

Use the batch script maboloshi made for Windows instead of attempting to patch it yourself and it will work just fine.

@Bruskyer
Copy link

Bruskyer commented Jul 7, 2021

Sorry for previous post, I realized a mistake during changing the values, Now everything works perfect
Thanks to @leogx9r and @maboloshi

@Bruskyer
Copy link

Bruskyer commented Jul 12, 2021

ST 4 Build 4111 released 🚀

@leogx9r
Copy link

leogx9r commented Jul 12, 2021

Sublime Text v4111 Crack

Patterns are the same as before, as is the method for cracking. Offsets follow from my script:

Linux

image

Windows

image

MacOS

image

Proof

image

@Bruskyer
Copy link

Bruskyer commented Jul 13, 2021

Sublime Text v4111 Crack

...

👌 Thanks

@leogx9r
Copy link

leogx9r commented Jul 13, 2021

@Bruskyer please don't quote the entire message, makes this thread really long and difficult to read.


Sublime Text v4112 Crack

Minor update, nothing too special. Offsets follow:

Linux

image

Windows

image

MacOS

image

Proof

image

In the future I may write a script to generate all these offsets for easily pasting on here afterwards.

Copy link

ghost commented Jul 13, 2021

how can we get sublime patcher ?

@rahitashpaul
Copy link

rahitashpaul commented Jul 14, 2021

Sublime Text v4111 Crack

...

sir, what is this software for cracking....

@Bruskyer
Copy link

@Bruskyer please don't quote the entire message, makes this thread really long and difficult to read.
@leogx9r 🆗

@Bruskyer
Copy link

Bruskyer commented Jul 14, 2021

finally 4113 released on commercial(stable) channel 🚀

@leogx9r
Copy link

leogx9r commented Jul 14, 2021

@udwick, @rahitashpaul I'm keeping it to myself. I've already provided all the information required to build your own patcher from this and this comment, with additional resources provided here. That's basically all you need to do it, it really isn't hard to figure out and I don't like spoonfeeding people the direct answers.


Sublime Text v4113 Crack

Windows patterns have changed again for the Invalidation/Validation methods. First pattern was only changed by a single byte (48 -> 49). Second one contains the raw address without displacement by 6 unlike before. Aka, NOP the first E8 XX XX XX XX after finding the second pattern. Here are the new patterns:

    Windows x64 Pattern 1: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? 49 8B 96 ? ? ? ?`
                Pattern 2: `raw sig: E8 ? ? ? ? E8 ? ? ? ? 4C 89 F1 E8 ? ? ? ?`

Aside from that, everything else is the same.

MacOS

image

Windows

image

Linux

image

Proof

image

@Ingarsy
Copy link

Ingarsy commented Jul 21, 2021

@leogx9r sublime merge 2058 just released and the patterns seem to have changed, any help?

@leogx9r
Copy link

leogx9r commented Jul 21, 2021

Sublime Merge v2058 Crack

Seems the patterns for isValidLicense have changed in v2058 in addition to the method required for patching the function. Thanks @Ingarsy for informing me. The new patterns for that are as follows:

    Windows x64 Pattern: `direct reference sig: E8 ? ? ? ? 49 8B 8E ? ? ? ? 83 F8 01`
    Linux   x64 Pattern: `direct reference sig: E8 ? ? ? ? 83 F8 01 75 12`
    MacOS   x64 Pattern: `direct reference sig: E8 ? ? ? ? 83 F8 01 75 14`

The above patterns reference the instruction call isValidLicense with no displacement, jump to isValidLicense and patch it. Before, you needed to patch the isValidLicense function to return 281 however now, you need to return 1. You can do this easily by doing something like xor rax, rax; inc rax; ret which translates to the sequence 48 31 C0 48 FF C0 C3 which is how I did it in my patcher. All other patterns (validation/invalidation, server thread, crash reporter and license logging thread) remain the same, for the record as do the previous methods for patching those.

Offsets for the updated version follow:

Windows

image

Linux

image

MacOS

image

Proof

image
image
image

@Bruskyer
Copy link

@leogx9r thanks for merge 2058

@Ingarsy
Copy link

Ingarsy commented Jul 23, 2021

@leogx9r Well this is awkward 😄 2059 just released and the init license check pattern is still the same with a different offset i think, but as for everything else we got bamboozled

@maboloshi
Copy link
Author

@Ingarsy merge crack 2059 has been updated

@leogx9r
Copy link

leogx9r commented Jul 23, 2021

They gotta be trolling now. As maboloshi already found out, the patterns have reverted as well as the method to patch it. For whatever reason they decided to change 1 as the valid value back to 281 as it was before. I'm curious whether subsequent dev builds will use the "new" method or they'll keep to the old method.

Regardless, the offsets maboloshi updated match mine as well so it'll work for all OSs.

@x-one
Copy link

x-one commented Jul 26, 2021

@leogx9r can you point me how to read RVA offset using python without IDA?

@maboloshi
Copy link
Author

maboloshi commented Jul 26, 2021

@leogx9r can you point me how to read RVA offset using python without IDA?

For example:SM 2059 for mac

About "License Validity Checking":

Use "E8 ? ? ? ? 3D ? ? ? ? 75 14" pattern, Position to offset:
0x290EC-->Read The next 4 bytes: CA D0 FF FF -->Byte Flip: FF FF D0 CA -->Complementary offset: 0xFFFFD0CA
hex(0x290EC + 0x5 + 0xFFFFD0CA - 0x100000000) --> Target offset: 0x261BB

Other patterns are basically a direct binary search. Individual patterns may need to be shifted by a few bytes

@x-one
Copy link

x-one commented Jul 26, 2021

Ah!... So easy.. thank you @maboloshi :)

@leogx9r
Copy link

leogx9r commented Jul 26, 2021

Here's a C&P Python method that I'm using for ya:

# Converts 4 byte chunk of a bytearray() into a 32-bit Little-Endian encoded integer.
def LE32(value):
    return value[3] << 24 | value[2] << 16 | value[1] <<  8 | value[0]

# Calculates an absolute offset from a relative virtual address using a base offset and instruction length.
def RVA2ABS(base, rva, instruction_len):
    return ((base + instruction_len) + rva) & 0xFFFFFFFF

How I've used it:

       offset = pattern.locate(self.binary)

       # Check validity of pattern
       ...

       # Add any displacement required by the pattern
       offset += pattern.displacement()

        # Calculate the absolute offset from an RVA instruction if required.
        if self.rva:
            # The RVA value is stored after the first byte relative to the found offset as a 4-byte LE integer.
            rva = LE32(self.binary[offset + 1: offset + 5]) # Reverse byte order due to CPU encoding
            offset_abs = RVA2ABS(offset, rva, 5)            # Get true offset from referenced pointer
            print("[*] Found RVA pattern for \"{:s}\" at 0x{:X} -> 0x{:X} -> 0x{:X} ..." \
                .format(self.name, offset, rva, offset_abs)) if log else None
            return offset_abs

        # Not an RVA so no additional calculations required
        return offset

The instruction length is always 5 bytes here because the patterns that I use reference a CALL instruction which are 5 bytes long.

@x-one
Copy link

x-one commented Jul 28, 2021

@leogx9r thank You very much for examples.
Seems to be working.. I need bring together boxes and I'll have it. 😎

@lowendgamer
Copy link

How to crack it for Linux?

Any commands like this:
cd /opt/sublime_text
sudo sed -i 's/\x97\x94\x0D/\x00\x00\x00/' sublime_text

@lowendgamer
Copy link

sudo sed -i 's/\x55\x41\x57\x41/\x48\x31\xC0\xC3\x0/' sublime_text

sudo sed -i 's/\xE8\xAC\x82\x18\x00/\x90\x90\x90\x90\x90/' sublime_text

sudo sed -i 's/\xE8\x91\x82\x18\x00/\x90\x90\x90\x90\x90/' sublime_text

sudo sed -i 's/\x55\x41\x56\x53\x41\x89\xF6/\x48\x31\xC0\x48\xFF\xC0\xC3/' sublime_text

sudo sed -i 's/\x41/\xC3/' sublime_text

sudo sed -i 's/\x55/\xC3/' sublime_text

I tried this, but now Sublime won't open at all.

@leogx9r
Copy link

leogx9r commented Aug 2, 2021

@lowendgamer You seem to have no clue what that sed command does. It replaces all occurrences in the file with a predefined sequence. Because you attempted to replace \x41 and \x55, both function prologues that are present in MULTIPLE functions unrelated to just license verification, you essentially corrupted the executable. Why not use the bash script maboloshi made for Linux? It works and if you're using Linux, you should already have printf and dd.

Literally enter this in a terminal for v4113 and it will work:

printf '\x48\x31\xC0\xC3'                 | dd of=sublime_text bs=1 seek=$((0x0036567C)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x0035BCCB)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x0035BCE6)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_text bs=1 seek=$((0x00367171)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x003653CE)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x0034F5F0)) conv=notrunc

@update-freak
Copy link

Here's a C&P Python method that I'm using for ya:

# Converts 4 byte chunk of a bytearray() into a 32-bit Little-Endian encoded integer.
def LE32(value):
    return value[3] << 24 | value[2] << 16 | value[1] <<  8 | value[0]

# Calculates an absolute offset from a relative virtual address using a base offset and instruction length.
def RVA2ABS(base, rva, instruction_len):
    return ((base + instruction_len) + rva) & 0xFFFFFFFF

How I've used it:

       offset = pattern.locate(self.binary)

       # Check validity of pattern
       ...

       # Add any displacement required by the pattern
       offset += pattern.displacement()

        # Calculate the absolute offset from an RVA instruction if required.
        if self.rva:
            # The RVA value is stored after the first byte relative to the found offset as a 4-byte LE integer.
            rva = LE32(self.binary[offset + 1: offset + 5]) # Reverse byte order due to CPU encoding
            offset_abs = RVA2ABS(offset, rva, 5)            # Get true offset from referenced pointer
            print("[*] Found RVA pattern for \"{:s}\" at 0x{:X} -> 0x{:X} -> 0x{:X} ..." \
                .format(self.name, offset, rva, offset_abs)) if log else None
            return offset_abs

        # Not an RVA so no additional calculations required
        return offset

The instruction length is always 5 bytes here because the patterns that I use reference a CALL instruction which are 5 bytes long.

How to use this python code?

@lowendgamer
Copy link

@leogx9r
How do i enter that in terminal? How to make linux mint bash script?

Screenshot
failed to open sublime text: Permission denied

@lowendgamer
Copy link

Yeah true idk what sudo sed -i is

I just copy and paste actually

@maboloshi
Copy link
Author

@lowendgamer

cd /opt/sublime_text || exit
printf '\x48\x31\xC0\xC3'                 | sudo dd of=sublime_text bs=1 seek=$((0x0036567C)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | sudo dd of=sublime_text bs=1 seek=$((0x0035BCCB)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | sudo dd of=sublime_text bs=1 seek=$((0x0035BCE6)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | sudo dd of=sublime_text bs=1 seek=$((0x00367171)) conv=notrunc
printf '\xC3'                             | sudo dd of=sublime_text bs=1 seek=$((0x003653CE)) conv=notrunc
printf '\xC3'                             | sudo dd of=sublime_text bs=1 seek=$((0x0034F5F0)) conv=notrunc

@lowendgamer
Copy link

@maboloshi

Thanks it finally worked! Sorry for all the trouble.

@alichraghi
Copy link

thank you

@secretiveolwagner
Copy link

@maboloshi I can confirm the method is working for Sublime Text version 4113 on macOS Big Sur 11.4

@basitcodeenv
Copy link

@lowendgamer

cd /opt/sublime_text || exit
printf '\x48\x31\xC0\xC3'                 | sudo dd of=sublime_text bs=1 seek=$((0x0036567C)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | sudo dd of=sublime_text bs=1 seek=$((0x0035BCCB)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | sudo dd of=sublime_text bs=1 seek=$((0x0035BCE6)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | sudo dd of=sublime_text bs=1 seek=$((0x00367171)) conv=notrunc
printf '\xC3'                             | sudo dd of=sublime_text bs=1 seek=$((0x003653CE)) conv=notrunc
printf '\xC3'                             | sudo dd of=sublime_text bs=1 seek=$((0x0034F5F0)) conv=notrunc

I am Using Ubuntu 20.04.2 LTS.
I install Sublime Text from Snap Store.

username@computer:/snap/sublime-text/106/opt/sublime_text$ ls
changelog.txt   Lib               Packages         sublime_text
crash_reporter  libcrypto.so.1.1  plugin_host-3.3  sublime_text.desktop
Icon            libssl.so.1.1     plugin_host-3.8
username@computer:/snap/sublime-text/106/opt/sublime_text$ printf '\x48\x31\xC0\xC3' | sudo dd of=sublime_text bs=1 seek=$((0x0036567C)) conv=notrunc
dd: failed to open 'sublime_text': Read-only file system

@maboloshi
Copy link
Author

maboloshi commented Aug 9, 2021

@abranasays You can't do this. Snaps are squashfs images, which are by definition read-only. This problem of yours is not the problem that should be solved here

@basitcodeenv
Copy link

Sir, Then How Can I install Sublime Text 4 without Snap Store ???

@basitcodeenv
Copy link

basitcodeenv commented Aug 9, 2021

@abranasays You can't do this. Snaps are squashfs images, which are by definition read-only. This problem of yours is not the problem that should be solved here

Any Solution???

@leogx9r
Copy link

leogx9r commented Aug 9, 2021

@abranasays Either extract the files, patch them and rebuild the SquashFS image as a snap or install the application via apt the way Sublime Text recommends.

@020monkey
Copy link

linux version is: Linux kali 5.10.0-kali9-amd64 #1 SMP Debian 5.10.46-4kali1 (2021-08-09) x86_64 GNU/Linux
when use this script:
cd /opt/sublime_text || exit
printf '\x48\x31\xC0\xC3' | sudo dd of=sublime_text bs=1 seek=$((0x0036567C)) conv=notrunc
printf '\x90\x90\x90\x90\x90' | sudo dd of=sublime_text bs=1 seek=$((0x0035BCCB)) conv=notrunc
printf '\x90\x90\x90\x90\x90' | sudo dd of=sublime_text bs=1 seek=$((0x0035BCE6)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3' | sudo dd of=sublime_text bs=1 seek=$((0x00367171)) conv=notrunc
printf '\xC3' | sudo dd of=sublime_text bs=1 seek=$((0x003653CE)) conv=notrunc
printf '\xC3' | sudo dd of=sublime_text bs=1 seek=$((0x0034F5F0)) conv=notrunc

the subl cannot open .

@maboloshi
Copy link
Author

@020monkey Please post the terminal output

@020monkey
Copy link

@020monkey Please post the terminal output

─$ sudo ./crack.sh 1 ⨯
16+0 records in
16+0 records out
16 bytes copied, 0.000124535 s, 128 kB/s
20+0 records in
20+0 records out
20 bytes copied, 9.399e-05 s, 213 kB/s
20+0 records in
20+0 records out
20 bytes copied, 9.25e-05 s, 216 kB/s
28+0 records in
28+0 records out
28 bytes copied, 0.000101809 s, 275 kB/s
4+0 records in
4+0 records out
4 bytes copied, 5.2532e-05 s, 76.1 kB/s
4+0 records in
4+0 records out
4 bytes copied, 5.7648e-05 s, 69.4 kB/s

@020monkey
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

@maboloshi
Copy link
Author

when crack by the script,in terminal type subl,no sublime app launch,no error

Maybe you are not using the latest ST, I suggest to update it first. Or, look up the history to find the corresponding version of the script

@020monkey
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

Maybe you are not using the latest ST, I suggest to update it first. Or, look up the history to find the corresponding version of the script

sublime version is sublime 4113

@020monkey
Copy link

all is ok,thanks

@iexpurgator
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

I have same problem, how u fix it?

@fireghostwolf
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

I have same problem, how u fix it?

You can try to use commands or scripts to patch in the terminal. my sublime version is 4113. I use the script to patch sublime_text, it work perfect , but it can’t be modified manually using hexed.it, and the app cannot be launched just like you.

@iexpurgator
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

I have same problem, how u fix it?

You can try to use commands or scripts to patch in the terminal. my sublime version is 4113. I use the script to patch sublime_text, it work perfect , but it can’t be modified manually using hexed.it, and the app cannot be launched just like you.

Yeah I'm using bash-script but I can't launched (video try bash-script (sorry quality of video)). I installed x86_64 version 4113

@maboloshi
Copy link
Author

@iexpurgator
Please try:

  1. Verify that the original sublime_text MD5 checksum is FF083966171185D01CB5F7F3721F1B95
  2. Verify the executable permission of sublime_text after repair

@iexpurgator
Copy link

@iexpurgator
Please try:

  1. Verify that the original sublime_text MD5 checksum is FF083966171185D01CB5F7F3721F1B95
  2. Verify the executable permission of sublime_text after repair

Thanks @maboloshi. Executable permission applied but md5sum was changed, how to fix that?

@maboloshi
Copy link
Author

@iexpurgator Can you upload the original sublime_text?

@iexpurgator
Copy link

@iexpurgator Can you upload the original sublime_text?

md5sum changed is file patched (sorry not clearly). Download file here file .bak is original

@leogx9r
Copy link

leogx9r commented Aug 18, 2021

@iexpurgator You didn't patch the file correctly. I double checked the file offsets and you replaced the byte sequence with the actual ASCII characters, so where you'd expect to see 48 31 C0 C3 as the byte sequence, it was replaced with 5C 78 34 38 5C 78 33 31 5C 78 43 30 5C 78 43 33, translating to \x48\x31\xC0\xC3 instead of the ASCII interpretation H1... What shell are you using and are you sure you used printf ? I've tested the command printf with bash and zsh and it works as expected. If you're using another shell it may (but shouldn't) produce incorrect output.

Try running the following script in a .sh file and see if you get the "Successfully patched the application!" line. It's basically a rework of @maboloshi's script that gives more verbose output indicating what went wrong. Save it as a .sh file and chmod +x it.

#!/bin/bash

BASEDIR="/opt/sublime_text"
TARGET="sublime_text"

VER="4113"
MD5_ORIGINAL="FF083966171185D01CB5F7F3721F1B95"
MD5_PATCHED="80739de6c764edfd7eeb925004EB7ED5"

if [ -d "$BASEDIR" ]; then
    cd "$BASEDIR"

    RESULT=`md5sum -c <<< "$MD5_ORIGINAL  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Application checksum mismatch. Perhaps the file was already patched or you're not using $TARGET v$VER?"
        exit
    fi

    printf '\x48\x31\xC0\xC3'                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCCB)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCE6)) conv=notrunc > /dev/null 2>&1
    printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | sudo dd of="$TARGET" bs=1 seek=$((0x00367171)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x003653CE)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x0034F5F0)) conv=notrunc > /dev/null 2>&1

    RESULT=`md5sum -c <<< "$MD5_PATCHED  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Failed to patch the application. You may require a reinstall as it may no longer start."
        exit
    fi

    echo "Successfully patched the application!"
else
    echo "Sublime Text was not found in the expected directory: $BASEDIR"
    echo "Modify the script to point to the correct directory then re-run it."
fi

@iexpurgator
Copy link

@iexpurgator You didn't patch the file correctly. I double checked the file offsets and you replaced the byte sequence with the actual ASCII characters, so where you'd expect to see 48 31 C0 C3 as the byte sequence, it was replaced with 5C 78 34 38 5C 78 33 31 5C 78 43 30 5C 78 43 33, translating to \x48\x31\xC0\xC3 instead of the ASCII interpretation H1... What shell are you using and are you sure you used printf ? I've tested the command printf with bash and zsh and it works as expected. If you're using another shell it may (but shouldn't) produce incorrect output.

Try running the following script in a .sh file and see if you get the "Successfully patched the application!" line. It's basically a rework of @maboloshi's script that gives more verbose output indicating what went wrong. Save it as a .sh file and chmod +x it.

#!/bin/bash

BASEDIR="/opt/sublime_text"
TARGET="sublime_text"

VER="4113"
MD5_ORIGINAL="FF083966171185D01CB5F7F3721F1B95"
MD5_PATCHED="80739de6c764edfd7eeb925004EB7ED5"

if [ -d "$BASEDIR" ]; then
    cd "$BASEDIR"

    RESULT=`md5sum -c <<< "$MD5_ORIGINAL  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Application checksum mismatch. Perhaps the file was already patched or you're not using $TARGET v$VER?"
        exit
    fi

    printf '\x48\x31\xC0\xC3'                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCCB)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCE6)) conv=notrunc > /dev/null 2>&1
    printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | sudo dd of="$TARGET" bs=1 seek=$((0x00367171)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x003653CE)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x0034F5F0)) conv=notrunc > /dev/null 2>&1

    RESULT=`md5sum -c <<< "$MD5_PATCHED  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Failed to patch the application. You may require a reinstall as it may no longer start."
        exit
    fi

    echo "Successfully patched the application!"
else
    echo "Sublime Text was not found in the expected directory: $BASEDIR"
    echo "Modify the script to point to the correct directory then re-run it."
fi

Thanks @leogx9r, you showed me the mistake. I'm missing #!/bin/bash in first line and printf it not works as expected. I want to discuss with you @leogx9r. How can I contact you?

@skmalviya
Copy link

skmalviya commented Aug 23, 2021

I am getting this error: "Failed to patch the application. You may require a reinstall as it may no longer start." for sublime 4113.

Only change in the script I did: BASEDIR="/opt/sublime_text" --> "/snap/sublime-text/106/opt/sublime_text"

@maboloshi
Copy link
Author

@skmalviya Snaps are squashfs images, which are by definition read-only.

You can try what @leogx9r mentioned.

Either extract the files, patch them and rebuild the SquashFS image as a snap or install the application via apt the way Sublime Text recommends.

@leogx9r
Copy link

leogx9r commented Aug 23, 2021

Thanks @leogx9r, you showed me the mistake. I'm missing #!/bin/bash in first line and printf it not works as expected. I want to discuss with you @leogx9r. How can I contact you?

@iexpurgator Sorry I don't give out contact info (to avoid being spammed) so best I can do is try to help you here.

Now onto your question, best I can imagine is that your bash shell isn't properly un-escaping characters, even though it works for me and I presume @maboloshi as well. Best I can gather from this is that you need to use double-quotes rather than single quotes (" vs ') as the bash manual indicates that single quotes will not interpolate vars (perhaps this also applies to escaped byte sequences?).

Try this, replace the printf '< .... >' with printf "< ... >" for each line containing it in the script. For example, the line:

printf '\x48\x31\xC0\xC3'                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1

Should be replaced with:

printf "\x48\x31\xC0\xC3"                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1

... and so on for the rest of the lines.

If that doesn't work, I've no idea what to tell you. It absolutely should at the very least and it's probably a quirk of your shell version (FTR, I'm using GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu), perhaps ensure you're using the same version?) or your terminal emulator (Also, I'm using guake as my personal terminal emulator, you can try that but it shouldn't be necessary tbh).


I am getting this error: "Failed to patch the application. You may require a reinstall as it may no longer start." for sublime 4113.

Only change in the script I did: BASEDIR="/opt/sublime_text" --> "/snap/sublime-text/106/opt/sublime_text"

@skmalviya as indicated in this comment, Snaps aren't supported via that patching method. They are read-only SquashFS images and cannot be modified. Your only way around that is to either extract the files, patch them and rebuild the SquashFS as a Snap or to install the program via the recommended method that Sublime devs have provided.

P.S. Assuming you've resolved that, you should be able to use the script maboloshi provided in the main post just fine (or the one you quoted).


P.P.S Both of you please stop quoting long messages, a simple tag like how I've mentioned you both keeps this thread cleaner and easier to read.

@bms8197
Copy link

bms8197 commented Aug 27, 2021

Any clue how to patch Sublime Text on MacOS BigSur (for M1 cpu), Sublime Build 4113?

@vbovone
Copy link

vbovone commented Aug 27, 2021

Any clue how to patch Sublime Text on MacOS BigSur (for M1 cpu), Sublime Build 4113?

Same here, I tried to use the MacOS bash commands above but didn't work for me

@bms8197
Copy link

bms8197 commented Aug 27, 2021

@vbovone Probably the strings are different on the ARM version and that's why it's not working. I guess it should work with the right approach but everything I tried so failed

Copy link

ghost commented Aug 27, 2021

I have made a rough Python 3 patcher for Sublime Text v4113 Windows x64 that uses leogx9r's signatures instead of hardcoded offsets.

https://github.com/rainbowpigeon/sublime-text-4-patcher

image

If there is demand, I can probably update it to support Linux and macOS.

@bms8197
Copy link

bms8197 commented Aug 27, 2021

@rainbowpigeon it would be really nice if you could update it for MacOS BigSur (ARM version), SublimeText build 4113. If you need the SublimeText binary as it is found on MacOS BigSur ARM, I can provide the original one resulted from the .zip file downloaded from Sublime's official website

@basitcodeenv
Copy link

Sir, I am beginner on Linux. Sir, I am using Ubuntu 20.04.
Sir, I install Sublime Text 4 from Snap Store.

Sir, Please Explain in Detail. How can I crack Sublime Text 4 ?
Sir, Please Help me.

@leogx9r
Copy link

leogx9r commented Aug 28, 2021

@rainbowpidgeon Nice work.

P.S. You can auto-detect Sublime Text/Merge with patterns too (as well as the version # -- not shown below). There's two strings always present in either Text/Merge and is shown if you enter a license key for another product:

    def detect_sublime_text(self):
        print('[>] Attempting to autodetect application type ...')

        # 'That appears to be a Sublime Text '<license key>
        pat1 = PatternFinder(
            "Sublime Merge Detector",
            '54 68 61 74 20 61 70 70 65 61 72 73 20 74 6F 20 62 65 20 61 20 53 75 62 6C 69 6D 65 20 54 65 78 74 20',
            can_duplicate = True
        ).locate(self.binary, slow_method = False, log = False)
        # 'That appears to be a Sublime Merge '<license key>
        pat2 = PatternFinder(
            "Sublime Text Detector",
            '54 68 61 74 20 61 70 70 65 61 72 73 20 74 6F 20 62 65 20 61 20 53 75 62 6C 69 6D 65 20 4D 65 72 67 65 20',
            can_duplicate = True
        ).locate(self.binary, slow_method = False, log = False)
        
        # Only one of these patterns can exist in the application. If neither is found, it's not a known application.
        if pat1 == -1 and pat2 == -1:
            print('[!] Failed to identify binary. Are you sure this is a Sublime Text or Sublime Merge binary?')
            quit()
        elif pat1 > 0 and pat2 > 0:
            print(
                "[!] Both identity signatures detected in the binary! Cannot detect what application this is.\n" +
                "[!] Manually specify the application type with `-t`."
            )
            quit()
        elif pat1 > 0:
            return False

        return True

# ...
self.is_sublime_text = app_type if app_type is not None else self.detect_patcher()

# PATTER_DB contains patterns for Sublime Text/Merge for each supported OS ( MacOS/Linux/Windows, x64 instruction set only )
self.patchset = PATTERN_DB[ self.is_sublime_text ][ self.target_os ]

Copy link

ghost commented Aug 29, 2021

@leogx9r Thanks for the tip!

@bms8197
Copy link

bms8197 commented Aug 30, 2021

@leogx9r any clue on how to patch SublimeText build 4113 for MacOS BigSur ARM cpu?

@leogx9r
Copy link

leogx9r commented Aug 30, 2021

@bms8197 The same functions will exist, the patching method (well the replacement bytes) will be different since it's a different instruction set. If you're familiar with assembly (you'll need ARM64 assembly knowledge, obviously), open up the executable in a decompiler like IDA/Ghidra, select the ARM64 segment and try to locate the functions I've patched on x64 (all those listed in the main post of this thread). From there you'll just need to get those functions to either return 0/1 or rewrite them with non-functional opcodes (essentially nop).

While I could try doing it, I don't have any ARM64 based processors to test with, I've never done ARM64/THUMB assembly programming before and honestly, I'm lazy 😄

Setting up a VM just to virtualize ARM64 processors simply isn't worth the effort for me as I don't use them. Best of luck though.

@bms8197
Copy link

bms8197 commented Aug 30, 2021

@leogx9r I see. Unfortunatelly I do not have assembly knowledge. I could send you the sublime_text binary from my computer if that helps. If I had the knowledge I would have done it myself but it beats me totally this assembly stuff :(

@bms8197
Copy link

bms8197 commented Aug 30, 2021

@leogx9r I tried using Ghidra and try to dissassemble that sublime_text binary but I have no ideea how to figure out the functions that you patched on x64. If I try to search for 0x00090E5D it returns nothing so I'm totally lost here... Any clue on how to find what's needed?

@basitcodeenv
Copy link

Sir, I am beginner on Linux. Sir, I am using Ubuntu 20.04.
Sir, I install Sublime Text 4 from Snap Store.

Sir, Please Explain in Detail. How can I crack Sublime Text 4 ?

Sir, Please Help me.

@leogx9r
Copy link

leogx9r commented Sep 1, 2021

@bms8197 Honestly teaching you about disassemblers or reverse engineering will probably be more painful than just doing it myself (which I really don't want to do atm). I'll still give you some tips though:

  • Offsets for Windows/Linux/MacOS versions will not work on the ARM64 version, they're completely different.
  • The functions you're looking for would need to be found by digging around in the assembly, for example the license validity check calls several functions that display text like "License invalid" or whatever, you can search for those strings in the ARM64 version, cross-reference the function calls and try to locate those functions. You can use the offsets for the MacOS x64 version to dig around to see roughly what you're looking for.
  • If you've never done reverse-engineering before you're going to have a very steep learning curve. There are various resources out there showing how to use IDA/Ghidra and how assembly works.

Your best bet would be to find some other way (eg. someone else who worked on the ARM64 crack) or learn how to reverse-engineer x64/ARM64 because there's a lot you'd need to know to port that work, all of which is outside the scope of help I can provide (like I said, it'd be harder to teach you how to do it than make a VM, do it myself and test).

Good luck.


@abranasays Install the app via APT, not Snap and then run the patching program maboloshi made in the main post.

@bms8197
Copy link

bms8197 commented Sep 1, 2021

@leogx9r Allright! Thank you for all this information. I'll play around to see if I'm getting anywhere... As it appears, it's way more complicated than I thought...

Copy link

ghost commented Sep 4, 2021

@rainbowpigeon it would be really nice if you could update it for MacOS BigSur (ARM version), SublimeText build 4113. If you need the SublimeText binary as it is found on MacOS BigSur ARM, I can provide the original one resulted from the .zip file downloaded from Sublime's official website

@bms8197 No worries, I can download the binary myself and test it out. Apologies for the delayed reply, I was working on updating the x64 Windows patcher to work with Dev builds as well (which means v4114 works now for anyone who is interested!).

@vbovone
Copy link

vbovone commented Sep 4, 2021

@rainbowpigeon it would be really nice if you could update it for MacOS BigSur (ARM version), SublimeText build 4113. If you need the SublimeText binary as it is found on MacOS BigSur ARM, I can provide the original one resulted from the .zip file downloaded from Sublime's official website

@bms8197 No worries, I can download the binary myself and test it out. Apologies for the delayed reply, I was working on updating the x64 Windows patcher to work with Dev builds as well (which means v4114 works now for anyone who is interested!).

I tried your patcher and it works like a charm! congrats :)
It would be nice to use it as well in my MacBook M1

@leogx9r
Copy link

leogx9r commented Sep 5, 2021

Alright so I have absolutely no idea if this will work but I've (experimentally) patched the MacOS binary (v4114) for both x86_64 (x64) and ARM64 (Not ARM32, just like I've not done x86). Give it a shot here. Replace the original with that and try starting the app, if it doesn't work, well I tried. Virus scan here. If you don't trust it, you can do a simple byte diff on the original to see what I've changed, fire up your disassembler and look at the actual instructions. Too lazy to do a graph with bytes changed.

What's patched:

  • License check (enter anything just like normal and it should be valid)
  • Invalidation/validation functions disabled
  • Server license validation thread neutered
  • Disabled phoning home on new license being entered
  • Disabled crash reporter for sending dumps on a crash

Basically, I've replaced the ret with ret x30 and xor rax, rax with mov x0, xzr, which is basically the only difference in assembly from x86_64. x30 register contains the return address, x0 contains the return value. Instructions are always 32-bits long on ARM arch.

No, I'll probably not bother doing this for future executables, it should be enough for you all to build patterns off of though (assuming you know how to) and ofc, assuming it works.

Tagging @vbovone and @bms8197 as you guys would probably be interested.

If it works, great, if it doesn't well, I doubt i'll be trying again 👍

@vbovone
Copy link

vbovone commented Sep 5, 2021

Alright so I have absolutely no idea if this will work but I've (experimentally) patched the MacOS binary (v4114) for both x86_64 (x64) and ARM64 (Not ARM32, just like I've not done x86). Give it a shot here. Replace the original with that and try starting the app, if it doesn't work, well I tried. Virus scan here. If you don't trust it, you can do a simple byte diff on the original to see what I've changed, fire up your disassembler and look at the actual instructions. Too lazy to do a graph with bytes changed.

What's patched:

  • License check (enter anything just like normal and it should be valid)
  • Invalidation/validation functions disabled
  • Server license validation thread neutered
  • Disabled phoning home on new license being entered
  • Disabled crash reporter for sending dumps on a crash

Basically, I've replaced the ret with ret x30 and xor rax, rax with mov x0, xzr, which is basically the only difference in assembly from x86_64. x30 register contains the return address, x0 contains the return value. Instructions are always 32-bits long on ARM arch.

No, I'll probably not bother doing this for future executables, it should be enough for you all to build patterns off of though (assuming you know how to) and ofc, assuming it works.

Tagging @vbovone and @bms8197 as you guys would probably be interested.

If it works, great, if it doesn't well, I doubt i'll be trying again 👍

Hi leogx9r,

First of all thanks for your time! I tried to launch the application from my Macbook M1, I've noticed that the file needs to be renamed with .app extension
From a quick launch it cannot be executed even if I changed Mac permissions to run third party applications
image

I don't want to bother you again with the Mac ARM version but it's just to giving you a feedback.

Regards,

@bms8197
Copy link

bms8197 commented Sep 6, 2021

@leogx9r It's not working in my case, on Apple M1 cpu. I'm getting same error as @vbovone. I do appreciate your time and effort for this...

@basitcodeenv
Copy link

# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"43E900A19926409EDF6BD8BA8709C633  sublime_merge" > /dev/null 2>&1 || exit
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge bs=1 seek=$((0x003A5400)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x003A7EC9)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x003A7EE4)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_merge bs=1 seek=$((0x003A67FE)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x003A514E)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x003A40D2)) conv=notrunc

Sir, I Installed sublime text via apt. I run below command:
md5sum -c <<<"43E900A19926409EDF6BD8BA8709C633 sublime_merge" > /dev/null 2>&1 || exit
Sir, My Terminal close.
Sir, Please Help me.

@maboloshi
Copy link
Author

@abranasays You should use the script corresponding to sublime text instead of sublime_merge,

Copy link

ghost commented Sep 13, 2021

Alright so I have absolutely no idea if this will work but I've (experimentally) patched the MacOS binary (v4114) for both x86_64 (x64) and ARM64 (Not ARM32, just like I've not done x86). Give it a shot here. Replace the original with that and try starting the app, if it doesn't work, well I tried. Virus scan here. If you don't trust it, you can do a simple byte diff on the original to see what I've changed, fire up your disassembler and look at the actual instructions. Too lazy to do a graph with bytes changed.
What's patched:

  • License check (enter anything just like normal and it should be valid)
  • Invalidation/validation functions disabled
  • Server license validation thread neutered
  • Disabled phoning home on new license being entered
  • Disabled crash reporter for sending dumps on a crash

Basically, I've replaced the ret with ret x30 and xor rax, rax with mov x0, xzr, which is basically the only difference in assembly from x86_64. x30 register contains the return address, x0 contains the return value. Instructions are always 32-bits long on ARM arch.
No, I'll probably not bother doing this for future executables, it should be enough for you all to build patterns off of though (assuming you know how to) and ofc, assuming it works.
Tagging @vbovone and @bms8197 as you guys would probably be interested.
If it works, great, if it doesn't well, I doubt i'll be trying again 👍

Hi leogx9r,

First of all thanks for your time! I tried to launch the application from my Macbook M1, I've noticed that the file needs to be renamed with .app extension
From a quick launch it cannot be executed even if I changed Mac permissions to run third party applications
image

I don't want to bother you again with the Mac ARM version but it's just to giving you a feedback.

Regards,

You aren't getting a message saying the file is damaged, so use the following command to re-sign the app yourself and it should run.
codesign --force --deep --sign - /Applications/Sublime\ Text.app

If you get an error about xcrun missing, just run the command xcode-select --install to install the missing files first, then re-run the command.

@bms8197
Copy link

bms8197 commented Sep 13, 2021

@1-Dev1l you're the man! Thanks for the tip. I have now, SublimeText, build 4114 fully registered on MacOS BigSur ARM (M1).
@leogx9r You're a genius! Thank you so much!

image

@vbovone
Copy link

vbovone commented Sep 13, 2021

@1-Dev1l you're the man! Thanks for the tip. I have now, SublimeText, build 4114 fully registered on MacOS BigSur ARM (M1).
@leogx9r You're a genius! Thank you so much!

Hi bms8197,

What did you do to successfully install the app?

I runt this :
image

But I'm still getting the same error

Copy link

ghost commented Sep 13, 2021

@1-Dev1l you're the man! Thanks for the tip. I have now, SublimeText, build 4114 fully registered on MacOS BigSur ARM (M1).
@leogx9r You're a genius! Thank you so much!

Hi bms8197,

What did you do to successfully install the app?

I runt this :
image

But I'm still getting the same error

Ensure 'App Store and identified developers' is selected under 'Allow apps downloaded from' in System Preferences > Security & Privacy > General

@bms8197
Copy link

bms8197 commented Sep 13, 2021

I had SublimeText build 4113 installed. I've downloaded the latest dev build 4114 from their website. Then took the Sublime Text.App and put in Applications folder using replace (since the app was already there). I've opened the app just to check that I have build 4114. Close SublimeText App, Download the sublime_text binary provided by @legox9r. Copy sublime_text binary over the original binary then ran that codesign command. I've got the same message as you but the app works.

Oh I do have these entries in /etc/hosts:

# sublimetext
0.0.0.0 sublimetext.com
0.0.0.0 license.sublimehq.com
0.0.0.0 45.55.255.55 #sublimetext
0.0.0.0 45.55.41.223 #sublimetext

As a side note, I had SublimeText v4113 registered with a license that required upgrade (not sure if matters or not):

—– BEGIN LICENSE —–
Die Socialisten GmbH
10 User License
EA7E-800613
51311422 E45F49ED 3F0ADE0C E5B8A508
2F4D9B65 64E1E244 EDA11F0E F9D06110
B7B2E826 E6FDAA72 2C653693 5D80582F
09DCFFB5 113A940C 5045C0CD 5F8332F8
34356CC6 D96F6FDB 4DEC20EA 0A24D83A
2C82C329 E3290B29 A16109A7 EC198EB9
F28EBB17 9C07403F D44BA75A C23C6874
EBF11238 5546C3DD 737DC616 445C2941
—— END LICENSE ——

Go to Settings -> Security & Privacy -> General; check if you have SublimeText there and allow it to run

Copy link

ghost commented Sep 13, 2021

You could also try opening Applications folder in finder, control-click the application and choose Open if you aren't getting the 'Open Anyway' message for the app.

Also, I have nothing in hosts and nothing in licence and it works well for me.
Screenshot 2021-09-13 at 15 59 03

@vbovone
Copy link

vbovone commented Sep 13, 2021

So the binary needs to be placed here right ? From Security & Privacy tab I've got Anywhere so it should be ok

image

@bms8197
Copy link

bms8197 commented Sep 13, 2021

I would do this:

  • close SublimeText
  • download SublimeText v4114 from their site;
  • copy SublimeText.app resulted from the previous download to Applications folder (using Finder) and chose Replace
  • then execute the following commands via Terminal:
cd /Applications/Sublime\ Text.app/Contents/MacOS/
cp ~/Downloads/sublime_text .
codesign --force --deep --sign - /Applications/Sublime\ Text.app

Then try to open SublimeText. You will get a notification message, click OK, then Go to Settings -> Security & Privacy -> General and see if you need to allow anything there.

After that it should work. At least it worked in my case. I'm running MacOS BigSur 11.5.2 (M1 cpu) on a 2021 iMac 24"

@vbovone
Copy link

vbovone commented Sep 13, 2021

I would do this:

  • close SublimeText
  • download SublimeText v4114 from their site;
  • copy SublimeText.app resulted from the previous download to Applications folder (using Finder) and chose Replace
  • then execute the following commands via Terminal:
cd /Applications/Sublime\ Text.app/Contents/MacOS/
cp ~/Downloads/sublime_text .
codesign --force --deep --sign - /Applications/Sublime\ Text.app

Then try to open SublimeText. You will get a notification message, click OK, then Go to Settings -> Security & Privacy -> General and see if you need to allow anything there.

After that it should work. At least it worked in my case. I'm running MacOS BigSur 11.5.2 (M1 cpu) on a 2021 iMac 24"

Thanks you guys! It works 👯

Just remember this to anyone having my same issue. When copying the Application with Finder it's very important to NOT OPEN the app until the end of the entire process.

@maboloshi
Copy link
Author

maboloshi commented Sep 14, 2021

I tried to organize the patched shulime text 4114 binary file provided by @leogx9r into rules, but, there are still two rules that are not organized and I don't know if the rest are valid.

Sublime Text Build 4114 macOS(arm64) ↓

Desciption Offset Original Patched
Disable Crash Reporter 0x00F615F4 FC 6F BC A9 C0 03 5F D6
  Pattern:  FC 6F BC A9 F6 57 01 A9 F4 4F 02 A9 FD 7B 03 A9 FD C3 00 91 FF 03 0F D1

May be:
4112-DEV:0x00F2A078
4113-STA:0x00F2A25C
4114-DEV:0x00F615F4

Desciption Offset Original Patched
Persistent License Check 1 0x00F65F80 AF 94 03 94 1F 20 03 D5
  Pattern:  ? ? ? 94 61 46 41 F9 ? ? 00 10 1F 20 03 D5 02 53 87 52

May be:
4112-DEV:0x00F2E9BB
4113-STA:0x00F2EBA3
4114-DEV:0x00F65F83

Desciption Offset Original Patched
Persistent License Check 2 0x00F65F94 AA 94 03 94 1F 20 03 D5
  Pattern:  ? ? ? 94 ? 2F 00 ? F7 ? ? 91 E0 42 ? 91 E0 6F 00 F9

May be:
4112-DEV:0x00F2E9CF
4113-STA:0x00F2EBB7
4114-DEV:0x00F65F97

Desciption Offset Original Patched
Disable License Notify Thread 0x00FD3EE8 FC 6F BD A9 C0 03 5F D6
  Patterne:  FC 6F BD A9 F4 4F 01 A9 FD 7B 02 A9 FD 83 00 91 FF 43 0C D1 F3 03 00 AA

May be:
4112-DEV:0x00F9AC94
4113-STA:0x00F9AD48
4114-DEV:0x00FD3EE8

Desciption Offset Original Patched
Initial License Check 0x00FD4258 E6 03 1E AA ED 65 0E 94 E0 03 1F AA C0 03 5F D6
  Pattern:  None
Desciption Offset Original Patched
Disable Server Validation Thread 0x00FD52F0 F6 57 BD A9 C0 03 5F D6
  Pattern:  F6 57 BD A9 F4 4F 01 A9 FD 7B 02 A9 FD 83 00 91 ? ? ? 94 ? ? ? 94 F3 03 00 AA ? ? ? 94 74 1A 00 B9

May be:
4112-DEV:0x00F9C078
4113-STA:0x00F9C114
4114-DEV:0x00FD52F0

4112, 4113 and 4114 have very different offset, Pattern validity is in doubt

@leogx9r
Copy link

leogx9r commented Sep 14, 2021

Well I'll be, I didn't expect that to work, lol. @1-Dev1l thanks for that.

@maboloshi Thanks, unfortunately I don't remember exactly what I change (didn't document it since I didn't expect it to work) and my patching method was slightly different from the x64 versions (patched wrapper functions iirc). Didn't make the time to do it "properly" but I'll maybe try to work on it when I get some time and see if I can put it together a bit more coherently.

For patterns, my signature maker plugin doesn't work on ARM and would basically require heavy modifications so that's a task for another day.

Glad it all worked out. 😄

@Destitute-Streetdwelling-Guttersnipe

@maboloshi You use "C3" (ret) to patch "Disable License Notify Thread". But I saw @leogx9r wrote that "Simply return 0 here to disable." in comment https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3802197.
Is this a mistake? Why don't you use ret 0?

@Destitute-Streetdwelling-Guttersnipe

@leogx9r thanks for your great contribution. I'm curious about the Server Validation Thread. In your analysis, you suggest to use ret 1 to disable it.
However, I saw someone named rufoa posted patches for it using ret for many versions of SM (from 2027 to 2059).
I tried ret on SM 2059 and it seems ok.
Do you think patching with ret has the same effect?

@leogx9r
Copy link

leogx9r commented Sep 15, 2021

@Destitute-Streetdwelling-Guttersnipe It does have the same effect. The function returns the value of pthread_join() or something similar. I didn't see Sublime Text/Merge use the return value but decided to have it return the proper value anyways for consistency (which upon research seems it required zero so I guess I documented that wrong).

The only function you really need to have a return value is for the license checking function, which requires zero always. The rest are basically optional. The return value isn't actually used (based on my reverse engineering) on the other functions.

Edit: On Windows it returns the value of CreateThread() which requires a non-zero value to indicate success. I originally patched this on Windows so I used the same method for Linux/MacOS -- they instead use pthread which requires a zero value to indicate success, so I guess that's where I got mixed up. So you should ideally return 1 on Windows (or any non-zero value) and 0 on Linux but it doesn't matter really since the value is never used.

@Destitute-Streetdwelling-Guttersnipe

@leogx9r thanks for the explanation. I think this also answer my question to @maboloshi about "License Notify Thread". We can return anything since the return value is ignored.

I created a patcher in my github which uses the patterns you posted. I upgraded them to use reghex (which is regex with hex bytes), so that I can combine more actions into 1 pattern.
For example: reghex="(?<= 41 B8 . . . . ) E8 . . . . (48|49) . .", fix=nop5 can be used to patch the invalidate1 call for both dev and stable versions of ST (48 for dev, 49 for stable), the offset to E8 is described by the lookahead (?<= 41 B8 . . . . ).
Another example: reghex="(?<= E8 ) . . . .", patch=ret0, is_ref=True can be used to patch the license_check call without the need to analyze the instruction length of Call (E8).
I hope to make it less dependent on x64 and easier to add support for arm64.

@ShineUnM
Copy link

How about 4115?

@Destitute-Streetdwelling-Guttersnipe

@kepeto you must provide the list of Fix yourself. Please see the section usage in README.md for detail.

If you don't know any fix, you can use the famous patch for 97 94 0D (see https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451)

@leogx9r
Copy link

leogx9r commented Sep 24, 2021

Sublime Text v4115 Crack

Windows (x64 Only)

Patterns have updated for invalidation/validation function:

    Windows x64 Pattern 1: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? 48 8B 96 ? ? ? ?`
                Pattern 2: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 48 89 F1`

Note: Patterns are unchanged for Linux/MacOS.

image

Linux (x64 Only)

image

MacOS (x64 Only)

image

Proof

image

@kepeto
Copy link

kepeto commented Sep 26, 2021

I have made a rough Python 3 patcher for Sublime Text v4113 Windows x64 that uses leogx9r's signatures instead of hardcoded offsets.

https://github.com/rainbowpigeon/sublime-text-4-patcher

image

If there is demand, I can probably update it to support Linux and macOS.

from @leogx9r recommendation I can confirm 4115 work with this tool (same pattern), just add 4115 @line: 264

image

image

@Destitute-Streetdwelling-Guttersnipe

I put a regex pattern in my patcher that can detect new version (along with channel, os, arch) without any modification.
/updates/(?P<channel>\w+)_update_check\?version=\d+&platform=(?P<os>\w+)&arch=(?P<arch>\w+)

@bms8197
Copy link

bms8197 commented Sep 28, 2021

So is there a patcher that works on MacOS (ARM version) or just for Windows for now?

@Destitute-Streetdwelling-Guttersnipe

Current patterns still work on SM 2060. They use ret 281 again in license check. All releases since SM 2056 (except 2058) are like this. Maybe SM 2058 was just an anomaly.

@Destitute-Streetdwelling-Guttersnipe
Copy link

Based on the work of @leogx9r and @maboloshi, I updated my patcher to support Mac M1. But I guess it's only suitable for version 4114 on Mac M1.
image

PS: the patterns of @maboloshi are mostly correct, except the license check. My pattern is:

Fix(name="license_check", reghex="E6 03 1E AA ED 65 0E 94", patch="E0 03 1F AA C0 03 5F D6")

@bms8197
Copy link

bms8197 commented Sep 28, 2021

@Destitute-Streetdwelling-Guttersnipe where exactly can I get that patcher?

@Destitute-Streetdwelling-Guttersnipe

Mac version of ST can run on both x64 and M1 CPUs, so I improved my patcher to patch for both platforms at once:
image

@Destitute-Streetdwelling-Guttersnipe
Copy link

@bms8197 it's at https://github.com/Destitute-Streetdwelling-Guttersnipe/reghex_patcher
The patterns are similar to the ones in rainbowpigeon's patcher.

If you don't know any fix, you can use the famous patch for 97 94 0D (see https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451)

@bms8197
Copy link

bms8197 commented Sep 29, 2021

@Destitute-Streetdwelling-Guttersnipe is that patcher going to work for 4115 MacOS on M1 cpu or just for 4114?

@Destitute-Streetdwelling-Guttersnipe

@bms8197 I don't include patterns since I want to make a generic patcher. You have to add patterns yourself.

There are patterns for 4114 on Mac M1 in this page, such as https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3908103.
I don't know if they work on 4115 or not.

@bms8197
Copy link

bms8197 commented Sep 29, 2021

@Destitute-Streetdwelling-Guttersnipe allright, thanks for the info. It beats me at the moment so I'll just stick with my 4114 fully registered version. There are no things that I actually need in 4115 at the moment so...

@maboloshi
Copy link
Author

maboloshi commented Sep 30, 2021

Sublime Text v4116

==========================================================================================
[*] Download: sublime_text_build_4116_x64.zip, from: https://download.sublimetext.com/sublime_text_build_4116_x64.zip ...
>>>: 29.1MB [00:12, 2.31MB/s]
[*] Extract: sublime_text.exe, from: sublime_text_build_4116_x64.zip ...
[>] Attempting to autodetect application type ...
[*] Detected input file as Sublime Text ...
[*] Windows PE Detected -> 9849248 Bytes
    MD5 Checksum -> 1E9700C9AE636755E674176196C6546D
[>] Found RVA pattern for "isValidLicense" at 0xA8730 -> 0xFFFFE29F -> 0xA69D4 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x711A ...
[*] Rewrite data 'E8 A5 60 20 00' -> '90 90 90 90 90' ...

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

[>] Found pattern for "validationFunction2" at 0x7133 ...
[*] Rewrite data 'E8 8C 60 20 00' -> '90 90 90 90 90' ...

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

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

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

==========================================================================================
[*] Download: sublime_text_build_4116_x64.tar.xz, from: https://download.sublimetext.com/sublime_text_build_4116_x64.tar.xz ...
>>>: 17.2MB [00:04, 3.86MB/s]
[*] Extract: sublime_text/sublime_text, from: sublime_text_build_4116_x64.tar.xz ...
[>] Attempting to autodetect application type ...
[*] Detected input file as Sublime Text ...
[*] Linux ELF Detected -> 8739760 Bytes
    MD5 Checksum -> E825B21D7821A49D1DB6583D089CF0E9
[>] Found RVA pattern for "isValidLicense" at 0x3781CE -> 0xFFFFE96F -> 0x376B42 ...
[*] Rewrite data '55 41 57 41' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x36CC85 ...
[*] Rewrite data 'E8 A4 B4 11 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction" at 0x36CCA0 ...
[*] Rewrite data 'E8 89 B4 11 00' -> '90 90 90 90 90' ...

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

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

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

==========================================================================================
[*] Download: sublime_text_build_4116_mac.zip, from: https://download.sublimetext.com/sublime_text_build_4116_mac.zip ...
>>>: 43.7MB [00:16, 2.59MB/s]
[*] Extract: Sublime Text.app/Contents/MacOS/sublime_text, from: sublime_text_build_4116_mac.zip ...
[>] Attempting to autodetect application type ...
[*] Detected input file as Sublime Text ...
[*] MacOS Mach-O Detected -> 33166448 Bytes
    MD5 Checksum -> DA00E096337A07B659B573CA7FC4D352
[>] Found RVA pattern for "isValidLicense" at 0x93D8A -> 0xFFFFF1A3 -> 0x92F32 ...
[*] Rewrite data '55 48 89 E5' -> '48 31 C0 C3' ...

[>] Found pattern for "invalidationFunction" at 0x8E7E ...
[*] Rewrite data 'E8 93 16 12 00' -> '90 90 90 90 90' ...

[>] Found pattern for "validationFunction" at 0x8E9D ...
[*] Rewrite data 'E8 74 16 12 00' -> '90 90 90 90 90' ...

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

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

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

↓ The following rules are not validated for ARM64 and are missing rule "license_check" ↓

[>] Found pattern for "invalidationFunction_arm64" at 0xF69744 ...
[*] Rewrite data '48 95 03 94' -> '1F 20 03 D5' ...

[>] Found pattern for "validationFunction_arm64" at 0xF69758 ...
[*] Rewrite data '43 95 03 94' -> '1F 20 03 D5' ...

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

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

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

@bms8197
Copy link

bms8197 commented Sep 30, 2021

@maboloshi can we get that patcher from somewhere or is it private?

@kepeto
Copy link

kepeto commented Sep 30, 2021

@rainbowpigeon patch working for 4116 build

image
image
image

@Destitute-Streetdwelling-Guttersnipe

@maboloshi You can use my pattern for license_check (for ARM64 on Mac M1) at https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3908103

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe I know, but this only applies to 4114.

@Destitute-Streetdwelling-Guttersnipe

It's Friday, so let's have some fun with binary 🚀
@maboloshi you can use this pattern for license_check with 4116:

        Fix(name="license_check", reghex=f"(?<= {0b0000000000001000:02x} {0b0000000000000000:02x} {0b0000000010000000:02x} {0b0000000001010010:02x} . . . {0b0000000000010100:02x} ) {0b0000000011100110:02x} {0b0000000000000011:02x} {0b0000000000011110:02x} {0b0000000010101010:02x} . . . {0b0000000010010100:02x} {0b0000000011111110:02x} {0b0000000000000011:02x} {0b0000000000000110:02x} {0b0000000010101010:02x}", patch=_ret0),

@bms8197 if you want to patch 4116, you can combine the patches of maboloshi at https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3911981 with my patch for license_check:

printf %02x  $((2#0000000011100000)) $((2#0000000000000011)) $((2#0000000000011111)) $((2#0000000010101010)) $((2#0000000011000000)) $((2#0000000000000011)) $((2#0000000001011111)) $((2#0000000011010110)) | xxd -r -p -s $((2#00000000111111010111111000011100)) sublime_text

I haven't tested it on Mac M1, but you can give it a try if you're not afraid of binary digits.

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Good job 😆 👍

[>] Found pattern for "isValidLicense_arm64" at 0xFD7E1C ...
[*] Rewrite data 'E6 03 1E AA E4 65 0E 94' -> 'E0 03 1F AA C0 03 5F D6' ...

@bms8197
Copy link

bms8197 commented Oct 1, 2021

@Destitute-Streetdwelling-Guttersnipe it beats me completely how to patch 4116. I tried several methods combining those patches but it's not working. I'm pretty sure I'm doing something wrong here. This hex stuff is not for me as it seems...

Copy link

ghost commented Oct 5, 2021

@rainbowpigeon patch working for 4116 build

@kepeto Thanks for testing. I have pushed the changes to support those new dev builds.

@sharunkumar
Copy link

sharunkumar commented Oct 6, 2021

echo|set /p="7D6D201F6E924801C0B872398877C8A1 sublime_merge.exe" >nul 2>&1 | md5sum -c - || exit

getting an exit at this point in SM version 2060 🤔

@sharunkumar
Copy link

@sharunkumar You need to download Command Line Tools for Windows 64 and extract the Command Line Tools.

I did download that and added the binaries to path. I am still getting the exit. I think the MD5 sum isn't matching

@sharunkumar
Copy link

also, if I skip the md5sum check the rest of the commands doesn't seem to work

@bms8197
Copy link

bms8197 commented Oct 6, 2021

So in the end does anyone have a patcher that works for MacOS M1 cpu for dev 4116? I tried several times to make it work based on the informations and the patterns provided here but since my skills related to assembly stuff are pretty limit, I had no success so right now I'm using dev 4114 patched.

@sharunkumar
Copy link

Nvm, it works when I run them in git bash, but strange that it doesn't work in command prompt.

@maboloshi
Copy link
Author

maboloshi commented Oct 6, 2021

Nvm, it works when I run them in git bash, but strange that it doesn't work in command prompt.

@sharunkumar Thank you very much for your feedback. I'll look into it then.

@maboloshi
Copy link
Author

@sharunkumar
The command line is amended to:

echo|set /p="7D6D201F6E924801C0B872398877C8A1  sublime_merge.exe" | md5sum -c - >nul 2>&1 || exit

@Destitute-Streetdwelling-Guttersnipe

@maboloshi it's better to use PowerShell in Windows, instead of bash, like this:

$file = "C:\Program Files\Sublime Text\sublime_text.exe"
if ((Get-FileHash $file -Algorithm MD5).Hash -ne 'AACCDDFF') { echo 'wrong MD5 hash'; exit }

$bytes = Get-Content $file -Encoding Byte -Raw
$fix = @{
  0xA69D4 = @(0x48, 0x31, 0xC0, 0xC3) # Initial License Check
  0x711A  = @(0x90, 0x90, 0x90, 0x90, 0x90)
  0x7133  = @(0x90, 0x90, 0x90, 0x90, 0x90)
  0xA847F = @(0xC3) # Disable Server Validation Thread
  0xA65CF = @(0xC3)
  0x400   = @(0xC3)
  }
$fix.Keys | %{ $fix[($k=$_)] | %{ $bytes[$k++] = $_ } }
Set-Content $file -Encoding Byte -Value $bytes

in Linux, bash script can be simpler

(
  f=./sublime_text
  patchex() { printf %b ${*/#/\\x} | dd seek=$(($o)) of="$f" bs=1 conv=notrunc status=none; }
  while read o b; do [[ $o =~ ^#|^$ ]] || patchex $b; done <<<'
    # Initial License Check
    0xA69D4 48 31 C0 C3
    0x711A  90 90 90 90 90
    0x7133  90 90 90 90 90
    # Disable Server Validation Thread
    0xA847F C3
    0xA65CF C3
    0x400   C3
    '
)

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe In fact, I never intended to write it as a nanny script in the first place. 😆

@leogx9r
Copy link

leogx9r commented Oct 15, 2021

Sublime Text v4117 Crack

Windows (x64 Only)

Patterns have changed again for isValidLicense. Here's 5 different patterns you can use in case one stops working:

`direct reference sig: (+0x3) 45 31 C9 E8 ? ? ? ? 85 C0 75 15 `         // These two invalidation/validation function references
`direct reference sig: (+0x3) 45 31 C9 E8 ? ? ? ? 85 C0 75 0D`          // Same as above.
`direct reference sig: (+0x4) 48 8D 4D 40 E8 ? ? ? ? 48 8B 4E 10`
`direct reference sig: (+0x3) 48 89 F9 E8 ? ? ? ? 48 8B 4E 10 85 C0`
`direct reference sig: (+0x4) 4C 8D 4D 54 E8 ? ? ? ?`                   // Performed on license entering to check validity.

image

Linux (x64 Only)

image

MacOS (x64 Only)

image

Proof

image

Yes, I removed the "Registered to" line. You can do the same:

    def patch_registration_message(self):
        # 'Registered to \0'
        offset = PatternFinder(
            'registrationMessage',
            '52 65 67 69 73 74 65 72 65 64 20 74 6F 20 00',
            can_duplicate = True
        ).locate(self.binary, slow_method = True, log = False);

        if offset != -1:
            for i in range(0, 15):
                self.binary[offset + i] = 0x00;
            print('[+] Removed registration message.');

@Destitute-Streetdwelling-Guttersnipe
Copy link

Here I quoted the first 3 posts of @leogx9r from
https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451#gistcomment-3762200

They're historic game-changing contribution. Thank you, @leogx9r


leogx9r commented on May 30

Here's my method for breaking their license protection. I've specifically applied the below to v4107.

Quick note: This isn't meant for newbies, this shows you how to patch the current and (most likely) future versions of Sublime Text. I've been using this for a while now.

Here's a basic rundown of how license validation and invalidation works:

  • Licenses have hardcoded (lol, remove blacklist and patch server thread, 10/10 protection) blacklists in the executable and are signed via an RSA public key (which is 'encrypted' in the binary, basically some xor stuff).
  • Application tries to validate an invalid license every 5 seconds. It expects this to fail but if it succeeds, it will unregister you after 480 seconds. This is why simply patching the validity function isn't enough.
  • Application tries to validate your current license every 15 seconds. It expects this to succeed but if it fails, it will unregister you after 360 seconds.
  • The application creates a thread to validate the current license with the server at license.sublimehq.com whenever the application is started (config file read) or when modifying your current license. If this succeeds to connect and your license isn't correct it will unregister you.

So how can you bypass all this? Dare I say, efficiently?

  • Patch the validation function (isLicenseValid as I call it) for anything to always return 0 (valid). Values from 1-4 specify either an invalid, blacklisted or unsupported/expired license.
  • Prevent thread creation for the validation/invalidation routines to avoid the license being unregistered after X seconds due to patching isLicenseValid. Optionally simply remove the "unregister" function here. Doesn't matter how you go about it really.
  • Disable server validation thread or patch the HTTP host so it always fails to connect. Most people resort to using hosts to redirect the license server to localhost or renaming the host in the binary. A far better way is simply to avoid a dead thread being created that does this check.

Disabling creation of these 3 threads is my preferred method since you obviously save resources as you don't need to constantly have new threads opened every X seconds.

Why I consider this better than other methods?

  • No need to find a "working"/"nonblacklisted" license. You can literally enter "Hello World!" as a valid license.
  • No useless thread creation eating up resources. A small performance improvement you'll absolutely never notice.
  • You don't have to patch /etc/hosts or system32/drivers/etc/hosts.
  • Relies on patterns so you can build your own script to auto-patch on updates, provided patterns don't break of course.
  • Doesn't decide to randomly expire.

How tho?

Patch the following methods:

  • License Validity Checking (Aka IsValidLicense

Make isLicenseValid return 0, pattern is a reference to call isLicenseValid. I personally just replaced the method with xor rax, rax; ret so 48 31 C0 C3.

    Linux/MacOS x64 Pattern: `direct reference sig: E8 ? ? ? ? 49 8B BF ? ? ? ? 85 C0`
    Windows x64 Pattern:     `direct reference sig: E8 ? ? ? ? 48 8B 8B ? ? ? ? 85 C0`
  • Invalidation/Validation Functions

These cause delayed unregistration after 360/480 seconds so NOP out the calls to avoid them. Aka replace E8 XX XX XX XX with 90 90 90 90 90.

    Windows x64 Pattern 1: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? 49 8B 96`
                Pattern 2: `raw sig: E8 ? ? ? ? E8 ? ? ? ? 4C 89 F1 E8`
    Linux x64   Pattern 1: `raw sig: E8 ? ? ? ? 48 89 5C 24 ? 48 8B B3`
                Pattern 2: `raw sig: E8 ? ? ? ? BF ? ? ? ? E8 ? ? ? ? 83 25`
    MacOS       Pattern 1: `raw sig: E8 ? ? ? ? 48 89 9D ? ? ? ? 48 8B B3`
                Pattern 2: `raw sig: E8 ? ? ? ? 48 8D 3D ? ? ? ? E8 ? ? ? ? 83 25`
  • Server Validation Thread

Simply make this instantly return 1 to disable thread creation or patch the hostname to something invalid. I personally prefer to simply disable thread creation by making this return 1, aka 48 31 C0 48 FF C0 C3, xor rax, rax; inc rax; ret.

    Windows x64 Pattern: `raw sig: 55 56 57 48 83 EC 30 48 8D 6C 24 ? 48 C7 45 ? ? ? ? ? 89 D6 48 89 CF 6A 28`
    Linux x64   Pattern: `raw sig: 55 41 56 53 41 89 F6 48 89 FD 6A 28`
    MacOS       Pattern: `raw sig: 55 48 89 E5 41 57 41 56 53 50 41 89 F6 49 89 FF 6A 20`

Now what?

After patching simply register with anything you want. It can even be just a random letter, a space, a word, a sentence, a valid or invalid license -- whatever you want. Here's what I registered with:

Paying 80$ For A License Is Stupid

But I wanna download!

Linux

For Linux x64 on v4107, you can use this (replace /opt/sublime_text/sublime_text with the path to the binary):

# 554157415641554154534881EC68240000 -> 4831C0C390909090909090909090909090
sed -i 's/\x55\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x68\x24\x00\x00/\x48\x31\xC0\xC3\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90/g' /opt/sublime_text/sublime_text

# E8C2781800 -> 9090909090
sed -i 's/\xE8\xC2\x78\x18\x00/\x90\x90\x90\x90\x90/g' /opt/sublime_text/sublime_text
# E8A7781800 -> 9090909090
sed -i 's/\xE8\xA7\x78\x18\x00/\x90\x90\x90\x90\x90/g' /opt/sublime_text/sublime_text

# 554156534189F64889FD6A28 -> 4831C048FFC0C39090909090
sed -i 's/\x55\x41\x56\x53\x41\x89\xF6\x48\x89\xFD\x6A\x28/\x48\x31\xC0\x48\xFF\xC0\xC3\x90\x90\x90\x90\x90/g' /opt/sublime_text/sublime_text

Windows

I've uploaded a portable copy of the Windows x64 bit version, already patched, here. Simply replace the sublime_text.exe file from the portable download with the above. Here's the virus scan. Note: PE.Heur.InvalidSig is due to patching the executable to bypass the license checks. Don't trust it? Then patch it yourself :P

I've been using this on both Windows and Linux since the new version dropped without issues.

MacOS

No.

Proof

image
image
image


leogx9r commented on May 30

@CypherpunkSamurai You can probably try these:

Art of Assembly
Assembly Generic Wiki
Introduction to x64 Assembly
x86 and x64 Instruction Reference

There's many books as well. You could look around. I use IDA and Ghidra.


leogx9r commented on May 30

For the record, Sublime Merge can also be defeated the same way. Did the same on v2056.

License Validity Checking

For this, the only difference with Sublime Text is you need to return 281 instead of 0. I just did a simple mov rax, 281; ret.

    Windows x64 Pattern: `direct reference sig: E8 ? ? ? ? 3D ? ? ? ? 75 15`
    Linux x64 Pattern:   `direct reference sig: E8 ? ? ? ? 3D ? ? ? ? 75 12`
    MacOS x64 Pattern:   `direct reference sig: E8 ? ? ? ? 3D ? ? ? ? 75 14`

Invalidation/Validation Threads

    Windows x64 Pattern 1: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? B9`
                Pattern 2: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? 48 8B 96 ? ? ? ? `
    Linux x64   Pattern 1: `raw sig: E8 ? ? ? ? 48 89 5C 24 ? 48 8B B3`
                Pattern 2: `raw sig: E8 ? ? ? ? BF ? ? ? ? E8 ? ? ? ? 83 25`
    MacOS       Pattern 1: `raw sig: E8 ? ? ? ? 48 89 9D ? ? ? ? 48 8B B3`
                Pattern 2: `raw sig: E8 ? ? ? ? 48 8D 3D ? ? ? ? E8 ? ? ? ? 83 25`

Server Validation Thread

    Windows x64 Pattern: `raw sig: 55 56 57 48 83 EC 30 48 8D 6C 24 ? 48 C7 45 ? ? ? ? ? 89 D6 48 89 CF 6A 28`
    Linux x64   Pattern: `raw sig: 55 41 56 53 41 89 F6 48 89 FD 6A 28`
    MacOS       Pattern: `raw sig: 55 48 89 E5 41 57 41 56 53 50 41 89 F6 49 89 FF 6A 20`

Proof

image
image
image


@kepeto
Copy link

kepeto commented Oct 15, 2021

@rainbowpigeon new pattern from @leogx9r
your patch not working for latest dev build (4117, 4118)

@leogx9r
Copy link

leogx9r commented Oct 15, 2021

@Destitute-Streetdwelling-Guttersnipe 👍


Sublime Merge v2062 Crack

I finally managed to post the offsets before @maboloshi could provide them for once lol. 😄

Patterns remain the same thankfully.

Windows (x64 Only)

image

Linux (x64 Only)

image

MacOS (x64 Only)

image

Proof

image

Cheers.

@bms8197
Copy link

bms8197 commented Oct 16, 2021

@maboloshi: Tried with that bash script on a CentOS linux vm, using the patterns from v4116 and the sublime_text macos arm binary (I initially tried on MacOS terminal but it appears that I have bash 5 on Mac and the syntax is different). It resulted in a file of 4.2Gb. Needless to say that Sublime it's not working.

Inside the script I've used something like this:

    0x93D8A 48 31 C0 C3
    0xFFFFF1A3 48 31 C0 C3
    0x92F32 48 31 C0 C3
    0x8E7E 90 90 90 90 90
    0x8E9D 90 90 90 90 90
    0x94297 48 31 C0 48 FF C0 C3
    0x92B50 C3
    0x2FE7 C3

@Destitute-Streetdwelling-Guttersnipe

@maboloshi TIL that echo|set /p= in your bat script is used to print string without EOL (\n\r).
And I wonder why don't you use printf instead :D

BTW, I think it's better to remove >nul 2>&1 in order to show errors (wrong hash, file not found/readable ...)

@Destitute-Streetdwelling-Guttersnipe

@bms8197 You should remove the patch at 0x93D8A and 0xFFFFF1A3.
I guess you want to patch at 3 offsets when you saw this

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

But only the last offset should be patched.

@bms8197
Copy link

bms8197 commented Oct 16, 2021

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Good idea. I've fixed it. 😆

@bms8197
Copy link

bms8197 commented Oct 16, 2021

@Destitute-Streetdwelling-Guttersnipe: Tried like that, for the macos arm binary, the bash command seems to work but nothing happens. I'm getting a Lincese Upgrade message (I initially had SublimeText v4113 license with some 10 user license I found on internet and it was still working. Currently I have a patched v4114 version that I'm using so I was trying to patch 4116 and run it in parallel until I manage to patch it following instructions from this thread. The patterns are from @maboloshi and according to him v4116 shold be patched with those or MacOS M1

      0x92F32 48 31 C0 C3
      0x8E7E 90 90 90 90 90
      0x8E9D 90 90 90 90 90
      0x94297 48 31 C0 48 FF C0 C3
      0x92B50 C3
      0x2FE7 C3

In order to test if the changes were actually applied to the sublime_text file I did a md5sum (before and after):

da00e096337a07b659b573ca7fc4d352  sublime_text
cf70460527ba9f1217307dae00c248db  sublime_text

So it appears the changes were applied. Maybe I'm missing something...

I've done some tests. So for v4114 binary which is correctly patched, if I remove the license, close the program, start it again, it asks for a license, I enter whatever, it's fully registered. For v4116 doing the same thing, when entering the license says "Invalid license" so I assume the patterns that I used above are not entirely correct

@maboloshi
Copy link
Author

maboloshi commented Oct 16, 2021

@bms8197 We took the 4114 binary provided by @leogx9r and tried to figure out the rules. We don't have a corresponding testbed to verify.

You can try:
for ST 4118 (MacOS M1):

# for ST 4118 (MacOS M1)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
[ $(md5 sublime_text) = B996ECD0CD2F60425B6B29D694DD9AB3 ] || exit
printf '\xE0\x03\x1F\xAA\xC0\x03\x5F\xD6' | dd of=sublime_text bs=1 seek=$((0xFCE7CC)) conv=notrunc
printf '\x1F\x20\x03\xD5'             | dd of=sublime_text bs=1 seek=$((0xF60190)) conv=notrunc
printf '\x1F\x20\x03\xD5'             | dd of=sublime_text bs=1 seek=$((0xF601A4)) conv=notrunc
printf '\xC0\x03\x5F\xD6'             | dd of=sublime_text bs=1 seek=$((0xFCF8C8)) conv=notrunc
printf '\xC0\x03\x5F\xD6'             | dd of=sublime_text bs=1 seek=$((0xFCE45C)) conv=notrunc
printf '\xC0\x03\x5F\xD6'             | dd of=sublime_text bs=1 seek=$((0xF5B814)) conv=notrunc

@bms8197
Copy link

bms8197 commented Oct 16, 2021

@maboloshi That's not working since the md5sum of that sublime_text binary (the original one downloaded from Sublime's website) is exactly the one in the exit line. So printf and dd commands are not actually executed. If I run them and patch the binary with those commands, the app crashes.

» md5sum sublime_text
b996ecd0cd2f60425b6b29d694dd9ab3  sublime_text

I've also tried with that bash patch using these patterns, same result, app crashes:

	0x92F32 E0 03 1F AA C0 03 5F D6
	0xF69744 1F 20 03 D5
	0xF69758 1F 20 03 D5
	0xFD8F38 C0 03 5F D6
	0xFD7AAC C0 03 5F D6
	0xF64DB8 C0 03 5F D6

@Destitute-Streetdwelling-Guttersnipe

@bms8197 oops, I didn't recognize that you want to patch ST4116 on Mac M1. All the patches of maboloshi only work on x64. The experimental patch for Mac M1 is only tested for ST4114.
If you want it so bad, you could follow leogx9r's guide to dissassemble. Maybe you'll be the first to find the patch for Mac M1.

@bms8197
Copy link

bms8197 commented Oct 16, 2021

@Destitute-Streetdwelling-Guttersnipe I'll give it a try although I have zero assembly knowledge so the chances that I'll manage to discover the working patterns are slim... But it worth to try. I don't want it so bad, atm I'm using v4114 but since all the other versions can be patched (Windows, Linux, MacOS (not arm)) it's a little bit frustrating not to have it patched on MaCOS M1.

@bms8197
Copy link

bms8197 commented Oct 16, 2021

I did my best but it beats me how to patch it. I tried to look at the v4114 patched binary. I've also downloaded v4117 supposedly cracked by TNT (but I didn't run it since I don't trust that site) but anyway I was looking at the binary trying to find a pattern. This assembly stuff is way over my knowledge. If anyone is able to patch v4118 for MacOS M1 please share, otherwise I'll just stick to v4114

@leogx9r
Copy link

leogx9r commented Oct 16, 2021

I know I said I wouldn't be doing this again but ... I had some spare time, decided to patch ARM64 again but for both Sublime Text and Sublime Merge this time. Below are the patched variants for both x64 and ARM64. I may have patched them wrong (as I've no way to test so verify yourselves). Yes you'll need to resign the file for it to work as expected on MacOS.

Sublime Text v4118 MacOS (x64 + ARM64)

These are the patched IDA offsets shown using a mapped base of 0x100000000 instead of a file offset for Mach-O ARM64. x64 offsets are in my above post.

image

Thumb Translations

1F 20 03 D5 = NOP
E0 03 1F AA = MOV X0, XZR
C0 03 5F D6 = RET X30

Get it here. Virus scan here.

Sublime Merge v2062 MacOS (x64 + ARM64)

These are the patched IDA offsets shown using a mapped base of 0x100000000 instead of a file offset for Mach-O ARM64. x64 offsets are in my above post. With this one, mov x0, xzr isn't correct since 281 is required to be the correct return value. mov x0, #281 instead works fine.

image

Yes, I realized I accidentally omitted the offsets here but the patched bytes and original bytes + the provided file should be enough for you to get them. Sorry about that.

Thumb Translations

1F 20 03 D5 = NOP
20 23 80 D2 = MOV X0, #0x119
C0 03 5F D6 = RET X30

Get it here. Virus scan here.

Maybe this time I'll actually not do this again. 😄

@bms8197
Copy link

bms8197 commented Oct 16, 2021

@leogx9r I do confirm that SublimeText dev build v4118 is working on MacOS M1. I haven't tried SublimeMerge yet, I'm not using it that much but I'll give it a try just out of curiosity. Thank you very much! You're the man!

LE: I do confirm that SublimeMerge dev build v2069 is also working and patched. Thank you again!

@maboloshi
Copy link
Author

@bms8197 For MacOS M1, it looks like both X64 and ARM64 need to be cracked to boot? I read that for the x64 and ARM64 parts of ST (I presume) are actually the same as what @leogx9r gives

@Destitute-Streetdwelling-Guttersnipe

@maboloshi ST for Mac uses "universal binary" which contains the applications for x64 and ARM64. Only the ARM64 part must be patched in order to run on Mac M1. But you can patch both if you want.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@leogx9r thanks for your patch. I do hope you still have some time to rest.

@maboloshi I compared the patched ST (from @leogx9r) with the original file and saw that the patch you proposed is correct. The only difference is that his file contains both the patches for x64 and ARM64. So, the patterns I gave you for 4114 still works with 4118.

Then why your patch failed on @bms8197's machine? Because you made a typo when you change your patcher's output to a nanny script. You wrote \x5 instead of \x5F in the patch for license check, and it crashed ST.

You should write patcher like I did. It's harder to make this kind of mistake.

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe I see, I made a very low-level mistake. 😅

Copy link

ghost commented Oct 18, 2021

@rainbowpigeon new pattern from @leogx9r your patch not working for latest dev build (4117, 4118)

@kepeto Updated :) Test it out and let me know if there are any problems!

@kepeto
Copy link

kepeto commented Oct 18, 2021

@rainbowpigeon new pattern from @leogx9r your patch not working for latest dev build (4117, 4118)

@kepeto Updated :) Test it out and let me know if there are any problems!

@rainbowpigeon i can confirm your latest patch update is working, thanks!

2021-10-18 18_23_08-Changelog

@kepeto
Copy link

kepeto commented Oct 23, 2021

@rainbowpigeon 4118 patch can be applied to 4119

image

Copy link

ghost commented Oct 25, 2021

@rainbowpigeon 4118 patch can be applied to 4119

👍

@Viterzgir
Copy link

4120?

@leogx9r
Copy link

leogx9r commented Oct 25, 2021

@Viterzgir same patterns work as before. Nothing's changed.

image
image
image

image

@Viterzgir
Copy link

thanks

for Linux build 4120

cd /opt/sublime_text || exit
md5sum -c <<<"d8c0a3fd11f6f0833074d791aaa61638 sublime_text" || exit
printf '\x48\x31\xC0\xC3' | dd of=sublime_text bs=1 seek=$((0x00375B56)) conv=notrunc
printf '\x90\x90\x90\x90\x90' | dd of=sublime_text bs=1 seek=$((0x0036BCA5)) conv=notrunc
printf '\x90\x90\x90\x90\x90' | dd of=sublime_text bs=1 seek=$((0x0036BCC0)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3' | dd of=sublime_text bs=1 seek=$((0x0037760B)) conv=notrunc
printf '\xC3' | dd of=sublime_text bs=1 seek=$((0x0037581A)) conv=notrunc
printf '\xC3' | dd of=sublime_text bs=1 seek=$((0x0035F950)) conv=notrunc

@maboloshi
Copy link
Author

@Viterzgir Your MD5 is inconsistent with sublime_text in the official website compression package sublime_text_build_4120_x64.tar.xz. Please help confirm the release

@Destitute-Streetdwelling-Guttersnipe

@maboloshi It looks like you changed the patch for Disable License Notify Thread from ret to ret 0, but only for MacOS. What happened on MacOS ?

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe I saw the cracked binary file provided by @leogx9r and I changed it. Probably other platforms are also applicable.

@Destitute-Streetdwelling-Guttersnipe

@maboloshi I think it still works the same as before.
When @leogx9r add the patch for Disable License Notify Thread, leogx9r said Simply return 0 here to disable.

If you looked carefully, you'd see I added two additional things, disabling the crash reporter (which sends telemetry back to the server, not something I personally like) and also disabled the "phoning home" method when a new license is entered. The phoning home method can potentially be used to detect you cracking the application (as it'll send invalid info, also containing your unique identifier) and you may get your IP blacklisted, hence I've decided to disable it entirely, I also recommend you guys do too, just in case. If you'd like the patterns for that:

# Sends the HWID, license Information the moment a license is entered to the server for logging.
# Most likely used to detect when a license key is shared across too many systems with differing HWIDs.
# Simply return 0 here to disable.
Sublime Text
    Windows x64 Pattern: `raw sig: 55 56 57 48 81 EC ? ? ? ? 48 8D AC 24 ? ? ? ? 0F 29 B5 ? ? ? ? 48 C7 85 ? ? ? ? ? ? ? ? 48 89 CF`
    Linux x64   Pattern: `raw sig: 41 56 53 48 81 EC ? ? ? ? 48 89 FB BF ? ? ? ? E8 ? ? ? ? 4C 8D B4 24 ? ? ? ?`
    MacOS x64   Pattern: `raw sig: 55 48 89 E5 53 48 81 EC ? ? ? ? 48 89 FB 48 8B 05 ? ? ? ? 48 8B 00 48 89 45 F0 48 8D 3D ? ? ? ?`

Sublime Merge
    Windows x64 Pattern: `raw sig: 55 56 57 48 81 EC ? ? ? ? 48 8D AC 24 ? ? ? ? 0F 29 B5 ? ? ? ?`
    Linux x64   Pattern: `raw sig: 41 56 53 48 81 EC ? ? ? ? 48 89 FB BF ? ? ? ?`
    MacOS x64   Pattern: `raw sig: 55 48 89 E5 53 48 81 EC ? ? ? ? 48 89 FB 48 8B 05 ? ? ? ? 48 8B 00 48 89 45 F0 48 8D 3D ? ? ? ?`

I asked leogx9r about return values, and the answer is that any value is acceptable, the return value isn't actually used (except the function for license checking)

@Destitute-Streetdwelling-Guttersnipe It does have the same effect. The function returns the value of pthread_join() or something similar. I didn't see Sublime Text/Merge use the return value but decided to have it return the proper value anyways for consistency (which upon research seems it required zero so I guess I documented that wrong).

The only function you really need to have a return value is for the license checking function, which requires zero always. The rest are basically optional. The return value isn't actually used (based on my reverse engineering) on the other functions.

Edit: On Windows it returns the value of CreateThread() which requires a non-zero value to indicate success. I originally patched this on Windows so I used the same method for Linux/MacOS -- they instead use pthread which requires a zero value to indicate success, so I guess that's where I got mixed up. So you should ideally return 1 on Windows (or any non-zero value) and 0 on Linux but it doesn't matter really since the value is never used.

Thus, leogx9r uses ret 0 all the time, while you use ret all the time. And it still works fine.

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Thank you for your answer, next update I will unify for ret

@maboloshi
Copy link
Author

maboloshi commented Oct 26, 2021

@leogx9r The invalidationFunction rule of ST-4121(linux) has changed, please help to check it.:blush:

Persistent License Check 1       | 0x0036BC85 | E8 0C BC 11 00       | 90 90 90 90 90

@bms8197
Copy link

bms8197 commented Oct 26, 2021

@legox9r: Trying on ST 4120 MacOS ARM with these patterns:

0x93242 E0 03 1F AA C0 03 5F D6
0x84C6 1F 20 03 D5
0x84E5 1F 20 03 D5
0x937DB C0 03 5F D6
0x92090 C0 03 5F D6
0x2637 C0 03 5F D6

Not quite sure what I'm doing wrong here since it keep saying the file is damaged. From your post, it's my understanding that 4120 for MacOS M1 can be patched in the exact same way as previous versions...

@maboloshi
Copy link
Author

@bms8197 Why use X64 offsetes and ARM64 patch code?

@JoveYu
Copy link

JoveYu commented Oct 27, 2021

sublime text 4121 Linux md5sum is wrong, but the patch is work well

@leogx9r
Copy link

leogx9r commented Oct 27, 2021

@maboloshi Apologies for the delay, was quite busy these past few days. Your offsets align with mine so all seems good. 👍

For the record in case people need them, here's the new patterns for Windows/Linux (x64) for the invalidation/validation functions that work on v4121:

    Linux x64 Pattern 1: `direct reference sig: (+0x5) BA ? ? ? ? E8 ? ? ? ? 49 8B B7 ? ? ? ?`
              Pattern 2: `raw sig: E8 ? ? ? ? BF ? ? ? ? E8 ? ? ? ? 83 25 ? ? ? ? ?`

    Windows x64 Pattern 1: `direct reference sig: (+0x6) 41 B8 ? ? ? ? E8 ? ? ? ? 49 8B 96 ? ? ? ?`
                Pattern 2: `raw sig: E8 ? ? ? ? E8 ? ? ? ? 4C 89 F1 E8 ? ? ? ?`

MacOS (x64) patterns remain the same.


@bms8197 Sorry, when I said "remains the same", I was referring to x64. I don't have my patcher wired up to work on MacOS so I've no idea if the same method would work. I'll see if I can get some free time to do MacOS ARM64 this weekend since it does take much more time to do it manually than automate it as I've done with x64, no promises though -- I'll have to see if I can fit in about 30 minutes.

@maboloshi
Copy link
Author

@bms8197 You can try it:(for 4121)

macOS (M1 ARM64) ↓

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-392942

# for MacOS (M1 ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
[ $(md5 sublime_text) = B78F54073437FDF71834D46DCEC72700 ] || exit
printf '\xE0\x03\x1F\xAA\xC0\x03\x5F\xD6' | dd of=sublime_text bs=1 seek=$((0x00FCA6F8)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5C160)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5C174)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCB7D8)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCA388)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00F577E4)) conv=notrunc

@cybranker
Copy link

Does the crack for sublime merge 2063 work?

@maboloshi
Copy link
Author

@cybranker Updated

@bms8197
Copy link

bms8197 commented Oct 27, 2021

@maboloshi I do confirm that the patch works for MacOS M1 ARM64 for ST 4121. My bad, I was trying with 4120. You need to sign the app after patching in order to work:
codesign --force --deep --sign - ~/Downloads/Sublime\ Text.app

Thank you!

@maboloshi
Copy link
Author

@bms8197 Can you help to try the ARM64 patch for SM2063. 😊

@bms8197
Copy link

bms8197 commented Oct 27, 2021

@maboloshi Applied, it's working. SM 2063 is patched!

@bms8197
Copy link

bms8197 commented Oct 27, 2021

@maboloshi Just one quick note for SM2063:

bogdan@iMac ~/D/S/C/MacOS> md5 sublime_merge 
MD5 (sublime_merge) = d578f6d65f9470f84e1d6724277e6820

I believe it will just exit. If you remove the md5 line and apply the patch, it's working just fine.

@andhika96
Copy link

andhika96 commented Oct 27, 2021

Hy guys, you can use my file for Sublime Text 4 Build 4121, just download and replace to your Sublime Text folder.

Here is the link: https://drive.google.com/file/d/1l4wqjLUR4GVMo_RpjOFSwwb9vJbHwEo_/view?usp=sharing

*Work on Windows 11

Screenshot:

image

@amanayon
Copy link

amanayon commented Oct 27, 2021

Please help. I'm using Ubuntu 18.04.6 LTS.
I'm getting permission denied
image
image

@amanayon
Copy link

Please help. I'm using Ubuntu 18.04.6 LTS. I'm getting permission denied image image

I was able to make this work, by copying the sublime_text file to a Windows10, and run the script. Moved it back to Linux, and it's now working.

Thanks

@Viterzgir
Copy link

Viterzgir commented Oct 27, 2021

Please help. I'm using Ubuntu 18.04.6 LTS. I'm getting permission denied

use sudo

@amanayon
Copy link

amanayon commented Oct 28, 2021 via email

@Destitute-Streetdwelling-Guttersnipe
Copy link

@leogx9r 2 patterns (blacklist check and license recheck) for ST in Windows are the same for the previous stable version. I use regex, so my pattern that works with all ST versions:

For example: reghex="(?<= 41 B8 . . . . ) E8 . . . . (48|49) . .", fix=nop5 can be used to patch the invalidate1 call for both dev and stable versions of ST (48 for dev, 49 for stable), the offset to E8 is described by the lookahead (?<= 41 B8 . . . . ).
Another example: reghex="(?<= E8 ) . . . .", patch=ret0, is_ref=True can be used to patch the license_check call without the need to analyze the instruction length of Call (E8).

UPDATE: I edited to specify 2 patterns (blacklist check and license recheck), not all patterns

@leogx9r
Copy link

leogx9r commented Oct 31, 2021

@Destitute-Streetdwelling-Guttersnipe Yea, I'm just a bit too lazy to rewrite my script to use regex instead 🤣

@leogx9r
Copy link

leogx9r commented Nov 4, 2021

Sublime Text v4122 Crack

Patterns for validation/invalidation functions (Windows & Linux) have reverted so you can use the old ones (preferably using regex as @Destitute-Streetdwelling-Guttersnipe pointed out). Here's the offsets:

Windows (x64 Only)

image

Linux (x64 Only)

image

MacOS (x64 Only)

image

Proof

image

@Destitute-Streetdwelling-Guttersnipe

Thanks, @leogx9r . You're so fast. I guess maboloshi is either sleepy or busy.

And I saw you mentioned 5 patterns for checking license and you commented on 3 of them. How about the 3rd and 4th patterns? Are they used to check on start-up?

Patterns have changed again for isValidLicense. Here's 5 different patterns you can use in case one stops working:

`direct reference sig: (+0x3) 45 31 C9 E8 ? ? ? ? 85 C0 75 15 `         // These two invalidation/validation function references
`direct reference sig: (+0x3) 45 31 C9 E8 ? ? ? ? 85 C0 75 0D`          // Same as above.
`direct reference sig: (+0x4) 48 8D 4D 40 E8 ? ? ? ? 48 8B 4E 10`
`direct reference sig: (+0x3) 48 89 F9 E8 ? ? ? ? 48 8B 4E 10 85 C0`
`direct reference sig: (+0x4) 4C 8D 4D 54 E8 ? ? ? ?`                   // Performed on license entering to check validity.

@leogx9r
Copy link

leogx9r commented Nov 5, 2021

@Destitute-Streetdwelling-Guttersnipe The other two calls are done when the program starts where it checks the saved license file and validates it. Haven't fully reverse-engineered exactly what's being done though but they are done as part of async callbacks.

@jowinjohnchemban
Copy link

Hy guys, you can use my file for Sublime Text 4 Build 4121, just download and replace to your Sublime Text folder.

Here is the link: https://drive.google.com/file/d/1l4wqjLUR4GVMo_RpjOFSwwb9vJbHwEo_/view?usp=sharing

*Work on Windows 11

Screenshot:

image

Thank you @andhika96 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3941342

image

Replace following, [PREFERRED]

0000711A: E8 > 90
0000711B: 55 > 90
0000711C: 1E > 90
0000711D: 20 > 90
0000711E: 00 > 90

000A84E3: 55 > 48
000A84E4: 56 > 31
000A84E5: 57 > C0

000A84E7: 83 > FF
000A84E8: EC > C0
000A84E9: 30 > C3

OR
Search and replace following (make sure replace at the correct positions),

E8 55 1E 20 00  >  90 90 90 90 90
55 56 57  >  48 31 C0
83 EC 30  >  FF C0 C3

Tool used,
https://hexed.it/

@bms8197
Copy link

bms8197 commented Nov 8, 2021

For MacOS M1 (ARM), the following patch works for ST build 4122:

printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5F8D0)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5F8E4)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCF124)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCDCD8)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00F5AF50)) conv=notrunc

@Destitute-Streetdwelling-Guttersnipe
Copy link

Thanks, @leogx9r . Looking around these 5 patterns, I discovered that function unregister (called by blacklist check and license recheck) is very short: only 1 instruction. I think it's too simple to change in future versions. Here's my patch:

Fix(name="unregister", reghex="C6 41 05 00  C3", patch=ret) # for windows
Fix(name="unregister", reghex="C6 47 05 00  C3", patch=ret) # for linux
Fix(name="unregister", reghex="55  48 89 E5  C6 47 05 00  5D  C3", patch=ret) # for mac
Fix(name="license_server", reghex="license\.sublimehq\.com", patch=b"license.localhost.\x00\x00\x00".hex(' ')) # block server checks

This is not as simple as the famous patch 97 94 0D, but allow any valid license to be used.

UPDATED: Sorry, this patch is USELESS. You need a valid license, not just any expired/blacklisted/invalid license. But when you have a valid license, you don't need this patch anymore.

@STSMHQ
Copy link

STSMHQ commented Nov 10, 2021

Hi, @Destitute-Streetdwelling-Guttersnipe

Do u know any simple patch like the 97 94 0D but for Sublime Merge?

Thanks in advance.

@branchus
Copy link

branchus commented Nov 12, 2021

I used the script for Apple ARM (sublime text 4122)

I found a strange issue, it doesn't save the workspace, I have some opened folder and files. after reopen, all these disappeared.

@Destitute-Streetdwelling-Guttersnipe

@STSMHQ AFAIK, there's no simple patch for SM like 97 94 0D for ST.
And 97 94 0D doesn't work anymore in ST 4121. But you can use EB 98 11 instead (with the "sgbteam" license for ST)

@monglung
Copy link

Sublime Text v4122 Crack

Patterns for validation/invalidation functions (Windows & Linux) have reverted so you can use the old ones (preferably using regex as @Destitute-Streetdwelling-Guttersnipe pointed out). Here's the offsets:

Windows (x64 Only)

image

Linux (x64 Only)

image

MacOS (x64 Only)

image

Proof

image

Hi, @leogx9r I see that you posted for ST 4120 and 4122... missing 4121... would you post 4121 (linux)... thanks...

@maboloshi
Copy link
Author

@monglung Review history ST 4121

@STSMHQ
Copy link

STSMHQ commented Nov 16, 2021

@Destitute-Streetdwelling-Guttersnipe I see. Thanks for the answer :3

Keep your hard work in your reghex_patcher project.

@monglung
Copy link

@maboloshi Thanks... work perfectly...

@pawel-dabek
Copy link

For me it says Sublime Text.app quit unexpectedly when trying to open it after patching. I have Sublime Text 4121 and don't know what I might have done wrong. I have ran all printf commands in terminal.
image
image

@maboloshi
Copy link
Author

@paweuek Please try, re-sign the application.

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

Requires Apple Command Line Tools to be installed

@pawel-dabek
Copy link

I tried it and it runs but it is still unregistered. I also tried the 4122 and it still asks for licence.

What i did precisely:
Downloaded Sublime Text.app 4121 and moved it to Applications
Then I ran this command in terminal.app:
cd "/Applications/Sublime Text.app/Contents/MacOS/"
Then I ran this command in terminal.app:

printf '\xE0\x03\x1F\xAA\xC0\x03\x5F\xD6' | dd of=sublime_text bs=1 seek=$((0x00FCA6F8)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5C160)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5C174)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCB7D8)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCA388)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00F577E4)) conv=notrunc"

Then I ran this command in terminal.app:
codesign --force --deep --sign - "/Applications/Sublime Text.app"

And then I opened sublime text and it told me it is not trusted so I had to accept opening it in Security&Privacy in Settings.
v4121 - it still says unregistered
v4122 - asks for licence key anyways

@maboloshi please help me, I ca't find anything what I did wrong

@bms8197
Copy link

bms8197 commented Nov 22, 2021

@paweuek for v4122, go to "Enter License" and just enter your name there and click Register. It should work after that. Same goes for SM 2063.

@pawel-dabek
Copy link

pawel-dabek commented Nov 22, 2021

Wow, that worked. Thank you @bms8197 and @maboloshi so much!

Edit:
Wait, so when I had unregistered on 4121 I just had to enter licence and write anything?

@bms8197
Copy link

bms8197 commented Nov 22, 2021

@paweuek no problem! I'm glad it worked! Thank you @maboloshi as well!

@maboloshi
Copy link
Author

@bms8197 @paweuek In fact, the one you should be most grateful for is @leogx9r. ☺️

@bms8197
Copy link

bms8197 commented Nov 23, 2021

That is correct indeed! So than you @leogx9r!

@leogx9r
Copy link

leogx9r commented Nov 24, 2021

lol No problem guys :)

@plakhin
Copy link

plakhin commented Nov 26, 2021

I'm on macOS Monterey, MacBook Air M1.
Both, Sublime Text 4121 and Sublime Merge 2063, have md5 for MacOS Platform, not MacOS (M1 ARM64).
However, Activity Monitor shows "Apple" kind for both apps, not "Intel"
Also, non of patches worked for me, either for ST or SM, MacOS or MacOS (M1 ARM64).

What am I doing wrong?

@bms8197
Copy link

bms8197 commented Nov 26, 2021

I'm running Monterey on an iMac M1 so both apps show as Apple (since they run on ARM cpu not Intel). Not sure what you're not doing right. If you follow the thread you will see how to patch. Latest ST version would be 4122 and for SM is 2063. I can provide the binaries if you like, the ones that I'm using

@plakhin
Copy link

plakhin commented Nov 28, 2021

@bms8197 SM2063 example (same with ST 4122 & 4123):

stan@mba MacOS % pwd
/Applications/Sublime Merge.app/Contents/MacOS
stan@mba MacOS % md5 sublime_merge
MD5 (sublime_merge) = d578f6d65f9470f84e1d6724277e6820
stan@mba MacOS % printf '\x20\x23\x80\xD2\xC0\x03\x5F\xD6' | dd of=sublime_merge bs=1 seek=$((0x013F14DC)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_merge bs=1 seek=$((0x013F2BDC)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_merge bs=1 seek=$((0x013F2BF0)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x013F1FA4)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x013F1230)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x013EFFC8)) conv=notrunc
8+0 records in
8+0 records out
8 bytes transferred in 0.000057 secs (140395 bytes/sec)
4+0 records in
4+0 records out
4 bytes transferred in 0.000032 secs (124276 bytes/sec)
4+0 records in
4+0 records out
4 bytes transferred in 0.000033 secs (120699 bytes/sec)
4+0 records in
4+0 records out
4 bytes transferred in 0.000030 secs (134218 bytes/sec)
4+0 records in
4+0 records out
4 bytes transferred in 0.000034 secs (118149 bytes/sec)
4+0 records in
4+0 records out
4 bytes transferred in 0.000032 secs (124276 bytes/sec)
stan@mba MacOS % codesign --force --deep --sign - "/Applications/Sublime Merge.app"
/Applications/Sublime Merge.app: replacing existing signature
stan@mba MacOS %

Still shows UNREGISTERED

@maboloshi
Copy link
Author

@plakhin You still need to enter a license, but it accepts arbitrary characters

@plakhin
Copy link

plakhin commented Nov 28, 2021

@maboloshi I've tried, but that didn't work. Just entered few symbols, it showed wrong license...

@plakhin
Copy link

plakhin commented Nov 28, 2021

Just tried again and entered Sublime Merge as a License. Worked fine. Will try ST later. Thanks!

@MohamedElashri
Copy link

For Mac ARM64. Instead of disable gatekeeper completely after applying the patches, The best way to make the apps (Text and merge) work is to force sign them individually.

For Sublime Text

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

For Sublime Merge

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

Enjoy!

Thank you guys for this work

@vampirepapi
Copy link

im newbie ubuntu user i was able to crack sublime in windows but in ubuntu i dont know how this thing work?
can anyone please give me guide how can i crack this in ubuntu?

md5sum -c <<<"FD64BBD3575DD5D99553F030998659CC sublime_text" || exit
when i run this in terminal it shows validation check failed.. please help

@vampirepapi
Copy link

@leogx9r bro i need you help for cracking sublime text for ubuntu please

@aliazhar-id
Copy link

@vampirepapi are you using sublime text version 4122?

@vampirepapi
Copy link

@aliazhar-id yes bro!! do you know how to crack build 4122???

@vampirepapi
Copy link

sublime_text: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
exit
[vampirepapi@vampirepapi ~]$ 

@leogx9r @aliazhar-id @maboloshi please help guys

@vampirepapi
Copy link

Screenshot from 2021-12-07 16-56-51

bro now everything patched but whenever i open sublime text it automatically gets closed
@leogx9r

@aliazhar-id
Copy link

@vampirepapi the script above is for version 4123 which is the dev version, so you can't use it on version 4121

try reinstalling the sublime text, then do it again with this script, this for version 4121

cd /opt/sublime_text || exit
md5sum -c <<<"D3343AD6D13F816F1F9414223B8BE091  sublime_text" || exit
printf '\x48\x31\xC0\xC3'                 | dd of=sublime_text bs=1 seek=$((0x00375A48)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x0036BC85)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x0036BC9B)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_text bs=1 seek=$((0x003774CB)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x0037570C)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x0035F930)) conv=notrunc

@vampirepapi
Copy link

vampirepapi commented Dec 8, 2021

@aliazhar-id bro i tried this script on version 4121 too the application gets patched successfully but the problem is that whenever i open sublime text it automatically gets closed.
[Update:] removed sublime-text and its all .config files from home and tried the patch with sudo guess what it worked. Thanks @aliazhar-id <3

@aliazhar-id
Copy link

good, you're welcome :)

@STSMHQ
Copy link

STSMHQ commented Dec 12, 2021

@maboloshi Can u update the SM crack to the latest dev version, please?

@maboloshi
Copy link
Author

@STSMHQ Has been updated, but M1 is invalid

@STSMHQ
Copy link

STSMHQ commented Dec 13, 2021

@maboloshi Thanks, one more time. You're awesome. Good end of the year to you!

@bms8197
Copy link

bms8197 commented Dec 14, 2021

@maboloshi: It's not working, at least in my case. The patch is applied successfully, then I'm using the codesign command which also works. When I try to open SM it asks for permissions, I've granted that. Settings -> Security and use the 'Open Anyway' for SM but after that, nothing happens when you try to open SM app. So no, it's not working.

@sharunkumar
Copy link

new version in sublime merge:
image

@leogx9r
Copy link

leogx9r commented Dec 17, 2021

Till maboloshi updates this gist, here's just the Linux versions for Sublime Text v4125 and Sublime Merge v2067. (No time to download the others for Windows/MacOS).

image
image

@vampirepapi
Copy link

@leogx9r bro is this a script? could you please provide me the above script?

@bms8197
Copy link

bms8197 commented Dec 17, 2021

@leogx9r any clues about which are the correct patterns for SM 2067 for MacOS ARM M1? I did some tests with the ones provided by @ maboloshi but apparently the initial check pattern is not correct

@maboloshi
Copy link
Author

@bms8197 It is possible that SM 2067 for MacOS ARM M1 has been restored to its original patterns. Can you help test it?

@bms8197
Copy link

bms8197 commented Dec 18, 2021

@maboloshi and the original patterns are?

@hyuma78
Copy link

hyuma78 commented Dec 20, 2021

Works perfect on ubuntu 21.10 and dev 4125

https://i.imgur.com/WkZ8Tma.png

@bms8197
Copy link

bms8197 commented Dec 28, 2021

Just a confirmation that the patches work just fine for ST 4126 and SM 2068 for MacOS ARM M1:

For ST 4126

printf '\xE0\x03\x1F\xAA\xC0\x03\x5F\xD6' | dd of=sublime_text bs=1 seek=$((0x00FF47B0)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F85B3C)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F85B50)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FF589C)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FF4444)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00F811B8)) conv=notrunc

For SM 2068:

printf '\x20\x23\x80\xD2\xC0\x03\x5F\xD6' | dd of=sublime_merge bs=1 seek=$((0x0143121C)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_merge bs=1 seek=$((0x0143294C)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_merge bs=1 seek=$((0x01432960)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x01431D08)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x01430F70)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x0142FD1C)) conv=notrunc

Thank you guys!

@STSMHQ
Copy link

STSMHQ commented Dec 31, 2021

@maboloshi A question.. are u able to crack GitKraken as well?

@monglung
Copy link

monglung commented Jan 1, 2022

Ok... I wrote a little program for windows (x64).... that can patch the current sublime text and sublime merge... ST 4126 AND SM 2068.. Here is the link: https://www.mediafire.com/file/9cmhynm1so61tg7/slp.rar/file

Signature for the file (SHA-256): 89f58632c2f1fc2e31025a26f61c777556657da8babae4682c00f17ce7c8101a

Before patching, it will make a copy of the file... (Remember to run as admin)....

Any suggestions will be appreciated...

@MohamedElashri
Copy link

@monglung
You should just share the source and instructions to run from that source. Don't just send some binary.

@Destitute-Streetdwelling-Guttersnipe

@STSMHQ you can find it by looking for repo GitCracken in github. I don't use it because I prefer Sublime Merge.

@leogx9r I think you made a mistake when you said "Application tries to validate an invalid license every 5 seconds". I put ST in a debugger and it looks like the check invalid license and recheck current license are called after 5 seconds and 15 seconds, but they are called only once, not every 5 seconds and 15 seconds. With ST for mac, I saw the function "work_queue::push_delayed" is used to start these checks. It's also used to show success/failure messages after the license check.

@STSMHQ
Copy link

STSMHQ commented Jan 6, 2022

@Destitute-Streetdwelling-Guttersnipe I'm using SM too, but SM doesn't support reflog tree yet. I was using those repos, but the mains ones were taken down by a DMCA action. Now, none of those who are still live work.

@LunaDoll
Copy link

LunaDoll commented Jan 8, 2022

Hi Hi,

I wrote these commands separately and they worked for me (ST 4126):

printf '\x48\x31\xC0\xC3'                 | dd.exe of=sublime_text.exe bs=1 seek=684564 conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd.exe of=sublime_text.exe bs=1 seek=28954  conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd.exe of=sublime_text.exe bs=1 seek=28979  conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd.exe of=sublime_text.exe bs=1 seek=691539 conv=notrunc
printf '\xC3'                             | dd.exe of=sublime_text.exe bs=1 seek=683791 conv=notrunc
printf '\xC3'                             | dd.exe of=sublime_text.exe bs=1 seek=1024   conv=notrunc

But these commands didn't work for me in setup.bat why?
https://i.imgur.com/aMyyQEy.png
https://i.imgur.com/khGFKXi.png

PS: @jowinjohnchemban @leogx9r
Hello Masters,

Could you please provide hex code modifications to turn off activation and telemetry authentication (I can't use hosts file)?

0.0.0.0 sublimetext.com
0.0.0.0 license.sublimehq.com
0.0.0.0 45.55.255.55 #sublimetext
0.0.0.0 45.55.41.223 #sublimetext

@CodigoCristo
Copy link

@monglung is java ? Can I read the source code?

@monglung
Copy link

@CodigoCristo it's C++ ....

@CodigoCristo
Copy link

CodigoCristo commented Jan 12, 2022

I used @leogx9r method to patch, it works! for WINDOWS - LINUX X86 - MAC
https://github.com/CodigoCristo/sublimepatch

It is written in C

image

image

image

@monglung
Copy link

Mine is similar to you... but it has a GUI... both for Linux and Windows.... (I don't have a Mac.... )... with mine, you can patch older versions... I am thinking... add features to let user input... addresses for future version...
image

Both Linux and Windows have the same GUI look...

@n6333373
Copy link

n6333373 commented Jan 12, 2022

Just share an idea: a ST/SM patcher as a Sublime Text plugin 😉

  • auto cross-platform
  • no dependency
  • no need to compile
demo.mp4

@CodigoCristo
Copy link

@monglung
Share the source code, what libraries do you use?
Share the binary for linux ...

@CodigoCristo
Copy link

CodigoCristo commented Jan 13, 2022

For windows patch Sublime text 4126 and Sublime merge 2068

https://github.com/CodigoCristo/sublimepatch/

https://www.youtube.com/watch?v=wi6_sxJiJ0s

Alt text

@CodigoCristo
Copy link

For Linux patch Sublime text 4126 and Sublime merge 2068

https://github.com/CodigoCristo/sublimepatch/

https://www.youtube.com/watch?v=8gd6A-5e9Ik

Alt text

@Destitute-Streetdwelling-Guttersnipe

Wow, lots of screenshots and videos. Let me share what I'm working on.
image
This tool helped me patch all versions of ST/SM on all OS and CPU (thanks to @leogx9r).
I already shared the code, but not the patterns (so don't ask).

@Destitute-Streetdwelling-Guttersnipe

@STSMHQ if you search for GitCracken in github.com, you'll see top results are good enough for version 8.x
Or you view the reflog tree with Git Graph in vscode.

@CodigoCristo
Copy link

@monglung
Copy link

monglung commented Jan 14, 2022

@CodigoCristo I use The nana library for the GUI and OpenSSL for the checksum. That's why I don't post the code. It's a lot of work... compiling nana and OpenSSL before you can compile my code. As for the binaries, I see that most would not trust unknown binaries (I understand that), so I stop post them. Still, if you still want the binaries, I will post them.

@STSMHQ
Copy link

STSMHQ commented Jan 14, 2022

@CodigoCristo
Copy link

@monglung If you do not publish the source code it is obvious that people distrust, better publish the code to read that this is fine

@LunaDoll
Copy link

LunaDoll commented Jan 16, 2022

@monglung Hi, are you sure outbound license verifications are blocked?

I still see ST requesting a connection: https://i.imgur.com/PDEdBAx.png
(Use: slp.exe)

@monglung
Copy link

@LunaDoll my patch is based on works by leogx9r... so I don't check about those out-of-bound connection requests.... but so far all of my files (resulted from the patch) are working perfectly... (I have tested on 4 different windows and 4 linux installations)...

@leogx9r
Copy link

leogx9r commented Jan 18, 2022

My patches block telemetry related HTTP(s) requests, not other things like update checks (as I still like seeing when an update is available). @LunaDoll

@STSMHQ
Copy link

STSMHQ commented Mar 17, 2022

@maboloshi Please update SM to version 2069.

@n6333373
Copy link

n6333373 commented Mar 17, 2022

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

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

@maboloshi
Copy link
Author

@STSMHQ Updated.
@n6333373 @Destitute-Streetdwelling-Guttersnipe The license check pattern of SM 2069 has been synchronized with ST (except for macOS (M1 ARM64)).

@Destitute-Streetdwelling-Guttersnipe

Thanks, @leogx9r . Looking around these 5 patterns, I discovered that function unregister (called by blacklist check and license recheck) is very short: only 1 instruction. I think it's too simple to change in future versions. Here's my patch:

Fix(name="unregister", reghex="C6 41 05 00  C3", patch=ret) # for windows
Fix(name="unregister", reghex="C6 47 05 00  C3", patch=ret) # for linux
Fix(name="unregister", reghex="55  48 89 E5  C6 47 05 00  5D  C3", patch=ret) # for mac
Fix(name="license_server", reghex="license\.sublimehq\.com", patch=b"license.localhost.\x00\x00\x00".hex(' ')) # block server checks

This is not as simple as the famous patch 97 94 0D, but allow any valid license to be used.

UPDATED: Sorry, this patch is USELESS. You need a valid license, not just any expired/blacklisted/invalid license. But when you have a valid license, you don't need this patch anymore.

Looking back at this patch, I realize that it's not useless. It can be used for a blacklisted valid license, such as the infamous TwitterInc license (97 94 0D)

@Destitute-Streetdwelling-Guttersnipe

@leogx9r I think you made a mistake when you said "Application tries to validate an invalid license every 5 seconds". I put ST in a debugger and it looks like the check invalid license and recheck current license are called after 5 seconds and 15 seconds, but they are called only once, not every 5 seconds and 15 seconds. With ST for mac, I saw the function "work_queue::push_delayed" is used to start these checks. It's also used to show success/failure messages after the license check.

Hey @leogx9r , do you have a chance to look at this remark?

@STSMHQ
Copy link

STSMHQ commented Mar 18, 2022

@leogx9r
Copy link

leogx9r commented Mar 21, 2022

Hey @leogx9r , do you have a chance to look at this remark?

@Destitute-Streetdwelling-Guttersnipe Yep, you're right. It only spawns a delayed execution of those routines after the 5/15 second mark from the initialization code being executed. So a more apt description would be "Application tries to validate an invalid license 5 seconds after startup." and so on.

@Destitute-Streetdwelling-Guttersnipe

@maboloshi wake up, Neo. Congratulation on revision 100, but don't rest on your laurels. ST 4131 was out. Let's roll.

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Thanks for the reminder, I forgot to sync the local update before. Now it's updated.:satisfied:

@Darthagnon
Copy link

Darthagnon commented Apr 11, 2022

Does the Sublime Merge patch include blocking the update nags? Highly desirable as an optional patch. e.g. I'm sticking to Sublime Text 3 (final version) and without patches to block the update nag, it would be unusable.

@monglung
Copy link

Both the patches (sublime text and sublime merge) do block the update nag.

@Darthagnon
Copy link

Nice! Thank you!

@plakhin
Copy link

plakhin commented Apr 25, 2022

macOS (M1 ARM64), Build 2071
All goes well, however SM says it is not registered.
Trying to enter license - if I don't enter anything and click "Use License" nothing changes, in case I enter any string as a license - "Use License" click simply doesn't work. I mean absolutely nothing happens after click. Before patching it was giving invalid license error.

Before patch:
MD5 (sublime_merge) = 07492b244ae4e8ee083c24b6b1fe82cd

After patch:
MD5 (sublime_merge) = 62fd71c8cf80e4a0a9adb482bbc92213

@monglung
Copy link

I now have update my patch program run both in linux and windows (both 64-bit only). sublime_patch. It can patch up to the latest... ST 4131 and SM 2071. This program has the same GUI either in Linux or Windows.
For those of you prefer to build yourself, I now also include the "simplified" source code (does not have a GUI). You can compile under both Linux and Windows. (It's better if you use CMake). Anyway, here is the source code: slp_console.

@plakhin
Copy link

plakhin commented Apr 25, 2022

After patch:
MD5 (sublime_merge) = 97812511F4B356D626DBA980DE7F1296

Hm... I'm getting:
MD5 (sublime_merge) = 62fd71c8cf80e4a0a9adb482bbc92213

@plakhin
Copy link

plakhin commented Apr 25, 2022

Okay, I've ran the script manually line by line and got MD5 (sublime_merge) = 97812511F4B356D626DBA980DE7F1296

However, nothing changed...

if I don't enter anything and click "Use License" nothing changes, in case I enter any string as a license - "Use License" click simply doesn't work. I mean absolutely nothing happens after click.

@plakhin
Copy link

plakhin commented Apr 25, 2022

Build 2071 Linux and Win64 patches work fine

@plakhin
Copy link

plakhin commented Apr 29, 2022

Finally I've got MD5 (sublime_merge) = 97812511F4B356D626DBA980DE7F1296
However, still cannot enter a license.

@plakhin
Copy link

plakhin commented May 3, 2022

Got this today:
image

Windows 10 x64, Build 2071, patch applied

@maboloshi
Copy link
Author

maboloshi commented May 11, 2022

@plakhin Can you help to test whether sm2072 (macOS M1 ARM64) is valid?

@plakhin
Copy link

plakhin commented May 11, 2022

@plakhin
Copy link

plakhin commented May 11, 2022

Ups, sorry, missed there's a new one for build 2072, will check later

@bms8197
Copy link

bms8197 commented May 11, 2022

@maboloshi The crack for SM2072 (MacOS M1 ARM64) is valid. I just updated my SM from 2067 to 2072 and it works just fine. I was not able to make it work for SM2071 though but I'll just use 2072. Thanks!

@maboloshi
Copy link
Author

The fact that both SM2070 and SM2071 are not valid for macOS M1 ARM64.

@plakhin
Copy link

plakhin commented May 11, 2022

Yes, 2072 is valid and stable 2071 is unfortunately not.

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

@monglung
Copy link

Ok.. I have update my patch to the latest versions... SM 2072... refer to this link.

The sha256 sum for sublime_patch.7z is a385ed5941314943c02628488856e857122502f014b208ae1139f2c4de59e02d and for slp_console.7z is 28b16bb9ed95dc54666a17e97fc0785e1bd6a5ed3a3f927879f4cfec9f9e0d50

@Destitute-Streetdwelling-Guttersnipe
Copy link

@maboloshi You can use xxd (also from Git for Windows) to simplify the patch script:

echo 0FF5E7: 90 90 90 90 90 | xxd -r - sublimetext
echo 0FF5E7: C3             | xxd -r - sublimetext

echo 0FF5E7 90 90 90 90 90 | xxd -r - sublimetext
echo 0FF5E7 C3             | xxd -r - sublimetext

@maboloshi
Copy link
Author

@Destitute-Streetdwelling-Guttersnipe Thanks, This time change to the new command format.

@Destitute-Streetdwelling-Guttersnipe

@maboloshi You don't have to download md5sum for Windows, certutil can do that:
certutil -hashfile sublimetext md5 | find "md5_hash_string" || exit

@maboloshi
Copy link
Author

@maboloshi You don't have to download md5sum for Windows, certutil can do that: certutil -hashfile sublimetext md5 | find "md5_hash_string" || exit

certutil can't output MD5 in uppercase format. It may be easy to forget to convert to lowercase letters when maintaining.

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

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