2.DaBriSoft 軟體公司出品的系列橋牌教學軟體
① 花色定約的坐莊打法 1.1
http://www.dabrisoft.dk/download-uk/Suit.exe[1150K]
以上三個軟體均由VB3編制,是為提高坐莊水平而設計的,包括不同難度級別的165副牌,未註冊時可玩15副。
--------------------------------------------------------------
用Dodi的VB3 decompiler將suit.exe反彙編之後,在REG.BAS看到如下的註冊碼判斷。顯然,suit.exe透過檔案c:\input.dat和c:\windows\system\dptkey.exe和c:\windows\system\dptwkey.exe進行通訊,由這兩個exe根據生成與機器相關的序列號存放在檔案c:\output.dat中,並對註冊碼進行判斷,如果註冊碼正確它們就會建一個名為c:\success的目錄,否則就建一個c:\wrong目錄。而suit.exe只用這兩個目錄作為註冊碼正確與否的依據。
Open gv1D10 + ":\input.data" For Output As l001E
Print #l001E, Reg.adgang
Close #l001E
l0022% = 282
l0022% = Shell(gv1D14 + "dptreg.exe /" + gv1D14 + "dptwkey.EXE", 1)
While extfn00DB(l0022%) > 0
l0024% = DoEvents()
Wend
If Dir(gv1D10 + ":\wrong") <> "" Then
MsgBox "The access code you have typed is wrong - try again.",
48, "Information"
GoTo L3C528
End If
If Dir(gv1D10 + ":\success") = "" Then
MsgBox "An unknown error has occured - try again. Your harddisk
may be in a bad condition.", 48, "Information"
GoTo L3C528
End If
If Dir(gv1D10 + ":\success") <> "" Then
MsgBox "The access code has been accepted and the program is
being exited. When you start the program again, it will be updated to the
full version.", 48, "Information"
sub071A
Unload Reg
Unload Spil
End
End If
以上只是輸入註冊碼之後的判斷,因為將dptreg.exe修改一下讓它始終只建立c:\success目錄,則雖能透過輸入註冊碼後的檢查,但下次suit.exe啟動時還是demo版本。可見啟動時的判斷不同。
查詢啟動時顯示的“Demo Vesion”字串,發現是在Pral.FRM中,相應地在Pral.bas中有如下的程式段:
Sub Form_Load ()
sub070E
If gv1CE0 = 1 Then Spil.mnureg.Enabled = False
gv1CF0 = 3
If gv1CE0 = 1 Then gv1CF0 = 33
If gv1CE0 = 1 Then
Pral.Label2.Visible = False
Pral.Label7.Visible = False
Pral.Label8.Visible = False
End If
..........
End Sub
很顯然gv1CE0是個全域性標誌(gv=Global Variable),表示註冊與否。若gv1CE0為1,則Help選單不顯示Registration
and Purchase,啟動時不顯示“Demo version”,且每個級別有33個牌局可玩。
查詢gv1CE0,看它是在哪裡被賦值的。在MODULE1.BAS中看到,它啟動時是呼叫“dptwkey.exe /3”來判斷是否已經註冊,生成檔案c:\XMQRPT.DAT,如果已註冊的話則該檔案的第一行的前兩個字元是“00”。
Sub sub070E ()
Dim l0BF4 As Integer
Dim l0BF6 As Integer
Dim l0BF8 As Variant
gv1CE0 = 0
l0BF8 = FreeFile
gv1D10 = String$(145, Chr$(0))
gv1D10 = Left$(gv1D10, extfn00AE(gv1D10, Len(gv1D10)))
gv1D10 = Left$(gv1D10, 1)
gv1D14 = String$(145, Chr$(0))
gv1D14 = Left$(gv1D14, extfn00C5(gv1D14, Len(gv1D14)))
If Right$(gv1D14, 1) <> "\" Then gv1D14 = gv1D14 + "\"
sub071A
l0BF4% = 282
l0BF4% = Shell(gv1D14 + "dptwkey.EXE /3", 1)
While extfn00DB(l0BF4%) > 0
l0BF6% = DoEvents()
Wend
Open gv1D10 + ":\XMQRPT.DAT" For Input As l0BF8
Line Input #l0BF8, gv19D4$
If (Left$(gv19D4$, 2) = "07") Then
MsgBox "The program is installed on another computer. A registered
program cannot be copied.", 48, "Information"
Unload Spil
End
End If
If (Left$(gv19D4$, 2) = "00") Then gv1CE0 = 1
Close l0BF8
sub071A
End Sub
經過上面的分析,最終得到破解方法如下:
1、將suit.exe中的“XMQRPT.DAT”改成“123456.dat”。該檔案中共有4個“XMQRPT.DAT”,只改第一處即可。
3、建立一個文字檔案c:\123456.dat,只要其第一行的前兩個字元為“00”即可。
dptreg.exe和dptwkey.exe是兩個小檔案,且不是VB3的。有興趣的可研究一下這兩個東西寫個序號產生器(bpint 21 if ah=xx)。
其它兩個Vb3的估計與此類似。
blowfish 2001/01/13