Skip to content

Instantly share code, notes, and snippets.

@deyixtan
Last active July 26, 2024 10:35
Show Gist options
  • Save deyixtan/6822b66ad7792ab2580ba37c450ae79c to your computer and use it in GitHub Desktop.
Save deyixtan/6822b66ad7792ab2580ba37c450ae79c to your computer and use it in GitHub Desktop.
Sublime Text Patching Guide

Automated Patching

Download slt.py python script (supports multiple build) from this repository.

Usage

python slt.py <"sublime_text file path">


Manual Patching

Download already patched executable or perform hex edit with the information shown below.

Build 3176

Windows 32-bit

Name Offset Original Patched
Persistent License Check 0x267CA 0x00 0x01
Initial License Check 0x26C4F 0x38 0x08
0x26C50 0x00 0x01
Software Update Prompt 0x50AFA 0x55 0xC3

Windows 64-bit

Name Offset Original Patched
Persistent License Check 0x3985A 0x00 0x01
Initial License Check 0x3A073 0x38 0x08
0x3A074 0x00 0x01
Software Update Prompt 0x792FB 0x57 0xC3

Linux 32-bit

Name Offset Original Patched
Persistent License Check 0xD779 0x00 0x01
Initial License Check 0xC068 0x38 0x08
0xC069 0x00 0x01
Software Update Prompt 0x482C5 0x83 0xC3
0x482C6 0xEC 0x90
0x482C7 0x0C 0x90

Linux 64-bit

Name Offset Original Patched
Persistent License Check 0xEB83 0x00 0x01
Initial License Check 0xD538 0x38 0x08
0xD539 0x00 0x01
Software Update Prompt 0x460B5 0x53 0xC3

Copy link

ghost commented Apr 13, 2019

Cracking guide for Sublime Text 3.2.1 (3207) and Sublime Merge (1111)

Updated #12 (20190412)

The patch will show the license key for Sublime Text/Merge!

After the patch and enter the license key, the program is fully functional.
Instead of "Free World User" you can enter your name or any text.

One license key for Sublime Text/Merge!

Sources:

User URL
cipherhater Cracking guide for Sublime Text/Merge

Read the guide, run the script, enjoy ... :)


Cracking guide for VueScan 9 x64 (v9.6.38)

Sources:

User URL
cipherhater Cracking guide for VueScan 9.6.38

Read the guide, run the script, enjoy ... :)


"We do not pay for programs that you do not know how to protect..." © CipherHater

@nazares
Copy link

nazares commented Apr 13, 2019

Version Platform Offset Original Cracking
3207 macOS 0x6234B 55 C3
0x62061 55 C3
0xDAC5B 55 48 89 E5 41 57 41 56 48 C7 C0 01 00 00 00 C3
printf '\xc3' | dd seek=$((0x6234b)) conv=notrunc bs=1 of=/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text
printf '\xc3' | dd seek=$((0x62061)) conv=notrunc bs=1 of=/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text
printf '\x48\xc7\xc0\x01\x00\x00\x00\xc3' | dd seek=$((0xdac5b)) conv=notrunc bs=1 of=/Applications/Sublime\ Text.app/Contents/MacOS/Sublime\ Text

Copy link

ghost commented Apr 15, 2019

Wx64 Use 0x4D6404: 0x55 to 0xC3 for disabling entire update checks, not just the messages.

@hjjiang
Copy link

hjjiang commented Apr 17, 2019

https://gist.github.com/deyixtan/6822b66ad7792ab2580ba37c450ae79c#gistcomment-2888589

thanks @nazares, you u happen to also have the values for sublime merge?

Copy link

ghost commented Apr 20, 2019

@hjjiang He doesn't, at least not from his own work, because he didn't even find those ST3 values himself.

@nazares You're welcome. ;)

Copy link

ghost commented Oct 2, 2019

Build 3211
Windows 64-bit

Name Offset Original Patched
Initial License Check 0x8545 0x84 0x85
Persistent License Check 0x1932C7 0x75 0x74
Help Menu 0x?? 0x?? 0x??

Copy link

ghost commented Oct 3, 2019

Build 3211
Windows 64-bit

Name Offset Original Patched
Initial License Check 0x8545 0x84 0x85
Popup Nag 0x08FF19 0x75 0xEB
Title Bar 0x1932C7 0x75 0x74

@hjjiang
Copy link

hjjiang commented Oct 8, 2019

any chance if somebody can patch the macOs version?

@Amenobiss
Copy link

Sublime Text 3 - build 3207 - Linux x64

sha1 sublime_text: e89057bc8cd5e0d1ea3927ab37fff476bed12ea7

Description Offset Original Patched
Initial License Check 0x3c03dc 0x84 0x85
Persistent License Check 0x4797a0 0x75 0x74
Purchase License Nag 0x31d180 0x75 0x74

printf '\x85' | dd seek=$((0x3c03dc)) conv=notrunc bs=1 of=/opt/sublime_text_3/sublime_text
printf '\x74' | dd seek=$((0x4797a0)) conv=notrunc bs=1 of=/opt/sublime_text_3/sublime_text
printf '\x74' | dd seek=$((0x31d180)) conv=notrunc bs=1 of=/opt/sublime_text_3/sublime_text

*be sure that sublime_text is located at /opt/sublime_text_3/

Hi. It seems to be the Purchase License Nag at 0x31d186 (75) nor 0x31d180 (4E) in my file.

@RankinKeanan
Copy link

Sublime Text 3 - Build 3200 (v3.2) - Windows x64

No License Required - About Dialog Shows:

   Registered to
 Unlimited User License

Description Offset Original Patched
@ghost Initial License Check 0x8545 0x84 0x85
@ghost Persistent License Check 0x192487 0x75 0x74
@XcameronX Purchase License Nag 0x8F6A8 0x48 0xC3
License Required:

Description Offset Original Patched
@XcameronX Sublime Text 2 License Nag 0x8FD6C 0x48 0xC3
@tsakowi License URL (?) 0x58BB94 0x97 0x00
@tsakowi License URL (?) 0x58BB95 0x94 0x00
@tsakowi License URL (?) 0x58BB96 0x0D 0x00

—– 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 ——

FOR EDUCATIONAL PURPOSES ONLY.

Sources:

User URL
@ghost https://gist.github.com/deyixtan/6822b66ad7792ab2580ba37c450ae79c#gistcomment-2862497
@XcameronX https://gist.github.com/deyixtan/6822b66ad7792ab2580ba37c450ae79c#gistcomment-2864769
@tsakowi https://gist.github.com/laptrinhcomvn/ae127424a9026f507a3c#gistcomment-2861844

Can you tell me how to use this on windows? Thank you!

Sublime Text 3 - Build 3200 (v3.2) - Windows x64

No License Required - About Dialog Shows:

   Registered to
 Unlimited User License

Description Offset Original Patched
@ghost Initial License Check 0x8545 0x84 0x85
@ghost Persistent License Check 0x192487 0x75 0x74
@XcameronX Purchase License Nag 0x8F6A8 0x48 0xC3
License Required:

Description Offset Original Patched
@XcameronX Sublime Text 2 License Nag 0x8FD6C 0x48 0xC3
@tsakowi License URL (?) 0x58BB94 0x97 0x00
@tsakowi License URL (?) 0x58BB95 0x94 0x00
@tsakowi License URL (?) 0x58BB96 0x0D 0x00

—– 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 ——

FOR EDUCATIONAL PURPOSES ONLY.

Sources:

User URL
@ghost https://gist.github.com/deyixtan/6822b66ad7792ab2580ba37c450ae79c#gistcomment-2862497
@XcameronX https://gist.github.com/deyixtan/6822b66ad7792ab2580ba37c450ae79c#gistcomment-2864769
@tsakowi https://gist.github.com/laptrinhcomvn/ae127424a9026f507a3c#gistcomment-2861844

Can you tell me how to use this on windows? Thank you!

@Snuupy
Copy link

Snuupy commented Dec 24, 2019

As per https://gist.github.com/laptrinhcomvn/ae127424a9026f507a3c#gistcomment-2024596:

Build 3211
Windows 64-bit


Invoke-Expression (New-Object System.Net.WebClient).DownloadString("https://raw.githubusercontent.com/nferrell/PSToolbelt/master/Public/Edit-FileHex.ps1")

Edit-FileHex -FilePath "C:\Program Files\Sublime Text 3\sublime_text.exe" -Offset 0x8545 -Original 84 -Updated 85 -OverwriteOriginal

Edit-FileHex -FilePath "C:\Program Files\Sublime Text 3\sublime_text.exe" -Offset 0x08FF19 -Original 75 -Updated EB -OverwriteOriginal

Edit-FileHex -FilePath "C:\Program Files\Sublime Text 3\sublime_text.exe" -Offset 0x1932C7 -Original 75 -Updated 74 -OverwriteOriginal

@mpixelz
Copy link

mpixelz commented Dec 25, 2019

3.2.2 build 3211 for mac? can anyone provide hex script?

@cjhonlyone
Copy link

As per https://gist.github.com/laptrinhcomvn/ae127424a9026f507a3c#gistcomment-2024596:

Build 3211
Windows 64-bit


Invoke-Expression (New-Object System.Net.WebClient).DownloadString("https://raw.githubusercontent.com/nferrell/PSToolbelt/master/Public/Edit-FileHex.ps1")

Edit-FileHex -FilePath "C:\Program Files\Sublime Text 3\sublime_text.exe" -Offset 0x8545 -Original 84 -Updated 85 -OverwriteOriginal

Edit-FileHex -FilePath "C:\Program Files\Sublime Text 3\sublime_text.exe" -Offset 0x08FF19 -Original 75 -Updated EB -OverwriteOriginal

Edit-FileHex -FilePath "C:\Program Files\Sublime Text 3\sublime_text.exe" -Offset 0x1932C7 -Original 75 -Updated 74 -OverwriteOriginal

I updated 0x85 0xEB and 0x74 but after a few minutes it still reported your license no longer ...
Build 3211
Windows 64-bit

@naml3i
Copy link

naml3i commented Jan 5, 2020

$fp = "C:\Program Files\Sublime Text 3\sublime_text.exe"
$bs = [System.IO.File]::ReadAllBytes("${fp}")
$bs[0x8545] = 0x85
$bs[0x08FF19] = 0xEB
$bs[0x1932C7] = 0x74
[System.IO.File]::WriteAllBytes("${fp}",$bs)

Windows x64 3.2.2 build 3211
img

@girish601
Copy link

girish601 commented Jan 23, 2020

Merge
@jrhax
Thanks for showing the way.
All sites are flooded with Sublime Text license, but Sublime Merge is very rare.
Thanks mate.

@Darthagnon
Copy link

Sublime Merge (Windows x64, v2009dev) - offsets' context included, so you can manually search

Offset		Original	Patched		Context
------		--------	-------		-------
0x29D7E		0x25		0x0D		05 8B 71 93 00 48 89 05 A4 71 93 {00 66 83 [25]} A4
0x2A8E0		0x38		0x08		48 8B 86 B0 02 00 00 80 [38]
0x2A8E2		0x00		0x01		48 8B 86 B0 02 00 00 80 [38] [00] 74
0x2F835		0x00		0x01		FF 48 89 F8 48 83 C4 28 5F 5E C3 C6 01 [00] C3 CC 48 83

@MarioMario456
Copy link

Build 3211 instructions? (ALL VERSIONS)

@souhaiebtar
Copy link

@bath is there a offset for linux ?

@fredgolightly
Copy link

4074 alpha?

@kapitanluffy
Copy link

Sublime Merge (Windows x64, v2009dev) - offsets' context included, so you can manually search

Offset		Original	Patched		Context
------		--------	-------		-------
0x29D7E		0x25		0x0D		05 8B 71 93 00 48 89 05 A4 71 93 {00 66 83 [25]} A4
0x2A8E0		0x38		0x08		48 8B 86 B0 02 00 00 80 [38]
0x2A8E2		0x00		0x01		48 8B 86 B0 02 00 00 80 [38] [00] 74
0x2F835		0x00		0x01		FF 48 89 F8 48 83 C4 28 5F 5E C3 C6 01 [00] C3 CC 48 83

This somehow worked but can't set the theme to dark

@Darthagnon
Copy link

Darthagnon commented Jul 27, 2020

Windows x64 SubMerge v2026dev

Offset		Original	Patched		Context
------		--------	-------		-------
0x29C22		0x25		0x0D		96 00 66 83 [25] 00 BD
0x2A82A		0x38		0x08		48 8B 86 B0 02 00 00 80 [38]
0x2A82B		0x00		0x01		48 8B 86 B0 02 00 00 80 [38] [00] 74
0x2F813		0x00		0x01		FF 48 89 F8 48 83 C4 28 5F 5E C3 C6 01 [00] C3 CC 48 83

Tested and working, dark and light themes, etc. Use context to find the offset in HXD

EDIT: I've tried adapting the offsets from SubText 3 to SubText 4 beta build 4079 (binaries available on the official Discord), but have had no luck. FWIW, here's the updated offsets (NB they do Not work

Windows x64 Sublime Text 4 beta build 4079 (DOES NOT WORK)
17/07/2020

Offset		Original	Patched		Context
------		--------	-------		-------
0x007CE5	0x84		0x85		00 80 3E 00 0F [84] 7E 01 00 00 B8 00 02 00 00 66
0x0A2AAA	0x75		0xEB		C3 56 48 83 EC 20 80 39 00 [75] 3C E8 23 19 08
0x1F6849	0x75		0x74		37 F1 FF 41 F6 C4 02 [75] 1E 41 F6 C4 04 75 41 41

@rndx539
Copy link

rndx539 commented Sep 15, 2020

@rndx539
Copy link

rndx539 commented Sep 17, 2020

@Darthagnon
Copy link

Darthagnon commented Sep 29, 2020

Subtext Windows 64bit build 4087 beta

offset	        before	       after
0x00A620	80	        FE
0x00A621	38	        00
0x00A622	00	        90

context
FF FF 48 8B 86 78 02 00 00 [80 38 00] 74 4D 48 8B 8E 28 01

@harry-cn1210
Copy link

https://gist.github.com/rufoa/78e45d70f560f53678853c92dae2598a
Can anyone port this submerge v2039 from Linux to Windows?

@ehsan18t
Copy link

Windows x64 SubMerge v2026dev

Offset		Original	Patched		Context
------		--------	-------		-------
0x29C22		0x25		0x0D		96 00 66 83 [25] 00 BD
0x2A82A		0x38		0x08		48 8B 86 B0 02 00 00 80 [38]
0x2A82B		0x00		0x01		48 8B 86 B0 02 00 00 80 [38] [00] 74
0x2F813		0x00		0x01		FF 48 89 F8 48 83 C4 28 5F 5E C3 C6 01 [00] C3 CC 48 83

Tested and working, dark and light themes, etc. Use context to find the offset in HXD

EDIT: I've tried adapting the offsets from SubText 3 to SubText 4 beta build 4079 (binaries available on the official Discord), but have had no luck. FWIW, here's the updated offsets (NB they do Not work

Windows x64 Sublime Text 4 beta build 4079 (DOES NOT WORK)
17/07/2020

Offset		Original	Patched		Context
------		--------	-------		-------
0x007CE5	0x84		0x85		00 80 3E 00 0F [84] 7E 01 00 00 B8 00 02 00 00 66
0x0A2AAA	0x75		0xEB		C3 56 48 83 EC 20 80 39 00 [75] 3C E8 23 19 08
0x1F6849	0x75		0x74		37 F1 FF 41 F6 C4 02 [75] 1E 41 F6 C4 04 75 41 41

Can you help with sublime merge 2 build 2047 please?

@maboloshi
Copy link

maboloshi commented Mar 16, 2021

@naml3i
Copy link

naml3i commented Jun 4, 2021

There is no news since version 4? i.e. 4107?

Besides, does anyone experience ST lost all user settings after upgrading to v4107?

@lahma0
Copy link

lahma0 commented Jun 16, 2021

@naml3i Yes, I experienced the same thing. I used the automatic updater (in-app popup notifying me there was an update available and clicking download) and after the update, "Poof!", everything was wrecked. I keep a lot of valuable documents/notes open in my current session, some saved, some not, so I was definitely not at all pleased when my session data was completely discarded. Thankfully, I was able to restore everything since I had a backup but it is EXTREMELY poor form on the app author's behalf to do something so reckless. If this was a result of transitioning from Sublime Text 3 to Sublime Text 4, then the app should either not offer the update at all, or it should give a very clear warning that the update is a major version update which is not backwards compatible and that it will discard much, if not all, of your user data. It is almost as if they are just TRYING to push more people into Microsoft's VSCode arms. At least that is my 2-cents...

@naml3i
Copy link

naml3i commented Jun 23, 2021

@naml3i It is almost as if they are just TRYING to push more people into Microsoft's VSCode arms. At least that is my 2-cents...

@lahma0 I've been a big fan of VSCode for years. Way better than ST although it's still not a full-fledge IDE, but it serves as an IDE better than ST. VSCode took the (great) idea of json settings file in ST, but did it better with extensions and constant improvement, and it's free (!) while ST asks 99$ for an alternative to Notepad.
While I can enjoy the changes VSCode after each major update, I don't see that much in ST, what's the major difference between ST3 and ST4? They claim that it offers new "features", but for example a simple feature I still don't see them implement: choosing the language right when we draft. VSCode allows us to choose the language beforehand, no need to save the file with the right extension to have syntax highlighting. This is extremely helpful if we open a blank file and paste a code from somewhere else just to investigate it.

Instead, what did they give us in ST4? A broken setting file, incompatible with ST3; a non-blinking caret by default, with the reason that non blinking caret saves power (?!).

From ST2 to ST3, or at some version of ST3, a lot beautiful themes was also removed (?) Why, ST Headquarter?

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