将一个foxpro程序反编译成功,哪位仁兄帮忙看看注册码的算法。
VERSION = 3.00 dataenvironment dataenvironment Dataenvironment Name = "Dataenvironment"
1 1 form form REGISTER 釺op = 25
Left = 37
Height = 231
Width = 462
ShowWindow = 1
DoCreate = .T.
ShowTips = .T.
AutoCenter = .F.
Caption = "系统注册"
MaxButton = .F.
MinButton = .F.
Icon = sunshine.ico
WindowType = 1
Name = "REGISTER"
PROCEDURE Activate
if jbss=-1
release thisform
endif
ENDPROC
PROCEDURE Init
m.due=ctod(' . . ')
ssfile=m.sundir+'SSSYSTEM.DAT'
jbss=fopen(ssfile,0)
if jbss=-1
=messagebox('在注册前请所有用户退出SunSystems系统',16,'信息')
=fclose(jbss)
return .t.
endif
if val(m.ver)>=4.26
r1=83
r2=30
else
r1=77
r2=30
endif
=fseek(jbss,r1,0)
m.company=alltrim(fgets(jbss,r2))
=fclose(jbss)
if m.reg=.t.
thisform.reg.caption='已注册'
endif
thisform.refresh
ENDPROC
? ? ? %? % . ? N ? U % ? ? <? ? ? U JBSS THISFORMx T? 麮? . . # T?
? ? SSSYSTEM.DAT T? 麮? ? 慅? % ? ? 嘃C? 在注册前请所有用户退出SunSystems系统?? 信息陎 嘃C? 扆? B黙 ? %麮?? g?
祝p=
@ ? T? S
T? ?? T? M
T? ? 嘃C? ? ? 桚? T?? 麮C? ? 棝 嘃C? 扆? %
? ag? T? ? ? 已注册 ? 欞 ? ? U DUE SSFILE SUNDIR JBSS VER R1 R2 COMPANY REG THISFORM CAPTION REFRESH Activate, Init` 1 !q A 3 ??!!? q A ? A a ?A 2 < W ) ? shape shape Shape1 REGISTER bTop = 12
Left = 9
Height = 165
Width = 441
BackStyle = 0
SpecialEffect = 0
Name = "Shape1"
label label TEXT1 REGISTER pFontSize = 11
Caption = "用户名:"
Height = 24
Left = 20
Top = 37
Width = 73
TabIndex = 1
Name = "TEXT1"
textbox textbox company REGISTER 馞ontSize = 11
BackStyle = 1
BorderStyle = 0
ControlSource = "m.company"
Enabled = .F.
Height = 26
Left = 84
SpecialEffect = 1
TabIndex = 2
Top = 32
Width = 337
ForeColor = 255,0,128
DisabledForeColor = 0,0,255
Name = "company"
label label TEXT3 REGISTER qFontSize = 11
Caption = "序列号:"
Height = 25
Left = 20
Top = 142
Width = 60
TabIndex = 7
Name = "TEXT3"
textbox textbox serial REGISTER vFontSize = 11
ControlSource = "m.sn"
Height = 25
Left = 84
TabIndex = 8
Top = 137
Width = 350
Name = "serial"
commandbutton
commandbutton ok REGISTER rTop = 189
Left = 264
Height = 32
Width = 82
FontSize = 11
Caption = "注册(\<R)"
TabIndex = 11
Name = "ok"
鵓ROCEDURE Click
if empty(this.parent.duedate.value)
wait wind '到期日不能为空' nowait
this.parent.duedate.setfocus
return
endif
if empty(this.parent.dm.value)
wait wind '数据库不能为空' nowait
this.parent.dm.setfocus
return
endif
if empty(this.parent.serial.value)
wait wind '序列号不能为空' nowait
this.parent.serial.setfocus
return
endif
m1=sys(2007,allt(m.company))
m1=repl('0',5-len(m1))+m1
m2=val(dtos(m.due))/val(substr(m1,1,3))
m2=alltrim(chrtran(str(m2,10,3),'.','0'))
m2=repl('0',10-len(m2))+m2
m3=sys(2007,allt(m.company)+allt(m.dm))
m3=repl('0',5-len(m3))+m3
mm=m1+m2+m3
if alltrim(m.sn)==alltrim(mm)
if !used('sysinfo')
select 0
use sysinfo
endif
select sysinfo
locate for id='001'
if found()
replace c2 with alltrim(m.company),c3 with alltrim(m.sn),;
d1 with m.due,c5 with m.dm
=messagebox('恭喜您已经注册成功!请重新登录以使注册生效',64,'信息')
this.parent.serial.value=''
thisform.release
else
=messagebox('系统参数尚未完全设置,无法注册',16,'信息')
endif
use in ('sysinfo')
else
=messagebox('对不起,无法接受您的注册信息,请再试一次',32,'信息')
this.parent.serial.setfocus
endif
ENDPROC
颃? ? ? 彞 % & ? - 5 ? U p %麮 ? ? ? ↓?E ? R,: 到期日不能为空 欞 ? ? ? ? B? ? %麮 ? ? ? ↓? ? R,: 数据库不能为空 欞 ? ? ? ? B? ? %麮 ? ? ? ↓? ? R,: 序列号不能为空 欞 ? ? ? ? B? ? T? 麮??C?? 沒 T? 麮? 0?C? >Q? ! T? 麮C?? 巊CC? ??\g! T? 麮CC? ?
?Z? .? 0潧 T? 麮? 0?
C? >Q? T? 麮??C?? 汣?? ?] T? 麮? 0?C? >Q? T? ? ? %麮?? 汣? ?? %麮? sysinfo?? F? ? Q? sysinfo? ? F? ? - ? 001 %麮4?? >? 腰C?? 淉? 腰C?? 淉? 腰?? ?? 腰?? @ 嘃C? 恭喜您已经注册成功!请重新登录以使注册生效?@? 信息陎 T ? ? ?
欞 ? ? ??? 嘃C? 系统参数尚未完全设置,无法注册?? 信息陎 ? Q sysinfo ?i? 嘃C? 对不起,无法接受您的注册信息,请再试一次? ? 信息陎 欞 ? ? ? ? ? U THIS PARENT DUEDATE VALUE SETFOCUS DM SERIAL M1 COMPANY M2 DUE M3 MM SN SYSINFO ID C2 C3 D1 C5 THISFORM RELEASE Click, 1 ??A A ??A A ??A A r????Rrq A q ra AA ! ?A 2 ? ) ?
commandbutton
commandbutton close REGISTER uTop = 189
Left = 361
Height = 32
Width = 82
FontSize = 11
Caption = "关闭(\<C)"
TabIndex = 12
Name = "close"
.PROCEDURE Click
thisform.release
ENDPROC
渠? 呙 % P e _ ? U
欞 ? ? U THISFORM RELEASE Click, 1 2 # ) label label Label1 REGISTER qFontSize = 11
Caption = "到期日:"
Height = 16
Left = 20
Top = 72
Width = 60
TabIndex = 3
Name = "Label1"
textbox textbox duedate REGISTER 狥ontSize = 11
ControlSource = "m.due"
Format = "D"
Height = 25
InputMask = "9999.99.99"
Left = 83
Margin = 0
TabIndex = 4
Top = 67
Width = 85
Name = "duedate"
label label reg REGISTER 凢ontSize = 11
Caption = "未注册"
Height = 25
Left = 96
Top = 194
Width = 62
TabIndex = 10
ForeColor = 0,0,255
Name = "reg"
label label Label2 REGISTER tFontSize = 11
Caption = "注册信息:"
Height = 25
Left = 20
Top = 195
Width = 71
TabIndex = 9
Name = "Label2"
label label Label7 REGISTER rFontSize = 11
Caption = "数据库:"
Height = 24
Left = 21
Top = 106
Width = 84
TabIndex = 5
Name = "Label7"
textbox textbox dm REGISTER 窮ontSize = 11
ControlSource = "m.dm"
Format = "X"
Height = 24
InputMask = "!"
Left = 84
TabIndex = 6
ToolTipText = "S-SQL,I-ISAM,B-BTRIEVE"
Top = 103
Width = 35
Name = "dm"
凱ROCEDURE Valid
if !this.value$'SIB' and lastkey()#27
wait window '必须是S/I/B中一种' nowait
return .f.
endif
ENDPROC
"R % ? U L " % ? ? SIB
? C|? E ? R,: 必须是S/I/B中一种 B? ? U THIS VALUE Valid, 1 !?q A 2 y ) A宋体, 0, 9, 6, 14, 10, 12, 2, 2
宋体, 0, 11, 8, 17, 13, 15, 2, 2
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)