|
Eagle的破文:(重写)FlashGet1.65的算号器) H4 T8 E0 [. a! ?5 [
7 t, z' t; E$ p( [/ a
再次声明:本破文曾发表于www.chinadfcg.com- Z0 ]6 W h0 Y) ^9 g
声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。& t) C# _" F9 B& J: H
9 s/ S* c9 e9 ^ T, r, z
【破解作者】 Eagle$ l# p- _+ A. U7 @$ f
【作者邮箱】 eagle_twenty@163.com4 |7 }4 {0 i! t: T* j: H; {# |
【使用工具】 OllyDbg1.097 M4 d, m& v* E% k: p+ J8 l( G
【破解平台】 WinXP( [7 J8 o+ B8 w- K& X2 O6 p
【软件名称】 FlashGet1.652 |3 i& Z# J* {2 e
【加壳方式】 无壳5 V( m9 I6 W4 i
【破解声明】
3 M# A# Z5 n' X* ?--------------------------------------------------------------------------------* c2 g$ R; f) c) C& l) w
【破解内容】) }2 ]/ j/ g5 j, r' e4 D$ [
+ p7 r( V# b2 T/ ^8 s9 ~) G; w
/ b2 T$ b+ |- h; v/ i8 C# r安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。
: J. e8 S- K, W' [' i" }# [5 R; D! J( h+ u" } i
1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行+ \: I) p; Q7 D4 j" L
2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码
, q1 S& A) b) m2 T0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"$ {2 M" p' Q' D) Q; t4 [4 N# s
0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C]1 b9 Z$ Q7 I" c% |$ `
0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General"" h6 N( B, w8 g. T, W% x4 U
0041DCF4 |. 51 PUSH ECX$ B) x0 T- G( u' j9 `
0041DCF5 |. 8BCD MOV ECX,EBP$ g P$ W/ p- E& A5 r" ]
;这个CALL将从注册表中读入注册码# e( B0 E: S( R( z- G; A* ~
0041DCF7 |. E8 54C70C00 CALL flashget.004EA450& O6 O" R8 j1 b( |7 t
2 i# S; b, S9 H; W: b% g" R9 e1 p7 h( d
分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向
0 {, e" b; D& j1 i* t……% o# S* ^+ H, i7 q
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B/ U% }7 ^% y. ]. j! T
……; l& r& W! z' F
0041DD35 |. 0F84 40010000 JE flashget.0041DE7B
4 ]% r' w8 _8 g0 A7 s. g- n……; y: M6 e' o t
0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B3 t0 O/ P2 g* Z, V" B1 c. E a
……
" R1 H8 s: e& X: A0 t0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B
# M- p9 p) C2 Q4 W, v……
0 Y4 m' K8 d) \7 Y* R l S7 J! R0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B1 l7 P# _. w P3 M% A
……, g/ Z9 K. q. N' D
;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位
- Y' s/ F: h! {4 m# c0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F0 g# X2 y- U( a& r% r! V
0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]
j2 \ Q, X2 M0 i5 x0 N9 }0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]
" L# R3 ]3 I) z% a* h0041DD91 |. 83F8 2C CMP EAX,2C% J9 Z. k# f$ h0 w$ H1 U0 A# M
0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B) c |5 s R4 C/ D- s! \
, X/ D% o1 L" {4 c; M7 C% A( s
;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,
X" n: k ~1 t6 B;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]* _0 n' U( x6 O! m4 q# M
;这次破解我们用的是fgf-的类型的密钥$ @# E# H: S: S4 M, }2 O2 ?
0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"6 F0 ]* A3 U+ J' [' H
0041DD9F |. 8BCD MOV ECX,EBP" x% f7 D$ q) r# h1 x' Y3 ~
0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE6
, @7 ^" Q3 X5 M m- F8 Z0041DDA6 |. 85C0 TEST EAX,EAX
0 v& V- u, c( M, J. a# |, B0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0( U1 M! c" P7 W+ S' ^) O1 \- ~* C/ x, N
0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX
8 q5 R7 l$ ]- R0041DDAE |. EB 18 JMP SHORT flashget.0041DDC81 r3 a3 d4 A1 i7 i
0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-"
: s5 m2 }( l) ]+ @# B7 Y0041DDB5 |. 8BCD MOV ECX,EBP' ]& W6 D( E: B6 N0 R
0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE69 e9 }' Y9 U( Q; W& P: q
0041DDBC |. 85C0 TEST EAX,EAX
: o1 h @7 \) I7 s- f' S0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B
. D3 P7 ]6 y+ `0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX1 b3 o; X7 P6 r p7 w+ ], q
+ ^; K7 E- ]0 ?$ O8 u9 s0 H% q7 ]9 _0 t" A
;下面是对KEY的验证算法
6 Z9 Q; b: ?9 X0041DDC8 |> 6A 2C PUSH 2C
' x- M1 k3 g( d x" ^7 b0041DDCA |. 8BCD MOV ECX,EBP! q5 m8 |8 R& F% l$ j- p- C
0041DDCC |. E8 7A680B00 CALL flashget.004D464B' B, f. a, a# }/ g+ o- S0 r- p" y! A
0041DDD1 |. 8BF8 MOV EDI,EAX- y1 a$ h D# O
0041DDD3 |. 33C9 XOR ECX,ECX
4 _% w U, q e: r3 h1 V. V2 V3 ~0041DDD5 |. 83C7 04 ADD EDI,4+ x* p! g$ Q9 P2 v% U- D/ @
0041DDD8 |. 33F6 XOR ESI,ESI# O* X2 b/ I; F3 Q7 o
4 |* z' }2 u1 \" Q) |4 Q7 h' }- I
分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有, }2 r7 j1 c, v# [
0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]2 P& J) m; u9 Y8 S/ O& W+ v1 }1 f
0041DDDC |. 8BD6 |MOV EDX,ESI
* y# ^, F6 [# m7 s0041DDDE |. 83C7 04 |ADD EDI,4
: ~* t6 {9 s# \: V* ?) a7 W0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2)
6 O; c9 l6 l+ u$ n0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX# R/ e- t; Y3 r5 _ R
0041DDE8 |. 74 26 |JE SHORT flashget.0041DE10" j! U, b6 i/ c0 [2 _9 I
0041DDEA |. 4A |DEC EDX
0 L& L* t: w" I; e3 B/ ]0041DDEB |. 74 17 |JE SHORT flashget.0041DE04
% h! |, ]1 h1 @* p9 C0041DDED |. 4A |DEC EDX' T, N6 c5 ?! Z+ `4 T
0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28
- m0 z0 |& ~' c2 h# Z- x
8 h9 W8 D1 ^" z" r0 v0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1* `/ q, T' X6 j0 N; y
0041DDF5 |. 0FBED4 |MOVSX EDX,AH
; G9 q9 i ~5 R* d7 `0041DDF8 |. 0FAFCA |IMUL ECX,EDX/ A3 T8 n: j# w `# `# \- j
0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]7 A0 m8 m3 H: N4 ~9 }9 E
0041DE00 |. 03CA |ADD ECX,EDX
/ H3 J: e* ]$ S: {! ^0 l6 |; T, z0041DE02 |. EB 1F |JMP SHORT flashget.0041DE235 y. ~7 x! T8 [8 [, |& o( ~
;ECX = B * C + D
/ f7 h, ]1 y, [4 T y$ W9 | O, f* v, p& v" R; U
' Q* Q9 |9 G% B0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE16 J9 N L- ~0 Z" g" b" h; \/ q
0041DE09 |. 0FBED4 |MOVSX EDX,AH
7 s: {. H5 I5 Q8 D& l0041DE0C |. 23CA |AND ECX,EDX' Q# X3 C9 G9 I3 P
0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B: S2 ?/ W" V' ]* U; N
;ECX = C AND B+ Y n# X+ w8 d X) K G
7 K: V3 H$ O. K1 l, X0 V- m
: n" z/ n8 S; `% H6 e
0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE19 o4 U1 J3 E2 u. A3 ]6 k; ~
0041DE14 |. 8AD4 |MOV DL,AH3 k4 X& W3 V7 D5 u2 \
0041DE16 |. 33CA |XOR ECX,EDX
/ n7 r0 l& i* u( _ U" m; V0041DE18 |. 83E1 7F |AND ECX,7F
: f {- R& O5 H2 T% E2 C;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的$ u7 z0 C8 B6 G* I8 o% f7 @
) n9 ?% w0 W, Y( C( R) C. w G: ]5 p
0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]
% u$ A4 }& U. v0041DE20 |. 0FAFCA |IMUL ECX,EDX
7 t- P( O2 j1 \& i; h;ECX = ECX * D
" K6 p; b6 U, s" {$ {$ Q9 Y( ]3 g) A6 v; y: }8 K( G
: S' R( M" E' Y! G9 S0 y- B4 Z9 x0041DE23 |> 0FBEC0 |MOVSX EAX,AL7 L- u+ q5 b! D, ~
0041DE26 |. 03C8 |ADD ECX,EAX9 N7 `& l, l( q8 Z a, F% f
;ECX = ECX + A* o2 b3 A; \+ u( c( q7 [( U( O* M, m
;处理后那些跳转,可以得到" r1 O% [+ D/ U1 Y# n" S* S, k
;Case 0:ECX = (C XOR B) * D + A( N* G g' w& c4 ?- g6 \
;Case 1:ECX = (C AND B) * D + A
7 o4 p7 G( M7 T: o;Case 2:ECX = B * C + D + A
2 X, @5 }) E7 }, A# F9 S8 v# d) J8 C
" h5 F- \6 ~8 W0 G3 b( ]8 J+ _& W- X# ^# D
" d7 |6 ]! ?* f;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法
) r7 a# s4 \' b* v;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,, d. j* w1 b. {: A" [) E) T3 s
;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,
' h [. q0 A9 O6 ~4 v2 Y;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i
9 v0 p: c C0 y5 @+ W0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE1( C/ O" j3 S+ n5 P
0041DE2C |. 85C0 |TEST EAX,EAX5 ?# X. e! \2 R7 ~5 y
0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C
8 r$ `3 Y" n1 u! V3 o, w9 m0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]
9 \- I; P' ?, b5 G0041DE37 |. 83FE 02 |CMP ESI,27 T+ B) R% S4 a; e) d" W; w
0041DE3A |. 74 07 |JE SHORT flashget.0041DE43
1 D6 r8 W! K5 x0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]8 `% v6 k0 W: x- _7 r9 \7 S
- n( H$ W2 d0 A/ K
;对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。; D+ a. e% I8 z( g# m, L
0041DE43 |> 8BC1 |MOV EAX,ECX
; N$ t# \, T$ F) _1 s& ]3 f0 X0041DE45 |. 33D2 |XOR EDX,EDX+ e" b2 p% _4 ]
0041DE47 |. F7F3 |DIV EBX* e# k* r0 ?. w& R' \( Y& C
2 i; @8 Y* C5 ~4 P4 B
8 q6 w4 e3 L" S
$ v: f& N3 e( Z# o6 x;以上是对指定段的KEY的验证运算,下面是对结果的判断. U1 \2 Q& \3 Y" E7 F- V7 M
0041DE49 |. 8BC6 |MOV EAX,ESI
7 j* M9 Z3 \- F& r/ ?3 M% F5 w) _/ n4 W' z0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2)
/ g& p* h! V4 j6 R' u$ }0041DE4E |. 74 13 |JE SHORT flashget.0041DE63
* x/ K L7 i: D: K- [0041DE50 |. 48 |DEC EAX
6 m- w) I7 a& a' ~0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C
) }8 S; A! ]& V0041DE53 |. 48 |DEC EAX5 a+ t. o: l' v( C& f) w4 X$ Z
0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE67. Y% b% i( o; g9 A! l$ h
& O$ E7 b+ v# }; T0 q;余数是否为0
0 g. ~8 c; m7 |# {8 h/ O0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B
1 d% |" O0 T8 H2 |8 O4 E" b0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE721 T4 c* ^- G3 c6 ~7 Z4 h' S2 V0 z2 r
0041DE5A |. EB 0B |JMP SHORT flashget.0041DE67) y2 l: ]% U# e: L
& g; [3 C$ B7 w% L' W;余数是否为8
0 o8 D. F5 P* @* y8 i0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B
) J0 d1 F% c2 u g8 z3 b0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72
0 m9 z q( a) F! G+ k0041DE61 |. EB 04 |JMP SHORT flashget.0041DE671 y/ X5 o2 c* F l0 T% e% b5 T
! j) [# W+ }' H J8 v;余数是否为0, b2 X, z c8 K' i
0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B9 V6 ]$ @4 l" |5 F" t
0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72
& r* n9 k5 D3 x- i1 E
( S" A) ~* z" T4 u" y0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B
5 V: M0 {! Y0 N" N% x5 ~5 g* n" M0041DE68 |. 83FE 03 |CMP ESI,31 S6 O7 l% N$ C: }: t% p5 N
0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90' h( q6 v2 _& e4 n
0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA* m h9 b1 H6 [& I3 q2 a* _
' B$ C, S( U; z所以这三段的KEY的验证算法是:( {/ Y. O8 ?/ O: G
Case 0(B XOR C) * D + A) MOD X = 0,这儿X是'k' f4 V: ?6 c8 P$ b0 w; ^
Case 1(B AND C) * D + A) MOD X = 0,这儿X是'e'! R: r9 ^4 K$ R8 e( @/ y) E
Case 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'
7 L4 \+ y- f! r) C
6 `. {5 _9 F. ?, ULeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……/ a1 l6 ^4 ^/ P( M& ]
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]4 N$ N( e' Y1 f
0042514F |. 83C0 10 ADD EAX,10! b2 B+ C, D) F1 s+ l3 W
00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX# H* c: B# O3 Q8 X6 |
00425156 |. 6A FF PUSH -1
7 N# a9 [% S, _! R0 G. C6 T00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]
: J6 T7 w7 f5 Q! J/ T4 B0042515D |. 0FBED5 MOVSX EDX,CH
1 Z, h' K9 O- u. M+ q; Y00425160 |. 0BC2 OR EAX,EDX5 ^+ \6 J! h9 X2 B: T0 v
00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]
+ N' E# ]9 n+ i1 A& i00425167 |. 0FAFC2 IMUL EAX,EDX( z" T5 _+ J2 t4 }$ b
0042516A |. 0FBEC9 MOVSX ECX,CL) E+ r5 _8 F! g: V% @$ C7 a
0042516D |. 03C1 ADD EAX,ECX
+ _- g3 W, s" y4 I+ v;跟踪分析得EAX = (B OR C) * D + A
3 ~' h/ x7 {# I8 F: r g& v' P( D' D, O- G8 ?/ V8 |
0042516F |. 33D2 XOR EDX,EDX
( `# |2 G( a. ~( w0 N9 f
; K5 |/ E+ i1 J9 Z;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i'. D! E9 x2 ~7 B: _$ J! ~
00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]
! B7 `/ t4 r7 D* j+ l$ y00425178 |. F7F1 DIV ECX
8 h2 f" r1 K5 v: M" G) u, U1 W0042517A |. 8BCE MOV ECX,ESI
( h4 P g# d2 m' O e
6 ]4 v) A0 m) |4 b) u;判断余数是否为09 S |, O& Z/ S
0042517C |. 85D2 TEST EDX,EDX; y- h# N, w' F3 |* m7 ~+ w& ?
0042517E |. 74 1E JE SHORT flashget.0042519E+ t4 e9 V |' L7 P' N
& K; b& F5 _# o8 k/ S4 a
所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'- K; Z, I% I! M, n) S O
* s; E+ q, x) R& T) L3 x6 \7 i
e/ \; W3 B6 G1 j9 c' P只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:; g8 Z* W& x% f4 r8 q* K* u0 R% G/ T
Randomize A6 {( u) [- v
Dim intEbx As Integer
7 H: \! H- D+ i; m Dim i As Integer, j As Integer, k As Integer, intChar As Integer. ?* v9 e8 K1 H, _; `6 V0 }, }. }5 s
Dim strCode As String9 x, _/ L& W. Y( w
% o a9 a! q" I, z/ A$ t5 m" t If fgf Then
* ]. k4 W/ b' z- J# | strCode = "fgf-"
4 ^, A& g1 b( K: [6 A intEbx = 118
; |& T3 @/ G* t6 q3 F& S Else
( R; a3 i0 L' ~' o7 k0 C e strCode = "fgc-"
2 k T2 S4 m" D3 r( o) J intEbx = 1050 |% A% p. y! S$ p) T! y# h8 m
End If8 p. P' Q3 Y* N( _
( W8 q' K7 a2 j m2 {2 [
Do& E4 o0 u, i& U* {+ _3 b- `
intChar = 97 + Int(Rnd() * 25)9 |' h+ g+ e; t- o) k
For i = 48 To 57: X$ t) |2 u, D6 B q1 R) M* M
For j = 48 To 57& p- |) J# W1 W/ ?- w
For k = 48 To 57( h% ]- ^5 G# [' b9 o2 C) U' X
If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then
+ q* k9 ?. Y1 Q' d5 H strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)2 P0 q+ N' I1 E) H0 X$ l
Exit Do
* N+ a( H4 L" Z Z9 S/ j End If- V) A5 i7 Y6 n8 K
Next k
& E) z1 E8 Q" Q, f6 V Next j
a& g: R4 m: F: z' V Next i
; e; A) g; M _" C2 n8 T: p Loop9 l- S: B( J; C7 b" |6 T
/ B" x: R3 ^2 G4 g$ F1 D
Do* Q4 d, T+ p% s! ~
intChar = 97 + Int(Rnd() * 25)
; R6 L7 l# \' `8 A For i = 48 To 577 }: [( A: K3 b) [3 [; H/ Y
For j = 48 To 57
1 ^8 K$ J' J8 m" | For k = 48 To 573 n! [) Z! o) z: V. v
If ((i And j) * k + intChar) Mod 101 = 8 Then
3 t. ?; C( u4 r1 W7 D strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)6 P+ P! i5 w4 y- |9 K5 H
Exit Do- K d/ u0 C' }2 Q6 y2 D1 r
End If( q/ @0 v2 i* \+ b0 T
Next k
5 g+ L L% ]& { J Next j4 l8 _% A3 N; n% S0 v, v
Next i
6 ^% j1 U* s) q; Y1 n) O6 n Loop
9 P# a, K7 J/ M
' T* f1 `9 T [3 \0 i& M Do$ n$ ?# x1 v3 w J
intChar = 97 + Int(Rnd() * 25)
* M0 ?! t V# k$ `6 b For i = 48 To 57* t; I# `/ k7 _! @" q& L+ o; u
For j = 48 To 57
& U* x4 ~- ^8 q" Z$ X X X3 x$ a For k = 48 To 57
0 I& o+ j1 i: A, i If (i * j + k + intChar) Mod intEbx = 0 Then5 i5 ^3 q! @) N6 [+ X1 q$ f
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)1 h: W9 T/ a ?# ^9 y- f
Exit Do. W9 L5 r4 _$ X$ a; L
End If3 p( ?& c. w$ N$ w' f* C
Next k
& ]4 G4 P. a( i- u5 M$ Y+ V Next j: U) |' N+ ~. i" s$ B! R% R0 ^/ `
Next i9 N! o. H U5 h9 {: R1 ~& V4 |* j% |
Loop$ ?- j- k: c5 {+ `7 ] N; [
1 t; c* t- p, m, i- n Do- R2 Z, B! y7 t+ c$ t
intChar = 97 + Int(Rnd() * 25)
! g4 K) @' _5 a: ? For i = 48 To 57
5 {/ Y" w+ Y" y# b L+ k For j = 48 To 57
: k6 ?+ O& b0 s4 { For k = 48 To 579 X0 `7 H+ P$ I. e; I2 \
If ((i Or j) * k + intChar) Mod 105 = 0 Then
$ W: d! ?/ C: ]! c) j# ~9 L% d% C3 G strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)% |# h0 y# W4 L3 E; c3 Z+ D
Exit Do
' R, N# p) d6 a* S9 s9 m6 h End If6 R1 r& c- q& r. @+ o
Next k. B2 j% d! U9 T, d( N9 R7 S% l9 |0 p
Next j
7 n- V# I6 m! Z1 W. O6 R Next i
( F, K1 E7 m7 Y9 o9 k& M Loop/ a, ^( Z0 K# |2 R
% n, y0 x# `/ a. C3 r! m" X) t5 n
( g) [* {; x, J' a '后面的24位随机生成。! h! s( [8 P9 M. Z
For i = 1 To 63 N8 d7 D N( @, M+ z0 X
intChar = 97 + Int(Rnd() * 25)
, m" w; M4 }& H- R strCode = strCode & Chr(intChar)
! ~2 Y1 ]/ _) N$ d" D, U For j = 1 To 3! L. e8 d+ x- g4 R! F: N
intChar = 48 + Int(Rnd() * 9)3 _/ h# H: C5 e3 V0 G0 D
strCode = strCode & Chr(intChar)
/ X0 S7 y) w3 F: v" o Next j
: ?2 x% y5 U! v, t# ?, I: I Next i6 M" |0 e1 Q6 K0 I7 Q
: s2 c h! g* X% m' k
) x! ^! Q8 g3 M7 d7 a+ s Y5 m最后字符串strCode就是所要求的KEY |
|