Skip to content

Instantly share code, notes, and snippets.

@JerryLokjianming
Last active November 13, 2024 15:04
Show Gist options
  • Save JerryLokjianming/71dac05f27f8c96ad1c8941b88030451 to your computer and use it in GitHub Desktop.
Save JerryLokjianming/71dac05f27f8c96ad1c8941b88030451 to your computer and use it in GitHub Desktop.
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
  7. Export File and save it to location you want
  8. Backup sublime_text.exe file (just rename)
  9. Copy sublime_text.exe modified to directory Sublime Text 3
  10. Happy Coding :)
Screenshot

Screenshot


How to Crack Sublime Text 4 Alpha 4098 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 4 Alpha 4094
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Go to Address: 0000A700 change 80 38 00 to FE 00 90
  5. Export File and save it to location you want
  6. Backup sublime_text.exe file (just rename)
  7. Copy sublime_text.exe modified to directory Sublime Text 4 (i.e C:\Program Files\Sublime Text)
  8. Use this License
----- 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 ------
  1. Happy Coding :)
Screenshot

Screenshot


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

Screenshot

Screenshot

Screenshot


How to Crack Sublime Text 3 & 4 Alpha 4094 with Hex Editor (Linux & MacOS | With License) ↓

  1. Download & Install Sublime Text 3 or 4
  2. Visit https://hexed.it/
  3. Open file select sublime_text
    • Linux Location: /opt/sublime_text/sublime_text
    • MacOS Location: /Application/Sublime Text [version].app (Correct Me If I'm Wrong)
  4. Search 97 94 0D and Change to 00 00 00
  5. Export File and save it to location you want
  6. Backup sublime_text file (just rename)
  7. Copy sublime_text modified to default directory Sublime Text
  8. Use this License
----- 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 ------
  1. Happy Coding :)
Screenshot

Screenshot


@leogx9r
Copy link

leogx9r commented May 29, 2021

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

@CypherpunkSamurai
Copy link

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

do you use IDA? can you suggest me a good x86 and x64 tutorial?

@leogx9r
Copy link

leogx9r commented May 30, 2021

@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
Copy link

leogx9r commented May 30, 2021

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

Copy link

ghost commented May 31, 2021

@leogx9r I'm trying to do the patching with a hex editor, but can't understand why the first pattern in your walkthrough is E8 ? ? ? ? 49 8B BF ? ? ? ? 85 C0:

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`

and in your ready-to-use script it is completely different - 554157415641554154534881EC68240000:

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

@leogx9r
Copy link

leogx9r commented May 31, 2021

@lepotic You'll need more than a hex editor to use those patterns efficiently -- you will need a disassembler like IDA or Ghidra, like I mentioned I used above.

E8 ? ? ? ? 49 8B BF ? ? ? ? 85 C0 like I mentioned, is a pattern that will give you another function that contains call isValidLicense. You'll need to jump to the function it references to find where you need to patch. Aka those 4 bytes after E8 contains a relative offset to isValidLicense. That's something you'll need a decompiler to find easily.

When you jump to that function, the start of it will show you 55 41 57 41 56 41 55 41 54 53 48 81 EC 68 24 00 00 which is not a pattern, it's the actual bytes that make up the function isValidLicense. That "pattern" as you called it, will only work on v4107 and nothing more or less and will only work on Linux x64, the Windows/MacOS versions will not contain that sequence. The pattern to find that referencing function however, should work on more than v4107 (and earlier versions too).

direct reference sig refers to the pattern not directly pointing to where you need to go, it points to a reference, eg. call targetFunction or jmp targetFunction etc.
direct reference sig (+0xABCD) is similar to the above but you need to add 0xABCD to wherever you find the address to reach your target reference.
raw sig refers to the pattern pointing to directly where you need to go.

@shedanger
Copy link

SOLVE version 4107 final
You must add the following lines in your host 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

Then enter the license

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

@lider33
Copy link

lider33 commented Jun 4, 2021

Can you please tell me - do you already have keys for version 4 for Windows 10?

@brian6932
Copy link

@lider33 4107 = version 4

@visualblind
Copy link

visualblind commented Jun 6, 2021

Build 4107

Thanks @n6333373. Confirming it works great on Linux Mint 20.1 with sublime text 4 4107. For reference, the binary needing replacing is /opt/sublime_text/sublime_text

/opt/sublime_text$ ls -la sublime_text*
-rwxr-xr-x 1 root root 8429232 Jun  5 20:22 sublime_text <--(cracked)
-rwxr-xr-x 1 root root 8429232 May 20 02:03 sublime_text.bak <--(old binary)

Funny the binary sizes are identical.

Distro: Linux Mint 20.1 Ulyssa
Base: Ubuntu 20.04 Focal
Kernel: 5.4.0-70-generic x86_64

image

Also confirmed working on Windows Server 2016
OS Name: Microsoft Windows Server 2016 Standard
OS Version: 10.0.14393 N/A Build 14393

image

@kargozeyan
Copy link

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

Can you please provide Linux commands for Sublime Merge(like in case of SublimeText)? I would really appreciate it.

@maboloshi
Copy link

maboloshi commented Jun 6, 2021

@karrgozeyan You can try this, according to the method provided by @leogx9r

# for Linux
cd /opt/sublime_merge
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge bs=1 seek=$((0x003A0C9C)) count=8 conv=notrunc
 
printf '\x90\x90\x90\x90\x90' 			  | dd of=sublime_merge bs=1 seek=$((0x003A3761)) count=5 conv=notrunc
printf '\x90\x90\x90\x90\x90' 			  | dd of=sublime_merge bs=1 seek=$((0x003A377C)) count=5 conv=notrunc
 
printf '\x48\x31\xC0\x48\xFF\xC0\xC3' 	  | dd of=sublime_merge bs=1 seek=$((0x003A2096)) count=7 conv=notrunc

@kargozeyan
Copy link

@maboloshi Thank you very much, that worked for me.

@naml3i
Copy link

naml3i commented Jun 7, 2021

Does anyone experience ST lost all user settings after upgrading to v4107?

@brian6932
Copy link

@naml3i I lost all my open notes, however, my user settings didn't reset

@naml3i
Copy link

naml3i commented Jun 7, 2021

@brian6932 for me it's quite the contrary: all the opening notes are still there, intact, but the settings were lost (thankfully I have a copy of the file on github but still feel a bit confused with this update. Normally with all the previous update, it went smoothly).

I realize that right away because the font face was changed and the caret was replaced by a long, non-blinking one.

@duckimann
Copy link

@naml3i I think they change where the data is stored. the sublime 3 store the settings at "%appdata%/Sublime Text 3/", but the sublime 4 store the settings at "%appdata%/Sublime Text/"

@naml3i
Copy link

naml3i commented Jun 7, 2021

@duckimann not sure if that's the case of uninstalling ST3 and doing a fresh installation of ST4.
For me, ST4 still starts in %APPDATA%\Roaming\Sublime Text 3, settings are stored in
C:\Users\<user_name>\AppData\Roaming\Sublime Text 3\Packages\User\Preferences.sublime-settings

@duckimann
Copy link

@naml3i weird. on my computer it creates a new directory which i mentioned and discard the old one.

@bugoverfl0w
Copy link

how to do it on Linux? thx

Search 97 94 0D change to 00 00 00
use License

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

Sublime Text 4 | Arch

Cool. Thanks bro, it works

@visualblind
Copy link

@karrgozeyan You can try this, according to the method provided by @leogx9r

# for Linux
cd /opt/sublime_merge
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge bs=1 seek=$((0x003A0C9C)) count=8 conv=notrunc
 
printf '\x90\x90\x90\x90\x90' 			  | dd of=sublime_merge bs=1 seek=$((0x003A3761)) count=5 conv=notrunc
printf '\x90\x90\x90\x90\x90' 			  | dd of=sublime_merge bs=1 seek=$((0x003A377C)) count=5 conv=notrunc
 
printf '\x48\x31\xC0\x48\xFF\xC0\xC3' 	  | dd of=sublime_merge bs=1 seek=$((0x003A2096)) count=7 conv=notrunc

Worked :)

image

@duckimann
Copy link

Thanks @leogx9r :) I have my version on powershell here, tested on windows 10 x64, run as administrator (if sublime text/merge is installed)

Copy link

ghost commented Jun 8, 2021

This works for most of the Sublime Text 4.X x64 (Including 4107) - block the license check via host or patch it out of EXE

RSA Key Patch (allows any key in right format to work)

Search for ...
4157415656575553B828210000
Replace with ...
33C0FEC0C3575553B828210000

Disable License Check (You can do this via hosts file if you rather)

Search for...
6C6963656E73652E7375626C696D6568712E636F6D
Replace with ...
7375626C696D6568712E6C6F63616C686F73740000

You can now use any license basically that follows the same syntax/format/key.

-- BEGIN LICENSE --
Generic Name
Unlimited User License
EA7E-81044230
0C0CD4A8 CAA317D9 CCABD1AC 434C984C
7E4A0B13 77893C3E DD0A5BA1 B2EB721C
4BAAB4C4 9B96437D 14EB743E 7DB55D9C
7CA26EE2 67C3B4EC 29B2C65A 88D90C59
CB6CCBA5 7DE6177B C02C2826 8C9A21B0
6AB1A5B6 20B09EA2 01C979BD 29670B19
92DC6D90 6E365849 4AB84739 5B4C3EA1
048CC1D0 9748ED54 CAC9D585 90CAD815
-- END LICENSE --```

Hi. Do you know the correct replaces for x86 32bits version?

@duckimann
Copy link

Thanks @leogx9r :) I have my version on powershell here, tested on windows 10 x64, run as administrator (if sublime text/merge is installed)

@thegrapevineprogramming can you try my script above? Run it as administrator, patch the sublime and input anything to the registration box

Copy link

ghost commented Jun 8, 2021

Thanks @leogx9r :) I have my version on powershell here, tested on windows 10 x64, run as administrator (if sublime text/merge is installed)

@thegrapevineprogramming can you try my script above? Run it as administrator, patch the sublime and input anything to the registration box

Does this work on Sublime Text 4 x86 32bit version? Because I've already managed it successfully on the x64 version. I just want x86 to use on another computer. Could you just pass me the code to find and replace on x86? Thank you.

@duckimann
Copy link

duckimann commented Jun 8, 2021

Does this work on Sublime Text 4 x86 32bit version? Because I've already managed it successfully on the x64 version. I just want x86 to use on another computer. Could you just pass me the code to find and replace on x86? Thank you.

Sublime v4 does not have x86 version on windows i believe... soooo that means you have the sublime v3 and you can use the license include in the script + using hosts to block the license check

Copy link

ghost commented Jun 8, 2021

Sublime Text 4 Build 4107 x64 Easy Tutorial
Youtube Video Link Tutorial Step by Step: https://www.youtube.com/watch?v=pr8GBwPsMHM
IMAGE ALT TEXT HERE

Only tested in Sublime Text Build 4107 x64

Add this follow lines in file "C:\Windows\System32\drivers\etc\hosts"

SublimeText

127.0.0.1 license.sublimehq.com # SublimeText
127.0.0.1 www.sublimetext.com # SublimeText

Download HxD from: https://mh-nexus.de/en/

Open "sublime_text.exe" in HxD, go to "Find/Replace" (Ctrl+R).

Go to tab "Hex-values" and:

Search for: 4157415656575553B828210000
Replace with: 33C0FEC0C3575553B828210000

Search for: 6C6963656E73652E7375626C696D6568712E636F6D
Replace with: 7375626C696D6568712E6C6F63616C686F73740000

Click to save (Ctrl+S).

Now, just register your Sublime Text with this code:

----- BEGIN LICENSE -----
You
Unlimited User License
EA7E-81044230
0C0CD4A8 CAA317D9 CCABD1AC 434C984C
7E4A0B13 77893C3E DD0A5BA1 B2EB721C
4BAAB4C4 9B96437D 14EB743E 7DB55D9C
7CA26EE2 67C3B4EC 29B2C65A 88D90C59
CB6CCBA5 7DE6177B C02C2826 8C9A21B0
6AB1A5B6 20B09EA2 01C979BD 29670B19
92DC6D90 6E365849 4AB84739 5B4C3EA1
048CC1D0 9748ED54 CAC9D585 90CAD815
------ END LICENSE ------

@bad1dea
Copy link

bad1dea commented Jun 8, 2021

Sublime Text 4 Build 4107 x64 Easy Tutorial
Youtube Video Link Tutorial Step by Step: https://www.youtube.com/watch?v=pr8GBwPsMHM
IMAGE ALT TEXT HERE

Only tested in Sublime Text Build 4107 x64

Add this follow lines in file "C:\Windows\System32\drivers\etc\hosts"

SublimeText

127.0.0.1 license.sublimehq.com # SublimeText
127.0.0.1 www.sublimetext.com # SublimeText

Download HxD from: https://mh-nexus.de/en/

Open "sublime_text.exe" in HxD, go to "Find/Replace" (Ctrl+R).

Go to tab "Hex-values" and:

Search for: 4157415656575553B828210000
Replace with: 33C0FEC0C3575553B828210000

Search for: 6C6963656E73652E7375626C696D6568712E636F6D
Replace with: 7375626C696D6568712E6C6F63616C686F73740000

Click to save (Ctrl+S).

Now, just register your Sublime Text with this code:

----- BEGIN LICENSE -----
You
Unlimited User License
EA7E-81044230
0C0CD4A8 CAA317D9 CCABD1AC 434C984C
7E4A0B13 77893C3E DD0A5BA1 B2EB721C
4BAAB4C4 9B96437D 14EB743E 7DB55D9C
7CA26EE2 67C3B4EC 29B2C65A 88D90C59
CB6CCBA5 7DE6177B C02C2826 8C9A21B0
6AB1A5B6 20B09EA2 01C979BD 29670B19
92DC6D90 6E365849 4AB84739 5B4C3EA1
048CC1D0 9748ED54 CAC9D585 90CAD815
------ END LICENSE ------

You don't need to do the host patch, if you're replacing the license check in the exe (the 2nd search/replace)

I've also whipped up a quick python script for it, if anyone wants, you'll obviously need python installed..
save as whatever_name_you_want.py (and put it in same folder as sublime_text.exe) and run it, or run it from command line.,.. python .py

with open("sublime_text.exe", "rb") as binaryFile:
    byteData = bytearray(binaryFile.read()) 

# create backup
with open("sublime_text.exe.bak", "wb") as binaryFile:
    binaryFile.write(byteData)

# search for rsa key function
byteData = byteData.replace(b'\x41\x57\x41\x56\x56\x57\x55\x53\xB8\x28\x21\x00\x00', b'\x33\xC0\xFE\xC0\xC3\x57\x55\x53\xB8\x28\x21\x00\x00')
# search for license host check
byteData = byteData.replace(b'\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x75\x62\x6C\x69\x6D\x65\x68\x71\x2E\x63\x6F\x6D', b'\x73\x75\x62\x6C\x69\x6D\x65\x68\x71\x2E\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x00\x00')

with open("sublime_text.exe", "wb") as binaryFile:
    binaryFile.write(byteData)

Copy link

ghost commented Jun 8, 2021

x86 32bits please.

@bad1dea
Copy link

bad1dea commented Jun 8, 2021

4107 - x86

rsa patch
Search for: 55535756B8AC200000
Replace with: 33C0FEC0C3AC200000

license check host
Search for: 6C6963656E73652E7375626C696D6568712E636F6D
Replace with: 7375626C696D6568712E6C6F63616C686F73740000

let me know if it works.

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