|
Eagle的破文:(重写)FlashGet1.65的算号器! \* Y5 R" n3 \3 `2 I6 f0 `. N
1 v8 ~' Y) v, |5 \再次声明:本破文曾发表于www.chinadfcg.com
* [. l- A4 ?$ j, d: ^声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。
; w, b0 q+ |+ H! i, E7 I" C# l/ z- G3 j. s6 l5 V5 G
【破解作者】 Eagle
/ [6 m) d; c) g, P/ j, @$ [% P【作者邮箱】 eagle_twenty@163.com
. O+ {+ a G7 `: _; [* @7 q【使用工具】 OllyDbg1.09
1 l; d' \# s0 Y/ T# J3 W【破解平台】 WinXP
y; l# s' q) G" [! U* e& {7 O【软件名称】 FlashGet1.656 I( ]; Q- R1 _. j
【加壳方式】 无壳/ J( Q" w6 V0 y0 y% T* }7 u6 z
【破解声明】 ( Y( ]+ u% L1 N N& P" G
--------------------------------------------------------------------------------
! E( S: e- [! _9 }& O【破解内容】
& Y$ Z$ E$ K- P; A0 n+ c$ M* @) }8 [0 D4 e$ T' i. Z1 L& P! I
6 |( ?! j) A7 K# |安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。- p+ b/ b0 ^5 c7 e3 \# F+ u. O
) [$ i8 L9 N; i/ E
1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行
1 H6 q( R% a! z% R+ f2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码
% t9 Y! _0 a3 i j2 Y$ m$ M0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"% J! c+ Z( i, E* g
0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C]
5 y9 I$ j% t8 F0 W# S0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General"7 U2 v4 a: `# W# s" S
0041DCF4 |. 51 PUSH ECX {7 X$ R% f5 O$ Z! t" v
0041DCF5 |. 8BCD MOV ECX,EBP% D+ |9 W+ V8 ?, n
;这个CALL将从注册表中读入注册码% O# N, p8 n3 {$ `# a J
0041DCF7 |. E8 54C70C00 CALL flashget.004EA450
( ?3 U# O5 u2 v8 V5 i+ D! a1 V7 x! H, @# q
4 g: O4 I& h* N* G分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向
& q5 n9 k0 n$ \$ y% l……/ B0 {4 u. t, w9 @8 t6 [: y
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B
; x6 E. t& ?8 V" z" I- C……9 [/ |: V% t! f: N: k6 |
0041DD35 |. 0F84 40010000 JE flashget.0041DE7B
4 q; I% ?+ M3 }/ J% A+ _; N……
; ^6 i: |$ y) S0 ?0 i( i3 a0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B
2 v$ t/ H% r5 x/ G……9 w5 e2 ? G) \: S0 e. R/ h
0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B* K5 [/ U4 k! I ^" G
……3 |9 v, B! o/ A+ i% t2 Y
0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B
8 L+ _" X9 f$ }7 T- M…… Y) W2 s2 F# A+ Z
;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位
7 s6 r( u/ O5 X2 S6 e2 I0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F$ A7 h; z% T0 c/ i# m9 n l! e
0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]
, ~9 w1 J Q$ m/ `0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]
! w6 B# F( ~$ m d. _0041DD91 |. 83F8 2C CMP EAX,2C' G/ K1 Q; R6 K7 ~- R! p/ I: W
0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B% n) O& X# Z, {# H. V: E( \: v
* J' G+ |; F4 M) @;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,4 |0 J4 U* E0 C6 r
;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]$ Y$ M" r4 C/ o4 }+ y. |
;这次破解我们用的是fgf-的类型的密钥" W3 X. X, E$ r" a, T
0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"+ k2 \/ \, t x+ E2 j
0041DD9F |. 8BCD MOV ECX,EBP
9 w$ W# r6 @" s! G/ u. |3 Y- T0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE6
2 ~9 x5 c! h+ f+ @/ `4 F1 R0041DDA6 |. 85C0 TEST EAX,EAX* g7 e9 D. u7 c; T' ^* p- h7 v
0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0
; h1 L! p, a" C; d$ [0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX
& `/ R! F' F/ ]# i0041DDAE |. EB 18 JMP SHORT flashget.0041DDC82 O7 P( @) d/ u3 S; q0 q% l! k
0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-") ~5 M5 p% d8 i4 ]6 B% E% N; t
0041DDB5 |. 8BCD MOV ECX,EBP. B( H' E+ t" e7 I8 C+ e. }/ F. X
0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE6
( g1 G1 B' K3 r7 y+ z0041DDBC |. 85C0 TEST EAX,EAX
+ P0 ^/ c& Q: m) H& A0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B
% _ {/ x* j# x6 g% `8 T0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX
3 p" t! V o& F j2 L+ ^1 x/ {, f8 u w$ m6 `. E! E
* m6 H; m T' \ L' o& i3 E) N;下面是对KEY的验证算法
; z7 R, [% N [+ K0041DDC8 |> 6A 2C PUSH 2C0 Q+ i( M6 @$ b4 F" `
0041DDCA |. 8BCD MOV ECX,EBP
% K$ }4 D6 x/ i7 C5 L0041DDCC |. E8 7A680B00 CALL flashget.004D464B/ \8 u8 y" I' e; W
0041DDD1 |. 8BF8 MOV EDI,EAX
: s+ B2 L5 S$ a; w/ V1 e0041DDD3 |. 33C9 XOR ECX,ECX. }8 X% H& ~ [% S& U( y, i
0041DDD5 |. 83C7 04 ADD EDI,4
3 R- x9 e- z, L0 d9 a# p0041DDD8 |. 33F6 XOR ESI,ESI
2 [8 |# p1 X" g% _* }/ F: u& \. ~4 l6 e
2 \ r/ \& `7 o! L6 T. D分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有
8 d. j; c6 g& W6 o: K$ g. ^. W0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]
1 M( M/ n6 P0 z4 V; c) Q0041DDDC |. 8BD6 |MOV EDX,ESI- z8 s8 t% l* W8 U7 d) V
0041DDDE |. 83C7 04 |ADD EDI,4' J6 R& R4 |3 K O
0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2), E( U7 x6 q, n: A- q
0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX8 X) }! W2 ^) k0 M3 X. v
0041DDE8 |. 74 26 |JE SHORT flashget.0041DE104 |, Y" \/ L- U% c& X
0041DDEA |. 4A |DEC EDX
& `. j2 B/ e1 D% p- i0041DDEB |. 74 17 |JE SHORT flashget.0041DE04
/ s2 `9 }; u7 c8 I, \4 ]! y& D0041DDED |. 4A |DEC EDX' \7 `5 N ~# O. g
0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28
& u5 I* Q; H0 Y! h3 d/ \/ ^9 _4 @: T) x$ P5 K$ L! o+ ?4 C$ T8 ~5 ?% V
0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1' j( E# c4 r# l7 S
0041DDF5 |. 0FBED4 |MOVSX EDX,AH+ T! k( |! z3 ~
0041DDF8 |. 0FAFCA |IMUL ECX,EDX
' v9 z. e- {6 N. P0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]
3 E/ U4 Y4 e8 x+ Y7 O0041DE00 |. 03CA |ADD ECX,EDX; N/ ], h; U1 j( j! g
0041DE02 |. EB 1F |JMP SHORT flashget.0041DE23- r- o- Q9 i4 U9 N7 m) T% e
;ECX = B * C + D
, \+ m4 W- `0 _7 i
2 a0 x1 i0 V; T7 v
5 X$ ^- |6 R( a& H6 K8 Y; @0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE1
- V; ^# _3 K4 h* @( j( O' E0041DE09 |. 0FBED4 |MOVSX EDX,AH2 n- N$ r5 h9 r- w
0041DE0C |. 23CA |AND ECX,EDX$ {! q l3 F0 Z! U4 P2 E
0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B0 z, [! Q7 @1 Y6 _- g/ n* q; Y
;ECX = C AND B
8 J" h, v/ s0 c# m3 s- N' ^5 ~1 Z1 d0 ^% c. |- Z3 L8 F6 o, D! F
K: B" ~# ?4 ` N! [0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE1
, D! }; q! m2 i0041DE14 |. 8AD4 |MOV DL,AH3 R1 X: P, J8 f
0041DE16 |. 33CA |XOR ECX,EDX6 |4 g- ^) {( d- ^
0041DE18 |. 83E1 7F |AND ECX,7F
" `; x$ K! z6 E5 I;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的
# p5 y( h* u& a& r7 t9 @: t1 {5 k+ R/ f) }- B) d, I. O9 j4 r
5 E" l7 [' Z! O; t0 E, P# q0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]4 w! Q3 z' ~% r/ N4 ^- D& H5 x
0041DE20 |. 0FAFCA |IMUL ECX,EDX: N! y* X! e: h
;ECX = ECX * D* B$ M& R' \3 i( d
" k' f* q' Q. E7 C( @- j: G; a, T, k+ n5 J# e% A7 Z p; G+ A- B' @. c5 r3 `* K7 S
0041DE23 |> 0FBEC0 |MOVSX EAX,AL
) W: l9 `% O# O0 t4 \0041DE26 |. 03C8 |ADD ECX,EAX
) O: M1 e4 N& w6 @- L8 s! R;ECX = ECX + A- z6 U. T4 ?3 p* y" E7 T
;处理后那些跳转,可以得到) T G7 a0 Q8 @1 D& W! G' U) I
;Case 0:ECX = (C XOR B) * D + A4 v! }/ C# m- k' I# V
;Case 1:ECX = (C AND B) * D + A( K5 a/ z/ m+ _
;Case 2:ECX = B * C + D + A
% }2 m5 n( X9 e ?$ w( }
' p) j& ]& c% n: \3 `/ A+ i$ Y/ {2 r7 ~ w5 q o
6 U% y `9 \. N7 n9 }8 g% V% g9 O# m
;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法
4 \/ h/ u0 @0 S4 @& w. ~3 q( f+ z;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,
9 {3 O" ^" w( `4 B3 o;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,
4 g# y8 }7 q2 u2 X: |1 e' E;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i
8 {$ M! l( A! r( z/ g F0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE1( S0 K9 w$ R4 B) d8 Q' l' s
0041DE2C |. 85C0 |TEST EAX,EAX
8 |) M$ f0 E b5 V9 l$ o0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C
- M- h. ]3 G% x B2 T0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]
; q0 l3 C6 M/ U- { l0041DE37 |. 83FE 02 |CMP ESI,2
/ A( ~" a. x7 T6 X: u8 y0041DE3A |. 74 07 |JE SHORT flashget.0041DE43
. T0 x) t3 j4 A O3 T1 Q4 K0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]
+ p4 }! s/ ]+ }& r. Z( A1 y! P0 f' f1 a, D3 \% Y/ w7 F
;对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。
8 g) {% Y, M6 C. T* _+ J0041DE43 |> 8BC1 |MOV EAX,ECX$ P4 |& ^( \$ J/ w' Y* S( p
0041DE45 |. 33D2 |XOR EDX,EDX
e% d( p; R( ]: _3 v2 h0041DE47 |. F7F3 |DIV EBX
. p+ f5 o; K+ m1 p+ c- h% z/ V. o5 M9 a$ ~( V
2 {7 C; \+ {. W$ l7 P6 r4 t: W4 a3 z3 S
;以上是对指定段的KEY的验证运算,下面是对结果的判断; y. v; w$ T3 @
0041DE49 |. 8BC6 |MOV EAX,ESI
* |" Z0 \8 N ]; _# H; v! T0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2)
/ {* G" Y3 j8 ]0041DE4E |. 74 13 |JE SHORT flashget.0041DE63- l6 O8 w8 `# H" L8 K+ V
0041DE50 |. 48 |DEC EAX% A! a, [4 Q& }# S2 r1 X5 t& V
0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C
# d0 Q- W, u3 E5 |6 s6 ~0041DE53 |. 48 |DEC EAX
0 s1 B* R, x- e7 i/ y b; }; n0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE67$ `1 V* ?( ~, c( ?
; z$ G& T9 U) y8 x) n) }9 V
;余数是否为0
/ V/ c" v- w# a9 y. T0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B, R. B$ o( f+ G0 V: H3 A: u
0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE72
: n: i, O: l. D0041DE5A |. EB 0B |JMP SHORT flashget.0041DE676 D) Y" g5 u; J
; J: e) Q3 U' U3 k4 n% K
;余数是否为8
! @3 \3 n" o) a) _0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B
) h" s' M! D' }+ Z0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72
$ T8 U9 p0 O }3 f2 |0 u0041DE61 |. EB 04 |JMP SHORT flashget.0041DE67
* p4 O' O7 P- |( i( p! L/ c$ f- |- `, \' |! s! b* J! J# M+ n
;余数是否为0; r0 T. u8 |& W3 |/ S
0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B
. o( o% S( Z/ Z/ N; H {' q) R& t0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72! X8 Z$ Q4 x3 P$ F" q
0 ^5 r2 T# r [! y. K0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B- Q2 r. Y! Y+ x# n3 ]
0041DE68 |. 83FE 03 |CMP ESI,3; I( C/ O: d. J9 q$ B/ V
0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90
$ m* w- m! Q' f" d, U! r& l. P0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA
( e' l4 Q- h2 M" g, C+ ]! z& l. Y% B& y1 n! D
所以这三段的KEY的验证算法是:9 {$ y! X+ q$ c2 O2 k+ t) ?
Case 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'0 J8 x8 X9 q* N4 h
Case 1(B AND C) * D + A) MOD X = 0,这儿X是'e'! B( j3 }9 j& r% O, S; s9 }
Case 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'
2 H2 S3 I3 [, l/ I' c% y. }; t2 W; h4 n6 n: n
LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……9 V/ i7 r! ^1 B+ w9 x; R; @" ~- a' H
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]5 X9 `$ |) D4 p0 c) ^& I: w2 g
0042514F |. 83C0 10 ADD EAX,101 V' p1 X' G5 |
00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX
5 U6 v" j/ k- L00425156 |. 6A FF PUSH -1$ D7 i: N4 I3 Q$ h* b5 K5 e! X
00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]
4 `/ u% g# l3 a9 D- O j0042515D |. 0FBED5 MOVSX EDX,CH& |3 D. c. v- {2 H* U/ f7 d, ?
00425160 |. 0BC2 OR EAX,EDX7 _/ }+ }8 n; s
00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]; ?6 D1 E0 P$ L' n- ~0 D7 H7 l
00425167 |. 0FAFC2 IMUL EAX,EDX; B& q& c, o. V! M( u5 O* H
0042516A |. 0FBEC9 MOVSX ECX,CL
* v5 U* i1 i" T$ v! X/ M0042516D |. 03C1 ADD EAX,ECX
- m* p9 Z m7 ]( y! R;跟踪分析得EAX = (B OR C) * D + A
4 x1 D, \; X E$ X D, G
5 `* B1 u( s4 ~" y1 U0042516F |. 33D2 XOR EDX,EDX& Q! _. I3 k+ O8 I
( A) s2 f5 N) E5 Q1 A& L2 k;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i'+ D! H& G+ U/ p, O5 `6 J
00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]
; a9 a7 c( w5 I- z W0 j00425178 |. F7F1 DIV ECX6 C$ O/ x1 {$ F4 n) K
0042517A |. 8BCE MOV ECX,ESI
& x. E \, k5 K' M0 Y' ?( p$ y1 Z% B D1 x
;判断余数是否为0
* e7 g' H7 M$ a0042517C |. 85D2 TEST EDX,EDX
0 ^+ q5 r+ r- G' J8 v0042517E |. 74 1E JE SHORT flashget.0042519E. h; I- f g! N+ k
4 Y2 L0 z6 H* Y所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'3 n/ h: w, { q
8 j8 {/ |+ }, p# X B* w; L" ]& Y
& [, b0 B$ m7 P+ b( s
只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:
3 n% Y: c: E1 B- Q! c1 o) l Randomize
. M6 ~$ i+ j; a4 f2 O; Q Dim intEbx As Integer
+ K8 ]3 e) Z% j, X" _ E9 R/ Y Dim i As Integer, j As Integer, k As Integer, intChar As Integer: R0 L: ?# @2 K3 }$ q; t! A {3 ~
Dim strCode As String
6 b. @0 ~9 z1 e# k" [- A, ^2 b
( t2 \, W' Q9 T' A: U/ \. n If fgf Then
: [4 b, i5 S7 [+ D7 a9 O strCode = "fgf-"; m3 W% ^, ~' W1 s/ r
intEbx = 118' D2 i- V. `7 B, b0 k
Else: {8 q j+ ~5 N, O1 p D5 M v6 @5 @
strCode = "fgc-"
; I6 }# b) R! I+ x intEbx = 105
/ t$ Q# l: c, u5 a End If
6 Y; w& A1 h1 g" ^4 j/ s% F7 A& h
. N0 z5 h k! I9 d Do; g6 ]9 \; w( M- c5 R
intChar = 97 + Int(Rnd() * 25)
' L/ d6 `" r- n7 s: y" } For i = 48 To 57
5 b! D, N# u/ K, C! }/ q- R+ ]" I For j = 48 To 57# e) }8 d" N4 u; x" M
For k = 48 To 57! X4 |+ X/ B' J7 {" ?8 c
If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then& Z8 A3 J5 J) m8 t7 I
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)6 |% z# D% U/ g1 s1 p4 w
Exit Do
' {+ ^0 s& \# e% H$ G% F End If
# V" {8 U0 Q+ d2 Q- I7 ?3 u* R8 u Next k
( n. j8 o4 z8 \4 L9 M Next j
) h& D; Z3 S3 X Next i
2 Q8 i1 X, o* U4 o Loop
; B% v6 D1 Q A7 G) q7 o* l0 D & c6 m8 U9 w+ Q* w# v
Do
f) c' Y! S6 Z) E* e y% a intChar = 97 + Int(Rnd() * 25)( J. i1 o5 U2 ], [9 O
For i = 48 To 57
* A. {7 c5 _; Y( H j2 _) o For j = 48 To 574 ?- N3 {( m$ e9 @) y6 b, X
For k = 48 To 57
# m4 f3 o, R% A K! k6 ` If ((i And j) * k + intChar) Mod 101 = 8 Then, E4 V1 M+ A$ W: J0 }' R
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)% F4 ?3 d" H6 b2 |; i
Exit Do3 j0 n2 u" P6 E I. T2 Y! `6 G) x( m: W
End If i2 X: G) f+ v
Next k
: G5 ]; S9 U1 L8 G* e# P( Q Next j6 }5 L" V# D% V, Q# Z
Next i6 i% a+ b/ i" M" ?6 O
Loop+ m+ |: t, X& \, q& c- e o
7 a' a# c2 M- i) @1 c, J# `' A Do
9 K6 o" w0 @. `6 T. z( q" i intChar = 97 + Int(Rnd() * 25)4 V1 l! a: [9 @, b" M5 Q
For i = 48 To 57
" O( F* q% F1 p( C- Q For j = 48 To 57" m+ F4 D5 b8 r$ ?. u
For k = 48 To 57* K! \: X3 e. m
If (i * j + k + intChar) Mod intEbx = 0 Then
5 I$ v( B- k% B strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
7 B* `3 v% L. q9 ]& H Exit Do
! U0 F. J+ i( L6 h End If) i& k, {0 ^2 {5 \! i* T1 e: Y; r* I
Next k
0 ^4 C; N r* x& n; i8 j( N" X Next j
3 ^. {7 W4 {7 n# n Next i' w) x: V5 t$ |0 F
Loop% w" R) r! l8 x
; W" a( g; e/ Q4 x% v }3 j
Do4 T/ O. s: }' U0 P: O
intChar = 97 + Int(Rnd() * 25)
2 \, O/ q7 i8 [! h4 `. J( i( f For i = 48 To 57. A2 k% ]& ?0 l" M# A2 v
For j = 48 To 57
2 ?( V# l* f! }& O% @ For k = 48 To 57
6 q6 ~8 P% e' a# X If ((i Or j) * k + intChar) Mod 105 = 0 Then
1 r# R/ [* ?" _- T; l! l strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
* D( A% j" [: f9 A9 C Exit Do0 ?" f" S5 P9 |9 M9 F$ Y2 S
End If( C' \0 M3 r. u. A
Next k
- d8 W9 J" u" {9 z Next j
7 i, ?; Z9 U) _; @/ _0 _8 S Next i( v% F# d. T3 ^2 z( V- s9 J# A' a* a! k
Loop
$ n3 i" F# g8 n, t
5 t4 m$ O( }1 m4 W; \: L7 ?7 B2 j3 @) m3 D$ g& R
'后面的24位随机生成。4 \. F7 ~2 M% C; d
For i = 1 To 6
" Q/ ]9 a, Z! L intChar = 97 + Int(Rnd() * 25)
+ Z0 H, E. h Q v5 V5 i# e3 X strCode = strCode & Chr(intChar)6 o* N; C. N( u8 Y) |
For j = 1 To 3
( u. n" v* E" @* O$ q intChar = 48 + Int(Rnd() * 9)
) f2 c9 A$ H, r; R strCode = strCode & Chr(intChar)
6 T! j" t) `2 J$ N: r! o% I Next j
/ T" u$ f5 q/ O Next i8 V1 S6 P' [! Q2 X; R4 g* u
- A* i0 M0 Q* ^ g7 k3 T/ R p* d @, B) }9 N6 ? q
最后字符串strCode就是所要求的KEY |
|