Skip to content

Instantly share code, notes, and snippets.

@miketartar
Created September 26, 2020 04:21
Show Gist options
  • Save miketartar/0fc8d7bca2369ce73ea9ee7b6e0c3775 to your computer and use it in GitHub Desktop.
Save miketartar/0fc8d7bca2369ce73ea9ee7b6e0c3775 to your computer and use it in GitHub Desktop.
Cold Turkey Blocker Activator
import json
import sqlite3
import os
DB_PATH = "C:/ProgramData/Cold Turkey/data-app.db"
def activate():
try:
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
s = c.execute("SELECT value FROM settings WHERE key = 'settings'").fetchone()[0]
dat = json.loads(s)
if dat["additional"]["proStatus"] != "pro":
print("Your version of Cold Turkey Blocker is not activated.")
dat["additional"]["proStatus"] = "pro"
print("But now it is activated.\nPlease close Cold Turkey Blocker and run again it.")
c.execute("""UPDATE settings SET value = ? WHERE "key" = 'settings'""", (json.dumps(dat),))
conn.commit()
else:
print("Looks like your copy of Cold Turkey Blocker is already activated.")
print("Deactivating it now.")
dat["additional"]["proStatus"] = "free"
c.execute("""UPDATE settings set value = ? WHERE "key" = 'settings'""", (json.dumps(dat),))
conn.commit()
except sqlite3.Error as e:
print("Failed to activate", e)
finally:
if conn:
conn.close()
def main():
if os.path.exists(DB_PATH):
print("Data file found.\nLet's activate your copy of Cold Turkey Blocker.")
activate()
else:
print("Looks like Cold Turkey Blocker is not installed.\n If it is installed then run it at least once.")
if __name__ == '__main__':
main()
@Juancho2004gg
Copy link

I ran it and the app is still on the free version.

@nguyenhungphongg
Copy link

nguyenhungphongg commented Apr 13, 2025

I ran it and the app is still on the free version.

Run the code of JustaTurtle21. Its worked for me

@ace9804
Copy link

ace9804 commented Apr 14, 2025

I ran it and the app is still on the free version.

Run the code of SobhnathxLuffy. Its worked for me

bro its not working for 4.6
any tips you can provide?

@SobhnathxLuffy
Copy link

i have a problem i dont have a file named "data-app.db".
@SobhnathxLuffy

You are on the wrong path (The file is hidden) access it by enabling show hidden files in C folder or enter this path: C:\ProgramData\Cold Turkey

THANKS ALOT BRO ! IT WORKED.

@nguyenhungphongg
Copy link

nguyenhungphongg commented Apr 15, 2025

I ran it and the app is still on the free version.

Run the code of SobhnathxLuffy. Its worked for me

bro its not working for 4.6 any tips you can provide?

I'm on 4.6 version and this worked for me. Try the code JustaTurtle21 just updated above, https://gist.github.com/miketartar/0fc8d7bca2369ce73ea9ee7b6e0c3775?permalink_comment_id=5426749#gistcomment-5426749.
Just download python, set up the environment, create a file name.txt, and open CMD, type "python name.txt" and it should be worked.
Screenshot 2025-04-15 182327

@ace9804
Copy link

ace9804 commented Apr 17, 2025

I ran it and the app is still on the free version.

Run the code of SobhnathxLuffy. Its worked for me

bro its not working for 4.6 any tips you can provide?

I'm on 4.6 version and this worked for me. Try the code JustaTurtle21 just updated above, https://gist.github.com/miketartar/0fc8d7bca2369ce73ea9ee7b6e0c3775?permalink_comment_id=5426749#gistcomment-5426749. Just download python, set up the environment, create a file name.txt, and open CMD, type "python name.txt" and it should be worked. Screenshot 2025-04-15 182327

thanks mate for the reply
however i already tried JustaTurtle21's approach again and it worked seamlessly

@JustaTurtle21
Copy link

JustaTurtle21 commented Apr 17, 2025

also sorry to all the fellows who have been asking me stuff, I was quite busy and cant really help anymore as I am on linux, I sincerely apologize

@Kajus363
Copy link

Kajus363 commented May 3, 2025

Can someone help? 4.6 I tried copule of times, still does not activate the pro

@IbrahimCodesSwiftly
Copy link

IbrahimCodesSwiftly commented May 5, 2025

Can someone help? 4.6 I tried copule of times, still does not activate the pro

Try the code after closing cold turkey from system tray, try this once and check if it activates otherwise do the steps again and see if it activates. It worked for me by doing this.

@MrDron345
Copy link

MrDron345 commented May 8, 2025

New version 4.7 release. Cant activate it to pro version. Can someone help me please?

@MaikMaster5
Copy link

MaikMaster5 commented May 10, 2025

Newest version seems to no longer be stored as JSON in the DB file, but is encrypted instead. (Though interestingly enough, it still supports the old JSON format.)
No current scripts floating around will work, sorry peeps.

Either someone will have to dig into the CTB code to figure out how it's been encrypted or take the lazy approach of simply pasting one in.
Alternatively, you can buy the software, which I'm planning to do regardless once I actually have any funds for it.

@MaikMaster5
Copy link

I assume if someone made a save file on an older version and then migrates to the newest version, it should work without issue.
Only easy way the dev can really patch that is if they require users to re-authenticate any save file pre V.X.X.X. (whatever version the next one is).

...ouch

I hope this doesn't lead to an arms race that just wastes the dev's time, I could easily imagine it leading to online authentication that just makes the app worse and still gets bypassed by some tricky people.
It's good software and I hope to support it properly myself.

@klausspz
Copy link

Can someone explain to me how to do this? I arrived with no idea what was going on, just wanting to use a crack, i an using the 4.5 version

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