Archive for March 20th, 2010

重置PL/SQL Developer的试用期

如果你安装了PL/SQL Developer的试用版,但在30天内,没有足够的时间来试用它(可能被别的事情耽搁了),可以把下面的Python(V2.6)程序放入你的启动项里,它可以让你无限期的试用PL/SQL Developer (经测试对版本8.0.2.1505有效,未对其他版本测试),它的原理是每次系统启动的时候,自动检测上次”重置(reset)安装信息”的时间,这些信息保存在一个SQLite数据库中(foobar.db),请不要删除它,如果时差超过了25天,再次重置(reset)。

import os
import shutil
import win32api
import win32con
import sqlite3
import time
import _winreg
from time import *
from datetime import *

# Reset the trial period of PL/SQL Developer, USE AT YOUR OWN RISK, buy it if you really need it
# by Charry

list = list();

def traverse(root, key, list):
	hKey = _winreg.OpenKey(root, key);

	try:
		i = 0
	    	while 1:
			strFullSubKey = "";
			try:
				strSubKey = _winreg.EnumKey(hKey, i)
				strFullSubKey = key + "\\" + strSubKey;
			except WindowsError:
				hKey.Close();
				return;

			traverse(root, strFullSubKey, list);
			#print strFullSubKey;
			list.append(strFullSubKey);

	        	i+=1
	except	WindowsError:
		print

	hKey.Close();

def reg_delete_key(root, key):
	global list;
	traverse(root, key, list);
	for item in list:
		_winreg.DeleteKey(root, item);
		#print item;

	_winreg.DeleteKey(root, key);

def crack():
	conn = sqlite3.connect('foobar.db')
	conn.execute("""CREATE TABLE IF NOT EXISTS CONFIG(
		ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
		LAST_MODIFIED DATE DEFAULT CURRENT_DATE NULL)""")
	cursor = conn.cursor()
	today = datetime.now().strftime("%Y-%m-%d")

	# get the last_modified date
	sql = "SELECT * FROM {0} ORDER BY LAST_MODIFIED DESC;".format("CONFIG", today)
	cursor.execute(sql)
	str_last_modified = '1970-01-01'
	for row in cursor:
		str_last_modified = row[1]
		break

	print "Last Cracked Time: " + str_last_modified

	# get date delta
	tm_last_modified = datetime.strptime(str_last_modified, "%Y-%m-%d")
	time_diff = datetime.now() - tm_last_modified

	if time_diff.days > 25:
		print "Trial period was reset " + str(time_diff) + " ago"
		print "Save the world, save the cheerleader, let's teleport again"
		sql = "INSERT INTO {0} (LAST_MODIFIED) VALUES('{1}');".format("CONFIG", today)
		cursor.execute(sql)
		conn.commit()

		reg_delete_key(_winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Security");
		reg_delete_key(_winreg.HKEY_CURRENT_USER, r"Software\Allround Automations");

	cursor.close()
	conn.close()

crack();

Keyword: Python, PL/SQL Developer, Crack

[ad]

Switch to our mobile site