Skip to content

Instantly share code, notes, and snippets.

@SebastianGrans
Created November 3, 2021 10:42
Show Gist options
  • Save SebastianGrans/c86367616e746af93d17d2dac1e2994b to your computer and use it in GitHub Desktop.
Save SebastianGrans/c86367616e746af93d17d2dac1e2994b to your computer and use it in GitHub Desktop.
Keygen for VS Code extension Monokai Pro
#
# This is a key generator for the VS Code/Codium extension Monokai Pro
# https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode
#
# If you like the extension, you should buy it.
#
# 1. Run this script. It will ask for your email (it doesn't have to be real)
# 2. Run `> Monokai Pro: enter license` from the command palette (ctrl+shift+p)
# 3. Enter the same email as in step 1, followed by the generated key.
# 4. DONE! :)
#
from hashlib import md5
import re
# The uuid is specific for monokai pro.
uuid = "fd330f6f-3f41-421d-9fe5-de742d0c54c0"
email = input("email: ")
combined = uuid + email
# Generate the md5 hash in hexadecimal
# E.g. aaaaabbbbbcccccdddddeeeeefffffgg
o = md5(combined.encode('utf-8')).hexdigest()
regex = r".{1,5}"
matches = re.findall(regex, o)
# Select the first 25 hexadecimal values, and
# combine them into a string.
# E.g. aaaaa-bbbbb-ccccc-ddddd-eeeee
# This is the key.
key = "-".join(matches[:5])
print(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment