Skip to content

Instantly share code, notes, and snippets.

@marcpinet
Last active July 8, 2024 14:31
Show Gist options
  • Save marcpinet/27c6de31a6b25a99248abc859cc09c9b to your computer and use it in GitHub Desktop.
Save marcpinet/27c6de31a6b25a99248abc859cc09c9b to your computer and use it in GitHub Desktop.
Activate Sublime Text 4 Build 4143 and below for ever (also maybe above, but not yet tried)

Activate Sublime Text (for ever)

  1. Go to https://hexed.it/
  2. Click Open File in the top left corner and select sublime_text.exe
  3. Press CTRL + F or on the Search for bar in the left panel and look for: 80 78 05 00 0f 94 C1
  4. Now in the editor, click on the first byte (80) and start replacing each byte by: C6 40 05 01 48 85 C9
  5. Finally, in the top left corner again, click on Save as and replace the old executable file with the newly created one.

Enjoy an Unlimited User License!

Last update: 2023-01-23

@I-like-beans
Copy link

I-like-beans commented Nov 20, 2023

@marcpinet so It's working on my Windows machine and doesn't say "unregistered" anymore, is there a way for my Mac machine to say the same thing or no? like is there a way for me to trick sublime text on my Mac or is this way only for Windows machines?

@Destitute-Streetdwelling-Guttersnipe

@I-like-beans @marcpinet It works on Mac with Intel CPU, but not on Mac M1/M2.
In fact, it works on Win/Mac/Linux with Intel CPU.

For Mac M1/M2, look at this https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47

@marcpinet
Copy link
Author

def replace_bytes(file_path, original_bytes, new_bytes):
    # Open the file in read+binary mode
    with open(file_path, 'rb+') as file:
        content = file.read()
        
        # Find the original byte sequence
        index = content.find(original_bytes)
        if index == -1:
            print("Byte sequence not found.")
            return False
        
        # Log the location of the bytes to be replaced
        print(f"Byte sequence found at index: {index}")
        
        # Move the file pointer to the location of the byte sequence
        file.seek(index)
        
        # Write the new byte sequence
        file.write(new_bytes)
        
        print("Byte sequence replaced successfully.")
        return True

# Define the original and new byte sequences
original_bytes = bytes([0x80, 0x78, 0x05, 0x00, 0x0F, 0x94, 0xC1])
new_bytes = bytes([0xC6, 0x40, 0x05, 0x01, 0x48, 0x85, 0xC9])

# Path to the sublime_text.exe (make sure to use the correct path)
file_path = "sublime_text.exe"

# Call the function
result = replace_bytes(file_path, original_bytes, new_bytes)

Simple Python script that will do the job for you.

@God7139
Copy link

God7139 commented Jun 14, 2024

Thanks G.

@flzpfnove
Copy link

Works on Sublime Text version 4169

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