|
Eagle的破文:(重写)FlashGet1.65的算号器5 ]0 g8 D. V m" X0 p
' C- D" v) S) a4 P. t/ \& ]
再次声明:本破文曾发表于www.chinadfcg.com
0 l3 v3 X S( Z8 c声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。
' U( e" U% a& P" I! p% o& V' y( E) [8 N2 t- @) T8 l; T
【破解作者】 Eagle1 n. A4 m8 H6 v: s% \
【作者邮箱】 eagle_twenty@163.com' w- K" T8 b' k& j% P
【使用工具】 OllyDbg1.09/ g0 y3 B. h! K" z. J+ F
【破解平台】 WinXP" f) F+ H# y. _* o6 A, R
【软件名称】 FlashGet1.65
& O4 I6 s5 Y% Q" Y W【加壳方式】 无壳
, `! q& L5 ?( s$ ^【破解声明】
" z; a) P( D" j--------------------------------------------------------------------------------! u6 Z5 t, h$ r0 F
【破解内容】
, n* i6 K+ j0 u$ ^0 ?) f3 |; c( u: V
9 H* m( E7 d6 _) O0 u
安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。. a# d1 D' {* A* o& h9 P
9 l% N% V1 R( e- e2 {
1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行
( g) Z3 y: K/ h7 v% ^$ {2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码0 I( E# L. n5 g1 U; r( i
0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"3 y( l( [& ~: H
0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C]7 e7 S* |5 r( N
0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General"
6 d6 L) B- m' g, F0041DCF4 |. 51 PUSH ECX& l" b, B' f5 j& G4 s- P5 y( p1 ]2 ^
0041DCF5 |. 8BCD MOV ECX,EBP/ M( ]% j. p, @7 e# a/ R9 C
;这个CALL将从注册表中读入注册码) u* \7 S1 S" s0 d! Z
0041DCF7 |. E8 54C70C00 CALL flashget.004EA450* X0 j$ r! U9 Q/ P# D
- P( c3 J$ g5 f }
1 h7 G/ H! Z1 v5 c% j8 _8 k
分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向" T& y4 z* q' a- O! [2 P
……( g# G5 a8 [# h. v
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B
- ?* w( H9 [% c6 q {- k+ C6 G4 l1 x……
' V7 Z3 K7 z( M: `! p }0041DD35 |. 0F84 40010000 JE flashget.0041DE7B: D6 Q" A" @" c4 R' m9 \/ S
……! i1 m0 [& K$ Y
0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B
. v( s1 f. f8 B……) e/ q3 j% X4 R
0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B
* j3 w, }% B. |# k……
/ L2 |0 D+ H. ?( x- t# p V0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B- [# Z( c1 S( {6 X
……
$ U6 b5 E$ O# H;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位# ^' S1 G, {2 P) h% }8 Z
0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F
1 h; g0 d% k/ c8 p" ^' e% t8 C0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]5 H0 h- q M( n! ]/ A
0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]$ C1 j/ R, |1 j$ O7 u2 o4 p+ {
0041DD91 |. 83F8 2C CMP EAX,2C
0 {' I/ S+ y+ a5 m& F( w0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B
% X7 U5 a& x: Z R. T. X& ?
8 u3 {% R4 B4 c;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,
7 n: m5 s! ?0 n9 @: ]: I6 ?: I5 D;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]
. n* O* i5 N6 F( t Y+ c8 s' F8 I;这次破解我们用的是fgf-的类型的密钥
8 H5 u, _) u. u+ h% V0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"; R6 ], x# J! m# b
0041DD9F |. 8BCD MOV ECX,EBP. W2 y* }$ R* g! L9 X
0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE6
; q! C7 h# \* k1 f" P6 z& c% q0041DDA6 |. 85C0 TEST EAX,EAX
/ E+ N! W$ C' H# D* L& H0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0
: C4 |) T2 g% T% e% o0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX
; A; Q' c" V- Q5 Y: V- P0041DDAE |. EB 18 JMP SHORT flashget.0041DDC8
9 }1 s' D: [ X8 r* ?0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-"
" T# [ W+ w' Z! K8 g% m7 C0041DDB5 |. 8BCD MOV ECX,EBP
+ V6 B( j! a; w1 R4 [; }# U+ F7 ?0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE6
: l" _4 p/ i9 V9 B6 V8 L0041DDBC |. 85C0 TEST EAX,EAX S; H# D2 ]8 K) ^4 i: K
0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B0 y9 u( n2 C) n- [& |8 f
0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX9 }& \2 \4 Q: B h. f/ `
6 W, ?# z O m3 H. ]$ S; \
" P, a- Q o% u2 B4 v;下面是对KEY的验证算法
3 w3 z) l' m& E) ^1 f( v( {- ]0041DDC8 |> 6A 2C PUSH 2C+ J& M# S* ^/ x" f2 y! a8 s
0041DDCA |. 8BCD MOV ECX,EBP0 y$ C0 c Z P& c0 b$ Q9 k
0041DDCC |. E8 7A680B00 CALL flashget.004D464B
- ^( g! U# Y# {# ^, T P6 ?, }0041DDD1 |. 8BF8 MOV EDI,EAX
6 f7 Q( Z7 T& p+ a6 _0041DDD3 |. 33C9 XOR ECX,ECX, c, Q6 P f5 I4 n3 ^* n! q: B& J' S
0041DDD5 |. 83C7 04 ADD EDI,4
3 E; L, o/ E" \0 \! l9 ^" Y/ w0041DDD8 |. 33F6 XOR ESI,ESI7 ?9 b$ E5 Z" ~: c- ?- R7 ?$ @9 V
/ y. o: T% v: O3 I+ ~
m9 l/ W1 O8 S1 f8 L, Y% X分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有
8 O) k$ X) u# f; [6 S# e0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]5 q6 p; V1 s: ]+ S k2 ]# p/ ?5 {
0041DDDC |. 8BD6 |MOV EDX,ESI
5 V* ?* p3 S+ h& e1 j: s4 P0041DDDE |. 83C7 04 |ADD EDI,4
$ [; h$ z1 Z, K* U0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2)& n+ z; f' j+ a0 _% j' I
0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX
/ F- I7 ^+ T- F# L; \0041DDE8 |. 74 26 |JE SHORT flashget.0041DE10
+ I& C5 g+ o% M- R5 ^0041DDEA |. 4A |DEC EDX
$ M; a* ]! E0 V* P, p. W! c7 Z1 @ c0041DDEB |. 74 17 |JE SHORT flashget.0041DE04) u( b# f, r& n) S6 k* X# p
0041DDED |. 4A |DEC EDX' @& ~, \6 O0 C5 B" [( Y
0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28) w1 x5 f! T! [' Q+ b% u1 L
: g* v: g- m, Q# p/ B2 M" A
0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1/ R% j2 M4 ?$ T7 i
0041DDF5 |. 0FBED4 |MOVSX EDX,AH
1 k& q3 c2 g- m/ |' ?0041DDF8 |. 0FAFCA |IMUL ECX,EDX1 H% m; t, |2 d# n. X5 y/ x
0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]0 M4 Y1 T! e& k' U. F
0041DE00 |. 03CA |ADD ECX,EDX
: K$ Y$ U* N, I+ H7 u0041DE02 |. EB 1F |JMP SHORT flashget.0041DE23. Z# F1 x* n8 n4 m
;ECX = B * C + D8 r! {: T: O- x M [- @# \! K, l
) U- j; T% _0 B& ^# Z0 F' q% x% f" x
0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE17 D3 G1 p. h' s7 \* n8 l* m" F% A
0041DE09 |. 0FBED4 |MOVSX EDX,AH' a! t! p! s) y& W2 X4 N+ H) L' E
0041DE0C |. 23CA |AND ECX,EDX. n2 @* r0 J- _
0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B9 Y# _! D, E, T D) `
;ECX = C AND B- Q+ w2 i4 ]; } \. v* G" b* v* T
% K f" t9 y, z) J* o0 r V0 G; W4 R. y$ p) }
0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE1+ I2 @, h0 f% a$ ~' e3 Q; k; _: v
0041DE14 |. 8AD4 |MOV DL,AH
$ }( Q* z+ B) @5 }. e% k* Q0041DE16 |. 33CA |XOR ECX,EDX( j4 S, O4 W% t
0041DE18 |. 83E1 7F |AND ECX,7F! n) H. r& r" Z& T9 }
;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的
% x3 Y0 j: l* h& |3 r+ l8 X5 X; J) r b8 z: s# l
2 Q1 B; i* d8 |1 H t( A i
0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]
/ r2 }$ y: V( T+ }0041DE20 |. 0FAFCA |IMUL ECX,EDX- q; t2 z) ~ O* I* f
;ECX = ECX * D$ K) q/ n- \5 T6 E
! O8 l; }) h! Q* D5 N" r+ K2 z/ X0 p9 K
0041DE23 |> 0FBEC0 |MOVSX EAX,AL+ Y. {# @6 p- w* S- |, e: |" X
0041DE26 |. 03C8 |ADD ECX,EAX
& @) @5 m5 X2 U7 b2 T$ H;ECX = ECX + A
# I( J; T6 u V. X0 {5 u* ?& x$ ~( Z;处理后那些跳转,可以得到
+ T- r6 D! e7 V) T;Case 0:ECX = (C XOR B) * D + A2 z' |$ Q* C- x# `9 X
;Case 1:ECX = (C AND B) * D + A h) R4 F3 c9 T" b' E
;Case 2:ECX = B * C + D + A- l# B. o6 a- _
# H" ^& j+ j, [0 D& C* H' [+ z" C" {+ e' `" Q# u$ x
, m, H& M- c% I2 c5 f( ?;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法4 W" f2 e) t* L9 t
;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,# o$ m# g P ^* e4 `4 J$ o
;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,. m# ]* f$ C9 e9 w
;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i3 d' Z. X& x* T$ n
0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE1) i+ U1 J2 a. E8 C3 x* x( A
0041DE2C |. 85C0 |TEST EAX,EAX- k L# }( M! C7 w7 I0 G& W/ z# X
0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C4 `$ ^. Q6 C7 V/ D/ j; O$ t3 E# ]- ]
0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]4 K5 |; j# i: z: z
0041DE37 |. 83FE 02 |CMP ESI,27 [) K: s# ^( J" V T) j3 g
0041DE3A |. 74 07 |JE SHORT flashget.0041DE43& R5 h7 U$ G+ u# g& e
0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]& _0 n3 o) y9 }3 ]! e8 j3 K; B
. N' G# ?" V9 u2 _8 E! M
;对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。
! j6 z2 j# Z/ R, l% k/ w# p0041DE43 |> 8BC1 |MOV EAX,ECX/ S0 i' I s# ^
0041DE45 |. 33D2 |XOR EDX,EDX7 u) m9 ]- h. ~& G5 h; j0 Q* G5 H# m, I
0041DE47 |. F7F3 |DIV EBX, A$ G4 Z7 C" h* p! O
2 D V1 a" f3 o1 C
* F( o1 B* L2 ~: h" l) Y+ M. p, K* @! k: w0 v8 `
;以上是对指定段的KEY的验证运算,下面是对结果的判断6 L0 r) V" ]: w) q
0041DE49 |. 8BC6 |MOV EAX,ESI
4 n/ n. h3 E, v0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2)+ g! a' r/ R( Y# M$ y# g& F, C6 s
0041DE4E |. 74 13 |JE SHORT flashget.0041DE63
# b; e( g9 e7 _2 L0041DE50 |. 48 |DEC EAX
8 f9 \0 ^4 y) q( b* E' b0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C
; K5 G* y8 ?1 S0041DE53 |. 48 |DEC EAX+ ~! E% w' p1 j: y
0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE67 o' z' U! Q: f8 {& M+ f2 p& N
0 D# ~8 c7 f0 @: T
;余数是否为0
! t5 c1 v {+ X0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B
, [' w$ U ?& j' j0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE72. _& M0 s/ P' o. Q$ @
0041DE5A |. EB 0B |JMP SHORT flashget.0041DE67
+ E; J- o6 e7 E, L
2 K1 N$ C+ i5 |, c+ u* A;余数是否为8& B, ]. h3 R3 k9 b2 X3 ~0 ^6 [
0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B/ v, ]. R* }; V! E4 |" P' ^
0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72
5 {8 G% D. o0 S3 B9 a, D$ k9 B0041DE61 |. EB 04 |JMP SHORT flashget.0041DE67
5 l+ A( e3 S5 T8 }- H; m' }( Q( T I: C9 G) _( V/ T
;余数是否为0
4 H' t3 E' a; U9 p* h0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B: P" O! s% Q, t7 A+ Z1 J0 W
0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72
; A% Q5 n8 g; D
" e& o& p" d" m0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B8 s8 ?3 E6 W4 g) p( N
0041DE68 |. 83FE 03 |CMP ESI,3
$ u# O' k. ]9 U: P: Z0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90
, H7 u. S7 `$ B+ s0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA
% _0 \2 t. _: ~# }
; W7 J' r# w' T+ Y# t+ A8 E0 F所以这三段的KEY的验证算法是:
) [" n. _& A c- a% U/ Q% bCase 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'
1 h4 D" x) J: k8 T: |6 x1 d. NCase 1(B AND C) * D + A) MOD X = 0,这儿X是'e'
" H# G, W. ?: j; o1 ?" ], T/ S" [Case 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'
) Z/ _ h0 X( J5 {# T4 q8 @. ]/ e4 r% D" _) t r+ A8 d
LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……' Y/ U7 U' t0 V. k" Q
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]% f. {0 R! R8 `# [" H
0042514F |. 83C0 10 ADD EAX,10' O* t0 S% B- E9 `( G
00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX
/ O" A; F& R5 [% }5 i00425156 |. 6A FF PUSH -1
# [* s- X% X2 ` t9 ]6 n1 H S00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]
. G: w7 S9 E! a6 j& r9 j; X( A0042515D |. 0FBED5 MOVSX EDX,CH
1 n- e) }) O! Z ^3 M+ g" m; ] p2 X4 x00425160 |. 0BC2 OR EAX,EDX
" W/ }3 b c0 [, k# |' m00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]
. t+ p, I7 ~0 j00425167 |. 0FAFC2 IMUL EAX,EDX; ~5 J) Z% _5 z# t5 Q' D
0042516A |. 0FBEC9 MOVSX ECX,CL+ M: M/ Q' w N3 A0 z
0042516D |. 03C1 ADD EAX,ECX
6 r9 g0 T" l$ W% H$ q! \2 s! n;跟踪分析得EAX = (B OR C) * D + A) j0 X# m5 Y' _" E+ g
9 L' H4 T! N+ s
0042516F |. 33D2 XOR EDX,EDX
& b# i7 g, R5 ?1 F( X/ Z) j; C
5 k+ [2 u; E2 @9 W9 p;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i', l7 z. A7 ` ]" n9 T* N4 B. W
00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]
0 @+ `3 `4 A+ o1 w3 N; s$ J- D00425178 |. F7F1 DIV ECX
' h2 [+ u/ F( P, T3 \5 C1 A0042517A |. 8BCE MOV ECX,ESI
1 \: q9 a- C; v& B" q# q: x2 a4 y, D
;判断余数是否为0
& h, Q8 H/ @. W. @' G0 }0042517C |. 85D2 TEST EDX,EDX" U( a: }9 ]- _$ R
0042517E |. 74 1E JE SHORT flashget.0042519E, u Z6 w' M7 Q% L
3 _7 y& }. x0 ]; i9 {
所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'
. b$ ^2 u& X, U+ B$ M/ |8 b! G( u" l5 b0 |' t
! g' G4 M$ Z8 P- x只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:
9 F' q! W2 I# l0 W X* o Randomize
4 K( _4 i/ `* F2 _# Y, G Dim intEbx As Integer
, W/ {' B8 G8 b Z0 G! {7 v, ^! U Dim i As Integer, j As Integer, k As Integer, intChar As Integer
. }" d7 l3 p$ k. \4 ?& a Dim strCode As String
+ Y0 i0 @( @4 I' J) K, A7 z! D' J 0 _8 u# `! p: g) n
If fgf Then
1 X' b5 K* z( v6 f/ y/ ~; U strCode = "fgf-"/ Y$ v, D% Q2 R" `0 y* I! y" x4 z
intEbx = 118
( F2 A; ^# c& ^ Else
6 e1 w }5 c6 e F0 { strCode = "fgc-"8 d; y0 V) G0 }0 U/ M% L
intEbx = 105+ z" B& S* b; I, T: ?
End If- ^% V2 {( f1 C& A0 s2 |, E
+ b4 a1 x) o9 M
Do
! ]! _0 J( i4 u) K6 n- `# y intChar = 97 + Int(Rnd() * 25)9 D9 F0 @' ~; W! ]. P. j( K, n7 w( H
For i = 48 To 57
( ?+ q% K- P4 \' k& Y- K2 J$ | For j = 48 To 57# g; w1 w' R: e6 U
For k = 48 To 57
$ F1 s. G& j E9 D7 g9 Z If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then
- r" |3 `3 \$ e strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)3 n# |. A+ [$ ]) i" q; G
Exit Do
- @& ?' H' S; |2 j End If, ]; ~; O d% R1 A% {# }/ e
Next k
- h2 e7 h: w$ D$ f, E Next j
& U1 t* B G1 D* l0 A- c0 A3 \8 x& S Next i
) B, U- b) H6 j+ @* i7 ^ Loop" X& r' u( o8 _9 p7 u: \5 y
4 l( o5 s9 O8 l( h, Q* M. U Do% r& M3 h5 A k# u$ y3 }, [3 O
intChar = 97 + Int(Rnd() * 25)7 Z" y( k" G6 b; N0 _9 J. ^
For i = 48 To 57
( L/ \" U7 g( u4 E" v For j = 48 To 57; E2 \, U4 y1 \0 }0 Z
For k = 48 To 57
* h7 J( @# \% O If ((i And j) * k + intChar) Mod 101 = 8 Then
' Z! I" R; T$ }! Q" `) U strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)/ @ p$ y8 r0 S9 h3 r7 \# T
Exit Do
' e& G/ c' |8 `' p9 |$ L. Y7 G7 |- G End If
' v& { @! L( h. v& y5 F Next k; Q- N+ V/ } V' }4 x+ V9 n
Next j
R5 C+ T" \5 J8 h! A* a Next i
; |5 G6 h8 K' {' o Loop) H. b( q9 M P$ a
- L9 Y/ B7 E5 u! {* r
Do
1 Q6 r8 E* X& ] intChar = 97 + Int(Rnd() * 25)
6 e- N9 _: Q2 w' k r For i = 48 To 57' s6 E5 J. c* r9 S4 {( f
For j = 48 To 57
( v" p; d& H& a! o$ E For k = 48 To 57
9 f) t& j% v5 Y# S; { If (i * j + k + intChar) Mod intEbx = 0 Then, |2 j! Y/ y1 }& @" @$ P8 a" t2 ?
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
( R1 s$ \1 n' k Exit Do
. i' B9 Y" ], H; x End If1 ~) z/ _; Y R8 h4 s3 V/ M- v
Next k! n# m, N- ]! C* Q/ |7 a
Next j
3 ^$ V# O/ {6 n6 C Next i5 ^) C( A s8 I6 L6 @0 a
Loop
$ B2 I' s! k2 T ' Q1 ~: I. V. a8 F0 k
Do; B- R: s+ W; _3 B, Z
intChar = 97 + Int(Rnd() * 25)
+ C0 ~( Q8 L, q% v& c l For i = 48 To 57
7 ]8 d I' T& l( i+ S For j = 48 To 57
8 n7 g% V( o! c* Q1 o4 t0 T: J For k = 48 To 57
6 \) p5 F. J" |$ @ If ((i Or j) * k + intChar) Mod 105 = 0 Then6 q0 u) {! [ Z- I7 p) Z z
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
! r0 K$ w( w" G5 U' K) p Exit Do
+ P k; J" h( {7 ?' t1 K- y# L End If
% N% _ M/ K( O8 h% t: _ Next k
) U" F& S3 ?3 T, C7 i" } Next j
, t! g; S2 ` j% ^4 F1 p Next i
: W" Z2 A& C n3 E Loop' Y. z# [* s" S
6 s3 |3 m, v/ q' N5 p6 B. A- K4 o8 q& v
'后面的24位随机生成。6 Z |' t- F- G9 [1 x6 t' v$ @2 f
For i = 1 To 6
) \5 W$ U S% h intChar = 97 + Int(Rnd() * 25)
: U% `) O' Z9 `* r2 E, ]* e$ r strCode = strCode & Chr(intChar)" q# X0 V4 t, j
For j = 1 To 30 @2 O' S, z, N% v; o, H1 |
intChar = 48 + Int(Rnd() * 9)3 {2 e# ]7 w B X0 d
strCode = strCode & Chr(intChar). K0 `! a8 b3 G8 o9 j
Next j8 g; m* q/ ]% t
Next i! U: R9 f3 N- U- Y" o% l0 M5 r
2 M2 d+ E; L% V" {9 A% r' P/ ^. \) D$ f# E( r
最后字符串strCode就是所要求的KEY |
|