1、无壳,VB编写
有两处要注册
2、VB Decompiler反编译
第一处是Command4_Click() ‘4052AC事件
关键部分:
loc_4051DA: If (Me.Text3.Text = Me.Label3.Caption) Then
loc_40528A: Me.Label3.Caption = "Congratulation !"
loc_405295: Else
loc_4052A2: Me.Text3.Text = "Try Again!"
loc_4052AA: End If
loc_4052AA: Exit Sub
Me.Text3.Text == Me.Label3.Caption 提示注册成功。
但是在Form1中没有发现Label3的Caption属性。
OD载入,在OD中定位事件发现全部是db
百度一番,有个说法叫VB_PCODE
对VB常用的字串下断点,__vbaVarTstEq,StrCmp等。
输入“123,Try,堆栈中发现是与“7715206”比较
输入,提示Congratulation!
并把Label3的Caption属性改为”Congratulation !”
第二处是Command2_Click() ‘4058EC
关键部分:
var_94 = "0110617121214051216101106141404110614140411091211100810101608040610121608100416"
loc_405622: var_98 = Me.Text1.Text
loc_40562D: j = 1 'Variant
loc_405641: For i = 4 To CVar(Len(var_98)): var_C8 = var_108 'Variant
loc_405698: var_90 = CLng((CDbl(var_90) + (CDbl(Asc(Mid$(var_98, CLng(i), 1))) * Val(Mid$(var_94, CLng((j * 3)), 3)))))
loc_4056C4: If ((++j) >= 39) Then
loc_4056CC: j = 0 'Variant
loc_4056D0: End If
loc_4056D3: Next var_108 'Variant
loc_4056DE: j = 1 'Variant
loc_4056F2: For i = 4 To CVar(Len(var_98)): var_C8 = var_168 'Variant
loc_405764: var_1CC = CVar((CDbl((Asc(Mid$(var_98, CLng(i), 1)) * Asc(Mid$(var_98, CLng((i - 1)), 1)))) * Val(Mid$(var_94, CLng((j * 2)), 2)))) 'Double
loc_40576C: var_178 = (var_178 + var_1CC) 'Variant
loc_40579D: If ((++j) >= 39) Then
loc_4057A5: var_A8 = 0 'Variant
loc_4057A9: End If
loc_4057AC: Next var_168 'Variant
loc_405815: If (Me.Text2.Text = LTrim$(Str$(var_90)) & "-" & LTrim$(Str$(var_178))) Then
loc_4058BD: Me.Label3.Caption = "Congratulation " & Me.Text1.Text & " !"
loc_4058D5: Else
loc_4058E2: Me.Text2.Text = "Try Again!"
loc_4058EA: End If
Str(var_90) & Str(var_178) 即正确的Serial
3、注册机
# CrackMe 2.0
name = input("Name:")
if len(name) < 5:
print("Error")
exit()
var_94 = "0110617121214051216101106141404110614140411091211100810101608040610121608100416"
j = 1
sum = 0
for i in range(3, len(name)):
sum += ord(name[i]) * int(var_94[j*3-1:j*3+2])
j += 1
if j >= 39:
j = 0
key1 = str(sum)
j = 1
sum = 0
for i in range(3, len(name)):
sum += ord(name[i]) * ord(name[i - 1]) * int(var_94[j*2 - 1:j*2 + 1])
j += 1
if j >= 39:
j = 0
key2 = str(sum)
print("Serial:", key1, '-', key2, sep='')
VB的循环貌似都是从1开始