【习作】给NTFS Streams Info 1.0 写注册机

超级网迷+ 电脑迷+ 音乐迷
打印 被阅读次数

好不容易找到个软柿子,NTFS Streams Info。这个东东是做什么用的?问我不如找谷歌。
点击这里下载 700K

下面是用python写的代码:


# -*- coding: cp936 -*-
# keygen by 在城里

from random import *

# char generator
# e1 is upper limit of digits; e2 is upper limit of uppercases

def getNum(e1, e2):
    n1 = randint(48, e1)
    n2 = randint(65, e2)

    # get one char randomly
    k = sample([n1, n2], 1).pop()
    return k

k1 = getNum(57, 90)   # 57=H('9'), 90=H('Z')
k2 = sample([71, 76, 82, 86], 1).pop()  # G, L, R, V
k3 = randint(80, 89)  # range[50, 59]
k4 = randint(69, 79)  # range[45, 4F]

k5 = getNum(51, 84)
k6 = getNum(55, 88)
k7 = k5 + 6
k8 = k6 + 2

k9 = getNum(57, 90)
k10 = getNum(57, 90)
k11 = getNum(57, 90)
k12 = getNum(57, 90)

k13 = getNum(57, 90)
k15 = getNum(57, 90)

# calculate the total
total = k1+k2+k3+k4+k5+k6+k7+k8+k9+k10+k11+k12+k13+k15

i = total%100
k16 = i%10 + 65    #65=H('41')
k14 = i/10 + 65

key1 = chr(k1)+chr(k2)+chr(k3)+chr(k4)+'-'
key2 = chr(k5)+chr(k6)+chr(k7)+chr(k8)+'-'
key3 = chr(k9)+chr(k10)+chr(k11)+chr(k12)+'-'
key4 = chr(k13)+chr(k14)+chr(k15)+chr(k16)

print "Your NTFS Streams Info 1.0 KEY:"
print key1 + key2 + key3 + key4

# end of code


下面是它生成的key:
5RSL-0062-XP84-6AQF
9RWJ-3S9U-D35A-WE1J
8VQH-1779-R175-5HGE

后语:初学python,让大家见笑了:-)

2011.08.10






登录后才可评论.