Commit c787f638 authored by 's avatar

Fixed bug that kept rotor from being able to decode licenses with > 7 bit rotor keys

parent 478a3492
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.51 1998/02/17 14:23:50 brian Exp $''' $Id: Application.py,v 1.52 1998/02/23 17:49:01 brian Exp $'''
__version__='$Revision: 1.51 $'[11:-2] __version__='$Revision: 1.52 $'[11:-2]
import Globals,Folder,os,regex,sys import Globals,Folder,os,regex,sys
...@@ -289,6 +289,29 @@ def install_products(): ...@@ -289,6 +289,29 @@ def install_products():
Globals.default__class_init__(Folder) Globals.default__class_init__(Folder)
def lcd(e):
_k1_='\357\261\390\247\357\362\306\216\226'
_k2_='\157\161\090\147\157\122\106\016\126'
rot=rotor.newrotor(_k2_, 13)
dat=rot.decrypt(e)
del rot
dat=list(dat)
dat.reverse()
dat=join(dat,'')
dat=marshal.loads(dat)
if type(dat) != type([]):
# Compatibility w/old lic files
rot=rotor.newrotor(_k1_, 13)
dat=rot.decrypt(e)
del rot
dat=list(dat)
dat.reverse()
dat=join(dat,'')
dat=marshal.loads(dat)
if type(dat) != type([]):
return None
return dat
def lic_check(product_name): def lic_check(product_name):
path_join =os.path.join path_join =os.path.join
...@@ -311,15 +334,14 @@ def lic_check(product_name): ...@@ -311,15 +334,14 @@ def lic_check(product_name):
dat=f.read() dat=f.read()
f.close() f.close()
rot=rotor.newrotor('\357\261\390\247\357\362\306\216\226', 13)
dat=rot.decrypt(dat) dat=lcd(dat)
dat=list(dat) if dat is None:
dat.reverse() return 0
dat=join(dat,'')
dat=marshal.loads(dat)
del rot
name=dat[0] name=dat[0]
val =dat[1] val =dat[1]
if name != product_name: if name != product_name:
return 0 return 0
if val is None: if val is None:
...@@ -374,6 +396,9 @@ class Misc_: ...@@ -374,6 +396,9 @@ class Misc_:
############################################################################## ##############################################################################
# #
# $Log: Application.py,v $ # $Log: Application.py,v $
# Revision 1.52 1998/02/23 17:49:01 brian
# Fixed bug that kept rotor from being able to decode licenses with > 7 bit rotor keys
#
# Revision 1.51 1998/02/17 14:23:50 brian # Revision 1.51 1998/02/17 14:23:50 brian
# *** empty log message *** # *** empty log message ***
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment