|
Eagle的破文:(重写)FlashGet1.65的算号器: C/ T% H' g1 F+ O
5 I& E, C! A4 J% D: C再次声明:本破文曾发表于www.chinadfcg.com
3 A4 [" |8 M. {1 a4 i* r9 y# J声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。
( |3 L P \. Q: D+ p9 d- r1 h1 @% L9 m9 M9 ]3 ?: `, W' y; _
【破解作者】 Eagle
2 v5 N1 E) D* L) F- `% }【作者邮箱】 eagle_twenty@163.com
! {3 b) G D3 e5 R/ { A【使用工具】 OllyDbg1.09
( o: e! _( @: y( K9 ^( ^【破解平台】 WinXP
5 ^( _% Q0 y& b. c【软件名称】 FlashGet1.65
* ^9 K- r/ D# H/ Z$ `【加壳方式】 无壳; O; I/ U s; j* v, c
【破解声明】
- H" G' j4 N; Q# R, G--------------------------------------------------------------------------------1 m/ Q2 C" J5 L; Q n. X9 Q# ^1 R
【破解内容】" q3 W. ^: ]! f5 V9 Q3 @
# \4 a. C4 [! e2 `9 d) A
5 J7 _ p {+ d5 i$ M
安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。
' g7 h5 U) d& ]4 k
) W! Q6 G# s1 }5 ^$ {/ u# T y1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行
$ e/ _; R& s$ W) j" ?: }2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码
: C7 f( T! ]3 t$ v& m0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"
! o/ [, j6 l* y; l% I0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C]4 \5 W( }& y1 ~% b) r
0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General"& B" p+ ^* M# S' a! P/ d6 W
0041DCF4 |. 51 PUSH ECX2 @. K+ l- Y, V5 P" y9 I' `/ Z
0041DCF5 |. 8BCD MOV ECX,EBP
4 _4 X6 r/ k/ u, };这个CALL将从注册表中读入注册码
! v' [2 v" N t) _: h( ?0 ?; `0041DCF7 |. E8 54C70C00 CALL flashget.004EA450
) r; r% i8 A% W, ?4 Q! B4 L+ h% Q: I0 Q
, N e- ?$ v) ]* o( q9 d
分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向
: d- q, j& j7 j! S……6 F- I& T+ C+ [& c6 J
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B8 [8 L5 l1 f9 H, C
……' ^# e8 X" H2 R) I' z/ O: M; R
0041DD35 |. 0F84 40010000 JE flashget.0041DE7B u# \+ t, g& X5 T
……
8 ]( Y% _: L3 ? G0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B
" [ w2 U& v) M3 Q, s# y2 t0 W2 @# @……" d1 E) H4 z* }* r+ F
0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B
$ @$ o. d8 R. ~+ d……$ a* C$ n7 f( G
0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B. ?& m3 U0 j) u" q- N
……, Q4 u% ^3 X& j. Q
;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位
|3 [+ ^' a: o3 w( g0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F9 N: d; ~5 v* c" ~0 b
0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]
$ f! N: {' }9 A# F7 S# {0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]
4 y$ ?* ^$ F Y0041DD91 |. 83F8 2C CMP EAX,2C! N8 H# Z; X8 o0 n# z
0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B/ a+ l. c% w, Y$ A+ N- | e
: O& s k1 X2 v- L3 O+ @;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,% d5 |3 b5 N( w' d
;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]
+ T" \ i6 E7 `;这次破解我们用的是fgf-的类型的密钥
3 H/ \# b: f/ r! T0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"
8 Z7 s$ n& E+ `- ?) Q/ Z R1 ~0041DD9F |. 8BCD MOV ECX,EBP
w" i0 x( B& P& m/ W0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE60 G( S1 r6 r' @
0041DDA6 |. 85C0 TEST EAX,EAX
$ r2 I4 `& H0 F( e! s0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0
9 P8 g* n6 H* i0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX
( {( {. k7 s: E+ R$ }! Q0 M x# g0041DDAE |. EB 18 JMP SHORT flashget.0041DDC8
* H& c. ?; f$ {4 u0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-"
& @" R& W: K X7 M0041DDB5 |. 8BCD MOV ECX,EBP
6 K) J. L. Q& Q' |* _& ^4 O0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE6
: i# L2 J' X% Z/ S1 }# r0041DDBC |. 85C0 TEST EAX,EAX
1 v% k$ l3 N: ~, r5 D0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B
# W+ G4 }( f' N. {6 q! N0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX0 G# d1 N9 b8 J9 m+ v% @
2 f5 S; s' U- }: S
; u0 S- t2 B* j. P: p;下面是对KEY的验证算法" I0 w3 n' w; t) `9 s) ~
0041DDC8 |> 6A 2C PUSH 2C
9 ~5 L! ]$ y7 O3 Q$ ?8 b/ a0041DDCA |. 8BCD MOV ECX,EBP- Y. A4 ^( ^$ D5 A4 ?( O
0041DDCC |. E8 7A680B00 CALL flashget.004D464B/ |' K; P* N$ ?' b- R
0041DDD1 |. 8BF8 MOV EDI,EAX7 `3 W: U W( h( A% v
0041DDD3 |. 33C9 XOR ECX,ECX1 q; o" B N; w4 p
0041DDD5 |. 83C7 04 ADD EDI,43 k7 F# i. Q: }- E
0041DDD8 |. 33F6 XOR ESI,ESI1 T( b$ I; y( o- U( D9 U
) X! [3 L. m! H; R5 @: l+ N ]; ^, ^1 W+ c. @, `8 L e- u
分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有
4 D& O& [: b! L. l7 t$ F+ X0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]
. I6 s I! v) l! X* f. U0041DDDC |. 8BD6 |MOV EDX,ESI
/ @. _3 R# l* U2 g$ _0041DDDE |. 83C7 04 |ADD EDI,4
. d+ c0 m9 F; R6 n0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2)' k. K) t$ w2 I" } h8 }
0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX# P# D4 n3 U0 Z9 D: M
0041DDE8 |. 74 26 |JE SHORT flashget.0041DE10( T; N" `( K3 b# j( R: z
0041DDEA |. 4A |DEC EDX
0 T$ r! l6 y. t/ K3 l% f, @$ ?0041DDEB |. 74 17 |JE SHORT flashget.0041DE04+ w. y/ r& q$ {% \
0041DDED |. 4A |DEC EDX
- x! `" T$ @/ E: k" ^" T0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28
: @( W& v2 c, ?5 E) p7 r
; J0 h, e5 k! F: k2 a [0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1
6 z3 v3 f v0 w' F+ f0041DDF5 |. 0FBED4 |MOVSX EDX,AH- z2 {; h3 l0 D1 q9 b# p
0041DDF8 |. 0FAFCA |IMUL ECX,EDX
" Y; w0 R5 r p) Y8 Y) A0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]* k. u2 o& y8 B2 B; X" c# c
0041DE00 |. 03CA |ADD ECX,EDX
6 x0 O. k9 j; r* z, d0041DE02 |. EB 1F |JMP SHORT flashget.0041DE23
3 D$ |2 G2 Q/ [* u% p- } \;ECX = B * C + D" P4 l& q1 _% u) H8 m) P. `
3 z6 [1 S ]0 A6 h T1 M; J }8 \7 G# x
) C2 |# q) m9 a4 B `
0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE15 M8 ^4 m& ^, J4 Q
0041DE09 |. 0FBED4 |MOVSX EDX,AH
# Z% W1 v( I, g0 g! G9 b0041DE0C |. 23CA |AND ECX,EDX
) G) b. C8 O/ b0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B
: I' s7 a9 \& `# a- ]: \: };ECX = C AND B$ J" y$ z, Z9 \' Y
* J0 w. o8 H- ], o+ w& Y
/ d$ |. t9 _ e% n7 z0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE1
' m1 ?5 Z8 ?5 D7 K. n( P4 Y2 F0041DE14 |. 8AD4 |MOV DL,AH
4 r/ M6 y" w# k8 ?0041DE16 |. 33CA |XOR ECX,EDX
+ R- [8 F" D; y2 `0041DE18 |. 83E1 7F |AND ECX,7F
7 p4 w# t9 U& I: n;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的$ ]1 `6 L" K" Y w8 l9 G
, m7 ~) ]/ k- T# K& l3 I
4 I; R6 r2 f, {+ M/ i( g8 |4 L
0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]
0 G0 A6 |! G! B2 i& H0041DE20 |. 0FAFCA |IMUL ECX,EDX/ b- [9 [8 G7 j- M& [- q8 C
;ECX = ECX * D7 F8 j" p f4 q/ Q& i
9 f! S) ]1 l% |' N. _1 {4 a, d' ]. O4 X8 m, Y' Z U/ L
0041DE23 |> 0FBEC0 |MOVSX EAX,AL
: ]6 H9 F9 A5 N+ O2 q8 n0041DE26 |. 03C8 |ADD ECX,EAX; \! M& d' T @1 r: O
;ECX = ECX + A9 b8 S1 ^& C$ E! E# ]" a6 \
;处理后那些跳转,可以得到
9 w& H) l7 N9 t2 f0 P;Case 0:ECX = (C XOR B) * D + A
* y6 r$ `6 V. E- v;Case 1:ECX = (C AND B) * D + A' k$ J5 D: V1 [( s1 B
;Case 2:ECX = B * C + D + A
1 D, b2 x: T! D6 M+ p2 a+ n
$ |, H6 D( d1 V, t
. y5 H- g* w3 C( P! |
' A8 V: W6 y4 k6 F; c. Z, D;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法
7 I: _8 e( r" @( J;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,
7 p3 z8 _. Y- e* q4 l& c;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,
2 M; a5 N; n$ A% H. `6 g7 ^5 M;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i
" ^5 K4 `3 ~& o! v }( s s+ z4 C0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE1" b$ q& q0 X# r ^ E, P% Y
0041DE2C |. 85C0 |TEST EAX,EAX' W" i; A' B. o# V: M
0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C
" u' ?+ O( f2 X6 t& Z" m- F9 q' [( I0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]
" h! [" e0 |7 M/ A) t: ^2 u# e0041DE37 |. 83FE 02 |CMP ESI,2
; Q9 {( U; e" `* m, b' y9 x0041DE3A |. 74 07 |JE SHORT flashget.0041DE43
3 b) ^' E6 m, L) Q! O3 |0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]3 J/ V" D' U" {- k- h+ w
& |+ Y5 D- ^! M, P;对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。4 J+ l, U) Q: t, Q& B5 h
0041DE43 |> 8BC1 |MOV EAX,ECX
( W& J1 J7 M+ [9 N/ r* \8 D0041DE45 |. 33D2 |XOR EDX,EDX
$ @3 Q D# z; P+ j& S- p7 q0041DE47 |. F7F3 |DIV EBX
6 s) V q$ p/ d; V6 v5 j/ M3 g9 w( @3 d1 ~0 a
/ p2 Z! D, J2 {4 V* Y* L
0 H# q9 F4 g1 V7 v, a* Q* N;以上是对指定段的KEY的验证运算,下面是对结果的判断
' n! X9 g9 @% f3 v# A. h9 ^6 p0041DE49 |. 8BC6 |MOV EAX,ESI
/ o! u8 N4 e. q8 [+ s3 F0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2). O h! b$ t- r
0041DE4E |. 74 13 |JE SHORT flashget.0041DE63# b0 K6 D+ B! b: e% @, z
0041DE50 |. 48 |DEC EAX
2 p/ v& {, J4 l2 z& T% I$ R0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C) g$ e \3 Z$ {
0041DE53 |. 48 |DEC EAX; ]; Y6 }7 |9 z. G( r8 R, X
0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE677 E, {0 O# [' N: r
' T# g& y& X/ V4 U* c3 |) u;余数是否为0
; j5 X9 n3 A. A9 Q* ~4 F$ f7 R0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B, c- ~4 Q& z! n- Q0 z! Q
0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE72
4 C/ C% N7 n+ l4 `0041DE5A |. EB 0B |JMP SHORT flashget.0041DE677 a% M% A1 D3 Q( g0 j/ j( z
5 S6 w! k8 G$ j7 x2 D# R, L' h9 r;余数是否为8) C3 L! ^& E5 H, ~* P) Z& O: h; a
0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B' B: T" f$ J2 B+ ?3 c6 h: r# Z5 ?
0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72
1 }% ^5 G8 b+ v" D9 _0041DE61 |. EB 04 |JMP SHORT flashget.0041DE671 J" ]& v; W* R1 z; w/ |9 n) n
3 t9 D6 B m8 m8 n/ R;余数是否为0, A! Q; q3 l: @7 p! m4 B
0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B
6 ]: d6 M( p5 \' J0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72% o6 L7 t4 r! E% L W9 J* c
6 d% h0 e" J2 ^" g8 [* ?0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B( n, J+ Z" H5 ]& S! S
0041DE68 |. 83FE 03 |CMP ESI,3 e {& B; d* |: `6 R) _
0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90
# ]" e- c* Q' s A" X& ?0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA
/ z0 A. R& k' k2 E
( Q6 b8 O& X9 [$ {. j3 c所以这三段的KEY的验证算法是:, ^' k# W0 a( S# z8 B, q% q
Case 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'
, t% [+ u$ A! I: c6 b. T6 d) s JCase 1(B AND C) * D + A) MOD X = 0,这儿X是'e'
9 X8 g1 [$ v4 {' Z, QCase 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'
" v3 o$ ]% X# k+ ^- O# E7 [
% C# Z3 P! g4 w& l: x7 L. b/ NLeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……. o5 h5 \+ h4 j3 @# q" N( F
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]$ M( b; X* T* v V$ y/ s
0042514F |. 83C0 10 ADD EAX,106 j+ r+ H/ e0 m( k+ d* g+ E
00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX
, {4 ]/ m/ b1 z00425156 |. 6A FF PUSH -19 ~+ ^, \! P0 p* {; s
00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]
( x9 r! k! k1 L4 ^* s- |0042515D |. 0FBED5 MOVSX EDX,CH- w4 H- H' [6 b9 B6 l( C/ D
00425160 |. 0BC2 OR EAX,EDX
) X b0 K% e8 b- ~7 D00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]3 U6 \& } ]1 h
00425167 |. 0FAFC2 IMUL EAX,EDX0 r! |3 L/ s8 |4 l% Y% W
0042516A |. 0FBEC9 MOVSX ECX,CL
, k7 ?/ i5 k' b5 G+ n& j8 A* e0042516D |. 03C1 ADD EAX,ECX% C7 o: B0 Z, f5 l
;跟踪分析得EAX = (B OR C) * D + A
' U( ^( {/ f: N) q; P* W2 E7 r( {9 Q _( l: q a0 M7 C
0042516F |. 33D2 XOR EDX,EDX3 t: ^1 I. w v7 W6 t# r" ?
7 p, U) {; q. ?! c& ]7 ~
;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i'# {! b; K( ]0 Z: a) N( E
00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]
1 b6 I; D* p# g, k00425178 |. F7F1 DIV ECX
. N* k5 q$ U7 M& j) f0042517A |. 8BCE MOV ECX,ESI
. g. b/ ~6 H. x! Y* _7 ?$ y M* L' b8 t/ B+ w; R/ B
;判断余数是否为0% u8 m9 F9 d% R' F h5 ]- ?
0042517C |. 85D2 TEST EDX,EDX, r) k7 ^$ d9 j, y$ s
0042517E |. 74 1E JE SHORT flashget.0042519E9 W4 I; {" k7 g: d, O$ c
$ P" i/ c- E( A4 V6 Z* ]5 r: D所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i': @9 e% d+ _& m; a8 q. y
+ B8 P/ m; x/ l3 j# O2 ?/ k$ c7 G+ h" z' z
只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:! j. V6 [* x t2 ?. C& {
Randomize
- I+ @/ e5 @7 B# l; { V: ^ Dim intEbx As Integer8 @& R& U% v. [( S; H
Dim i As Integer, j As Integer, k As Integer, intChar As Integer
, v$ T6 S! V% }7 y" h Dim strCode As String+ [/ Y+ t0 T3 d( Q4 v+ ]/ l
% _7 z4 j% R: J) _
If fgf Then
0 ]0 U B/ o u! r strCode = "fgf-"$ W2 B4 U( l3 Q
intEbx = 118
9 g8 O8 q6 U5 m Else$ j' Y! B2 t9 C0 d6 S: X4 x, s# f
strCode = "fgc-"9 |: [# E3 x% t
intEbx = 105
E# B5 y/ l5 d, X" E" T1 u2 C End If" M0 w; B4 e: {: f1 F3 N/ }
$ |- N! ~1 u" d- [& q/ r
Do
3 x. b# x0 I9 k7 p' ] intChar = 97 + Int(Rnd() * 25); z$ r' A7 ~% t" h4 B' V& }
For i = 48 To 57% F. ?( d* J8 A3 v* Z* g5 p* Z9 F
For j = 48 To 57
/ i! r) }. n- S0 O For k = 48 To 57$ Z. ]8 V/ L# O- G7 n; H+ L- c7 @
If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then
+ ^! Z2 P2 ?1 g" r strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)* |. r; G0 A3 L5 w; M) ?
Exit Do
) G- o% G9 @) ^ r End If
8 x* w+ `) L/ N( ^ Next k* S9 L1 @% P( g
Next j/ g5 V3 b' |" N* z* j6 O
Next i
0 n0 H4 ~% ^4 V, N Loop
4 y3 E/ N. R' o ~ 5 v5 m8 R/ O, s5 P2 b4 n
Do& A3 M5 Z/ o _% a$ h F! F
intChar = 97 + Int(Rnd() * 25)
2 \) H* [" B! g1 { For i = 48 To 574 q, X0 I0 V. \; F7 F9 U" u
For j = 48 To 57, a5 e* p5 x1 W9 z8 i) C/ `
For k = 48 To 570 @" A P- o. N& A: h
If ((i And j) * k + intChar) Mod 101 = 8 Then
: L9 ^# n: ^/ w$ L strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)6 N# h! P2 Z# X' V* u& q
Exit Do& y6 b- n; r! q3 |% H
End If. f6 l+ q9 v0 u9 ]
Next k. U$ a( P2 Q( c/ t: d- a
Next j
' l* k9 ?8 {7 H* r Next i2 l4 S& f2 {# A0 _8 D
Loop, J5 r/ C* O1 ]8 o8 Q
. k% e5 l" [- ]# u
Do
9 k/ ]. [) e% |/ M a. Y# x intChar = 97 + Int(Rnd() * 25)+ w6 m) E s1 q) {9 O* J
For i = 48 To 57
+ K0 a8 u6 g) P9 t) g( C For j = 48 To 57) {" X! [0 u0 j6 r0 S4 |+ _- Q8 f; ?# Q
For k = 48 To 57
4 z% l" K* x7 D: M% ?( x* ^2 |5 v If (i * j + k + intChar) Mod intEbx = 0 Then
7 L% L" M6 _3 X7 U7 \ ~ strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)! }3 w; _- h6 U) A! ^6 N
Exit Do4 p4 u) y' b) M( w( y
End If* ]8 ~6 n! D+ v& h2 R: J/ T! W
Next k9 f7 r0 Y( I# C5 [$ T
Next j
- w; O' y, p- d% h% z Next i, g) z" O7 p% K, O
Loop, u# V; a2 ~6 @
/ A) C4 X3 m# S- K' d3 [
Do% W y( g! ~: H2 i
intChar = 97 + Int(Rnd() * 25)- l* c- I& g; {, S# @
For i = 48 To 578 f! J0 i& x i
For j = 48 To 57
4 Z( n) Q, v; [( c" n For k = 48 To 57
) j% T, C/ T# q' w+ P If ((i Or j) * k + intChar) Mod 105 = 0 Then9 _, p7 U2 d3 W5 t( O; z. k& ]% f. ]
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
q6 e" p8 @7 x Exit Do, s# y+ q# I4 Y( k% g/ {
End If
9 B" \0 q) Z* ]" z4 P9 Q Next k
! ~: L9 ]4 ~4 }( B" {5 `; P# Q Next j, ~( f. g9 T+ t2 n
Next i
3 N8 H" P! E5 r) l Loop" v- b1 z2 t+ s7 Y
, J$ Q2 u4 s6 ?6 Z2 j! D1 b+ k5 p1 }- l+ P
'后面的24位随机生成。 G! L2 Q" S0 A2 ]1 r% @- ]
For i = 1 To 6% M8 C4 {4 o9 B
intChar = 97 + Int(Rnd() * 25)4 _$ [$ _8 j+ }. w4 m. s" R
strCode = strCode & Chr(intChar)
( m4 ~, `. M( U: y( L+ V6 ?) T For j = 1 To 37 c5 \. ]" f- s/ K. V; B& ]& e! Z6 i
intChar = 48 + Int(Rnd() * 9)
1 n R% k8 |5 L' y, [ strCode = strCode & Chr(intChar)
6 z- _# v3 @ j, ] t( `# I Next j) ^+ j! X; v2 O' j& c' t8 b |
Next i
- A, N$ P5 z6 ^* `; c( g$ Q6 a
6 l: D4 `" ~1 z8 @8 o
5 T( K! `( H F$ P最后字符串strCode就是所要求的KEY |
|