C-Free 5.0 pro 的注册机(python版)

都忘记了这个博客还存在。加点料:-)

 /////////////////////////////////////////////////////////////////////

aa = raw_input("Enter your name:")
bb = raw_input("Enter your email:")
cc = bb+ aa
if(len(cc)>(len(cc)/3)*3):
  dd = (len(cc)-(len(cc)/3)*3)
else:
  dd = 0
ee = chr(00) * dd
cc = cc + ee
ff = "/xa9/xac/xb5/xdb" * (len(cc)/4+1)
gg = {}
for x in range(len(cc)/3):
     gg[x] = (ord(cc[x*3])^ord(ff[x*3]))*65536+(ord(cc[x*3+1])^ord(ff[x*3+1]))*256+ord(cc[x*3+2])^(ord(ff[x*3+2]))

hh = {}
for x in range(len(cc)/3):
     hh[x*4] = gg[x]/262144
     hh[x*4+1] = (gg[x]/4096)-hh[x*4]*64
     hh[x*4+2] = (gg[x]/64) - (hh[x*4]*64+hh[x*4+1])*64
     hh[x*4+3] = gg[x] - ((hh[x*4]*64+hh[x*4+1])*64+hh[x*4+2])*64

mm = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
code = ""
for x in range(len(hh)):
     code = code + mm[hh[x]]
print("Your regcode:   %s"%code )
raw_input("OK!")
exit()

//////////////////////////////////////////////////////////////////////

转载请注明出处!!!

你可能感兴趣的:(C-Free 5.0 pro 的注册机(python版))