|
Eagle的破文:(重写)FlashGet1.65的算号器6 {) G* R. _" c4 d
' m G9 p6 Q) a7 ~9 b l# `
再次声明:本破文曾发表于www.chinadfcg.com
. q# Y. a3 O: Y6 V9 X/ J$ z+ F/ z声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。
6 c I: X$ `5 t$ _
: v5 L& y* @4 Z【破解作者】 Eagle7 x$ M6 E: V+ S& m. d' |
【作者邮箱】 eagle_twenty@163.com
6 L3 d( F, |8 W/ i: t, V9 l, u【使用工具】 OllyDbg1.09% H! W( x- P) V: ^; @7 h$ z1 _
【破解平台】 WinXP
, y. r. H+ J/ u【软件名称】 FlashGet1.65
! p( t( B: e4 r% @2 m( @' a5 Z【加壳方式】 无壳+ i3 v% Z4 C4 t5 ?5 q! e
【破解声明】 " y. ~# j4 M8 [3 o, |3 }) x
--------------------------------------------------------------------------------) t+ H. H8 i8 Q0 |3 D' D" t
【破解内容】0 U6 `& ^0 ]( w9 u1 \5 K
# E) X- A4 f8 X( t% ^- W
, t ^$ q' o7 w3 P8 A* t! j4 g安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。
: i9 O0 _6 P' t9 B1 s: W
/ I5 L0 s. f( U }% N1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行
C! x- x+ s% C& o+ V2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码0 J/ I2 y% c, O9 n! L. b M. E
0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"5 f3 D( u: m5 c
0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C]
' [. }& r3 U, \, [0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General"5 w$ c' y6 G" p
0041DCF4 |. 51 PUSH ECX7 m! E6 b" t; O7 k" M5 Q" P: K
0041DCF5 |. 8BCD MOV ECX,EBP6 j' H" A5 M/ E( R! A
;这个CALL将从注册表中读入注册码
: h% z/ a# i6 T/ y0041DCF7 |. E8 54C70C00 CALL flashget.004EA450
2 m) p) z. a6 M7 H9 m$ d e) T: t% @! r; H% v
/ g% D& j2 ]( L, K$ h* Y/ o分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向: E* l0 Q8 F4 F6 J. z7 Y: Z* A
……4 y( ~5 {( g) ~$ ^
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B
/ H9 s8 _+ Y" X5 D& X……
/ l% X# d0 O8 ~+ K0041DD35 |. 0F84 40010000 JE flashget.0041DE7B( j* ~+ A) a/ P# v; f7 z, K8 w! k
……4 A# B: E1 P! V) i* `
0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B
2 ?5 V$ W& P6 k# ~4 _+ H8 x……
8 o( ?- N- j- I& K/ H! }, U2 r0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B0 ~6 T5 x% X. ^1 q- w
……
6 S% t* z, F& c# M0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B
' M. `/ [% I' q: @( m……8 K" Q# v' q' e. l
;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位
' A5 c5 O/ z, S# y; r0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F
5 |' D. ^/ ] R8 Y( Q: |, |0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]0 }- D# N. s+ N8 x: m1 s& {
0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]
' B' c+ S: E+ _8 t; U F: W2 h8 r0041DD91 |. 83F8 2C CMP EAX,2C
1 b& V1 {* h3 f5 R! Y+ v( M0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B
' E9 {, |0 q# b: u. m0 `! G3 W. Z4 V0 V1 F2 a" X. n$ P# q7 z1 c
;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,3 V( F4 \8 L) O5 C( Z9 V; ?
;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]' F. N6 N- c3 M. {7 P# t7 n) `
;这次破解我们用的是fgf-的类型的密钥8 `/ f9 ]* c0 P7 [% m# ?0 k
0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"
3 t7 F8 R/ O7 `9 m0041DD9F |. 8BCD MOV ECX,EBP
- J. `1 K% y2 r) m$ A0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE6: G; a3 l$ R+ D4 T
0041DDA6 |. 85C0 TEST EAX,EAX' \7 U& v1 }7 n/ m* f3 n1 l# @+ J' K D
0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0
% N4 F5 J& r5 f$ c4 i! z0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX# q5 L& {+ l' Z+ F8 G. P$ Z
0041DDAE |. EB 18 JMP SHORT flashget.0041DDC8
4 C4 \% s7 r# h% n0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-"
: S# m. P! a* k* w: r0041DDB5 |. 8BCD MOV ECX,EBP
: G) I2 a- f+ Q3 t% e/ U* Q7 d; c- _0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE6# H8 }1 i# v1 d1 M3 K5 g1 m# ~6 p
0041DDBC |. 85C0 TEST EAX,EAX
& J7 ? W% O- `/ q" f0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B0 C# ]% n, g- y8 L
0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX
4 e# n! T& Y* H2 g: o- F6 \, o! [. R# X4 w. T& ]" W
. Z! t% r' c% m3 b1 B;下面是对KEY的验证算法- `0 H( I1 |8 C0 z9 D2 T
0041DDC8 |> 6A 2C PUSH 2C
( ]2 f1 \4 u( f2 A0041DDCA |. 8BCD MOV ECX,EBP, R$ o& e9 Y2 n4 [% z5 o
0041DDCC |. E8 7A680B00 CALL flashget.004D464B. N2 R4 Z4 _) J8 f- g d- t4 R, u
0041DDD1 |. 8BF8 MOV EDI,EAX" H$ Z1 X8 C6 W$ L% ?/ i. Q
0041DDD3 |. 33C9 XOR ECX,ECX
& N3 _! i: T% Y6 E$ u0041DDD5 |. 83C7 04 ADD EDI,4
/ A3 ~5 L1 U! w2 z X- J0041DDD8 |. 33F6 XOR ESI,ESI
; J" Y3 T" S+ T4 k1 p$ \$ h1 i$ S1 R) ^$ c+ N/ T* C; a# P4 ^
* D. ^( y. s% g; |; Y9 B# ]分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有
' h5 T4 B: k* f5 R0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]
" O: k' r2 Z# h9 W* E; j" z0041DDDC |. 8BD6 |MOV EDX,ESI" [# v" y2 D" c9 c5 B" y
0041DDDE |. 83C7 04 |ADD EDI,48 C9 ]/ Z+ n' \3 D' \
0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2)( D. q1 M2 L; I! S
0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX6 l* d& H. N$ d. }) b
0041DDE8 |. 74 26 |JE SHORT flashget.0041DE10
, F6 f+ I- j$ T/ m/ e0041DDEA |. 4A |DEC EDX
+ `4 y& ~$ H& g r2 i. Q0041DDEB |. 74 17 |JE SHORT flashget.0041DE04) B K* w; u" A. } Y8 [
0041DDED |. 4A |DEC EDX
* e; A; n6 |$ |: e Z! h: b0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28
i) V$ N* ?7 C0 n. `! j! a2 x
6 s6 A0 n$ L9 S4 i- h; `& C0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1# C( B% d7 f+ z, D4 S! r7 @4 {2 a
0041DDF5 |. 0FBED4 |MOVSX EDX,AH
: k! Y i- F/ a+ Y) f+ E; R0041DDF8 |. 0FAFCA |IMUL ECX,EDX
# W" T4 w1 S% Z( I: [) M, x8 h0 k0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]
7 ]8 i6 d5 y% I0041DE00 |. 03CA |ADD ECX,EDX% [* O1 a$ `4 p* U& |$ z5 T2 Y( L
0041DE02 |. EB 1F |JMP SHORT flashget.0041DE23; g9 i8 G9 W, ?
;ECX = B * C + D/ C! m: p3 E! D, `/ F. ^7 g$ k
4 `5 g& t) u4 e# g0 q& l# p6 }) J( X
/ H( s& i# s; g, e+ B/ t0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE1
- @- a. E( G; H ^0041DE09 |. 0FBED4 |MOVSX EDX,AH* ~- R% Y7 e8 \' C5 D' f* A" ]6 p
0041DE0C |. 23CA |AND ECX,EDX1 Q+ m1 i8 O2 E; ?: l2 e/ H( G
0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B' k, p' U, r p1 \5 K
;ECX = C AND B
, D8 Q: l6 \ W4 k( C4 A L" s0 e0 a, w5 o4 x
, _' i' ~! G5 w# `4 M0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE1
5 C9 Z. Q: f% J5 L! I6 e7 N0041DE14 |. 8AD4 |MOV DL,AH
. b/ A1 E9 y6 Z+ y0041DE16 |. 33CA |XOR ECX,EDX7 y* P, i# _2 t* T
0041DE18 |. 83E1 7F |AND ECX,7F
- q" t# S: J' q- c4 Y: \$ i;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的) s N: r7 b% N0 }
8 L$ s( j/ O" b0 R& x( o/ Y9 P
- V- f' \ ]; r5 b0 t$ A* d. ~
0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]6 { I/ ? x) y% Y% }2 _7 D1 z* G0 I" G
0041DE20 |. 0FAFCA |IMUL ECX,EDX
# F$ L( ^; D$ {;ECX = ECX * D% [8 s i. P0 B& q2 \2 ?; L4 v
- ]* h; Z. m# p4 }$ G. o6 ?1 c/ w$ @
+ p8 P8 c5 Y0 O5 A* I0041DE23 |> 0FBEC0 |MOVSX EAX,AL7 A- N T/ U2 o6 n
0041DE26 |. 03C8 |ADD ECX,EAX8 N: n z, {0 ?* H, r
;ECX = ECX + A! U9 {9 H' M) ^) U3 ]+ Q
;处理后那些跳转,可以得到" N! N: o* b$ X' L; f0 v% ^/ n
;Case 0:ECX = (C XOR B) * D + A
" S, h' x" P& w1 o;Case 1:ECX = (C AND B) * D + A) q: z) G' m* y1 W0 t
;Case 2:ECX = B * C + D + A) l6 r4 O5 s" z
. s0 w! y# j7 O& y2 k9 H: Y. Y6 z" n
) w6 f9 {: @$ ~0 ^
& ], V7 u- ?9 u/ }3 J2 _0 j7 b
;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法+ p4 J* D( O9 r) F) Q* Z
;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,
! ~3 A7 d5 T# B% `;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,0 u; o- d6 M5 N( c) I5 R/ U
;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i" a1 |% G* n2 ]/ F
0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE1
% g( A% M5 e$ N. t0041DE2C |. 85C0 |TEST EAX,EAX4 M7 y4 P( D6 i3 U
0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C
1 A! k* Z3 l3 \5 z) }0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]. E F- ]: w. ^9 c3 c! J Q
0041DE37 |. 83FE 02 |CMP ESI,20 f2 J9 m! z% m6 { U
0041DE3A |. 74 07 |JE SHORT flashget.0041DE43
; a2 f' Y5 E7 c, H. | K% H0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]1 K0 `; y$ Q& u# T3 H# n
a- Q ]) Z4 o& x3 E
;对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。: l# e# d9 j. v, L7 Y
0041DE43 |> 8BC1 |MOV EAX,ECX: a5 M1 A% E* j
0041DE45 |. 33D2 |XOR EDX,EDX
* z1 X& u V& e- Z6 }0041DE47 |. F7F3 |DIV EBX0 a' H" e8 T. Y' |2 Q
( `# M" E$ r& a# B* A5 T; _& N) Q7 @+ O& h9 u
3 S1 l# y# W: s b0 ]) M
;以上是对指定段的KEY的验证运算,下面是对结果的判断
* j6 k" o! H/ h" K0041DE49 |. 8BC6 |MOV EAX,ESI) R6 b. {/ O* S( z# A
0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2)
, o% _/ t5 g: z& p0041DE4E |. 74 13 |JE SHORT flashget.0041DE63* ~; Q9 m" F4 W8 Q/ v2 E: {
0041DE50 |. 48 |DEC EAX2 l% M4 P6 `! W2 O5 B
0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C
s# j7 R5 f% I2 [4 X- u3 E0041DE53 |. 48 |DEC EAX* S3 \9 W0 Y0 g/ I
0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE67( E8 P# G' H, O, C$ ]
/ N) r/ a9 i ^! [9 p* a, ];余数是否为0
! `4 J8 H6 |+ U0 o% ~0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B! f: h7 h& o7 |% E' k7 m
0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE72
5 L5 V# J& v( s. B% n9 t0041DE5A |. EB 0B |JMP SHORT flashget.0041DE673 _2 \3 c* H9 X$ g# G8 F
8 Z# l4 C, t- R6 i;余数是否为8
4 X# V) c) W3 }6 _6 i0 R0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B
- i, |# ^- o/ c( ~0 d2 o% m9 u0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72
; U: u/ ^' y2 F( c0041DE61 |. EB 04 |JMP SHORT flashget.0041DE67
5 V/ V$ ~3 G, C! |" ^: i! m2 q% r9 S# S4 o7 \" j* r
;余数是否为0- H5 Y! \! y+ g( `/ i
0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B
; e* u6 P y" ~2 {/ c' c5 ]0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72
% B8 O1 @9 U4 b0 q3 T: q* B! ~/ ^9 |8 t. T7 e
0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B4 x8 N# N" N. ?4 Z& G. R: X5 O5 ~
0041DE68 |. 83FE 03 |CMP ESI,3
, N* K6 p0 b, z' o0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90/ W. e7 M# z( N |" C% `
0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA3 u$ f% [5 E3 J8 ^+ m" }
: G7 a0 J# f* Z4 P所以这三段的KEY的验证算法是:1 o S: }# Z. H. N
Case 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'7 _. |# p$ x9 h* N
Case 1(B AND C) * D + A) MOD X = 0,这儿X是'e'( B8 F( S& a5 ^: E4 u `: s; I$ ]
Case 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'1 z5 z- e' g E/ z
7 i+ d" q2 `2 Y+ }+ a, ZLeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……! h6 y# R6 x( l0 i
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]
* i, x* ]5 i% p6 l1 @0042514F |. 83C0 10 ADD EAX,10
/ ^4 S: J+ O# x00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX! P+ p3 `8 Q9 m+ P8 u" o! h+ M
00425156 |. 6A FF PUSH -17 [7 p7 n/ S1 S, O% Z3 Q; q
00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]
' U( ^6 U7 g% }$ ]" q( k( t4 I. g0042515D |. 0FBED5 MOVSX EDX,CH
1 a' {+ z# {+ H; H00425160 |. 0BC2 OR EAX,EDX* ]5 L9 ^, D3 |
00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]
) }" n2 t* w9 Q00425167 |. 0FAFC2 IMUL EAX,EDX$ r$ U+ Z( y7 z# w
0042516A |. 0FBEC9 MOVSX ECX,CL* R7 o! i1 R+ G. b7 z
0042516D |. 03C1 ADD EAX,ECX
) i# C* m& {8 `8 m, n2 n" H;跟踪分析得EAX = (B OR C) * D + A& M6 H4 i2 W. d9 \
& y) s# \) N; Z+ {
0042516F |. 33D2 XOR EDX,EDX
( o; H, P4 y; m' I2 J+ }6 O K" U4 t6 o1 x( t" q
;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i'1 j. V- d; M3 ?1 c6 D8 d9 T( Y
00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]
0 l- R- C: ^/ k; p: d00425178 |. F7F1 DIV ECX/ c: X C9 x0 d; _# h3 N3 X
0042517A |. 8BCE MOV ECX,ESI
) c8 L% }* f' z" Q. j% d
3 _. ]4 C" \ I D2 A" l; D;判断余数是否为0: `' B. B. {9 T
0042517C |. 85D2 TEST EDX,EDX9 H- U- l) p. r6 Z" b$ W3 [
0042517E |. 74 1E JE SHORT flashget.0042519E
8 q! @8 c4 h4 a( _5 j) V) P' L2 T" @- u! q& I0 I( f
所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'
2 H0 ^ ]6 ~" R( b3 U
' L" B7 L" X: ~: y
9 i L) w- d, y只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:3 W, N4 C) [0 ?
Randomize
8 ]8 k5 B. [7 u) M Dim intEbx As Integer* H" k7 D8 D. V! }
Dim i As Integer, j As Integer, k As Integer, intChar As Integer
9 ?2 A* {4 L( L Dim strCode As String5 Z) }5 `5 C& K4 p
' U( j; F. y+ d' q: D% O If fgf Then
1 j8 K; L4 w5 I$ R# V strCode = "fgf-"! e$ `6 D& E8 m6 `6 E9 p$ g/ V
intEbx = 118
# i: }4 O7 }$ s: i, z) G Else
# c- Y* @# p$ Y4 ~' v1 M- y strCode = "fgc-"6 _4 x) G* c' B2 c# C- ~( y# V
intEbx = 105
) E& q9 u0 s; }) d1 s4 { End If
4 w; Z. q4 z; g: o " ^. l0 s( |# a( P5 F
Do0 z/ T6 {6 T( l) R
intChar = 97 + Int(Rnd() * 25)$ B2 J* a& t$ B4 J+ y; e' ^; P! c1 Z
For i = 48 To 572 ~: V! F2 j- Y- x
For j = 48 To 570 W% g: D8 P0 z S% f6 D. ^0 J
For k = 48 To 57
: D! D( a3 M8 k: O+ Q& g C If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then ]; J, Y% E; X$ w6 v% F7 _
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
0 t/ E3 J: y$ D4 ]4 d Exit Do$ `; h" \1 A7 Q7 t* X; e5 `
End If; v8 ]# b. K/ D& s8 S% L, Q
Next k1 E% r+ z: E1 `' d
Next j
$ i% F: B" X( c7 L: l. [ Next i% E# |; j5 h3 ?
Loop* O5 r" X4 n3 ~% ~, b) D5 @
2 F* i. g, a6 ]: U$ p
Do
; G5 @5 N/ o' V5 ? intChar = 97 + Int(Rnd() * 25)
3 X3 x3 |9 [; w5 O) ? For i = 48 To 57
9 {- U% S% k, R/ A# Y. j( i For j = 48 To 57% r, s3 q) v/ A! o1 m
For k = 48 To 57/ O7 a+ L! Y% y
If ((i And j) * k + intChar) Mod 101 = 8 Then' ^; d7 x6 b" z* r$ a3 |0 g$ _' L
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)* V8 c$ a. b5 s! x9 P t
Exit Do
! q3 U% u1 v8 R) z) l End If0 B8 H1 v' o1 [$ S
Next k' E+ @6 Z. n- o; i3 F8 B- H
Next j
$ {: j8 v, k; G4 `* N' [' U1 V Next i' U1 z4 }# E X* F
Loop- Y# a+ _" |, ^1 E, X
5 }- N7 C9 ?% G Do5 ?4 h$ X8 ]6 C( y+ |+ m
intChar = 97 + Int(Rnd() * 25)
( {: }% w5 Q+ N( u& u For i = 48 To 575 q( B- W' d/ V" `
For j = 48 To 57+ c, ?* B# S6 j7 C3 j- |
For k = 48 To 572 f8 D; V; o) G, z: P# L4 g
If (i * j + k + intChar) Mod intEbx = 0 Then
c+ e. \- n5 P+ ]+ r! m strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)5 N8 F- f6 f0 c; o. ^& G* X
Exit Do8 N2 R# z% a/ T4 W- Y+ {7 X4 C
End If/ S/ ?, t4 f* P4 ~8 H
Next k# k. t& D$ c8 L4 s [5 v- B
Next j
( T9 @' K6 U1 I( w' N Next i
! p6 c( m7 \- A0 f; F Loop1 s) ^6 b) x8 x+ E
9 L8 v" n9 E3 K/ D Z. K( J, m
Do/ |2 Q5 t' G" s: L9 s5 A3 R
intChar = 97 + Int(Rnd() * 25) t& V: j: z% e* u8 C
For i = 48 To 575 l6 e" A, Y5 T8 a- _
For j = 48 To 575 y/ `/ O6 i# n8 g
For k = 48 To 57
_- b; o4 F+ t% A7 s If ((i Or j) * k + intChar) Mod 105 = 0 Then
7 `3 h$ [! b9 q6 R strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)9 k+ q: P% q1 Z
Exit Do
0 }. v$ {/ ?' _. R* _7 l/ v+ ]0 y End If
% l5 e" L6 H( G+ w Next k
: l C- U0 R j Next j
5 ]& W; R/ ?. I3 D2 W Next i
) R1 s5 V7 F5 H, C% e$ T8 q Loop" R8 n* z: D* V9 _4 l+ U" P
! ]5 ]/ Z9 a: v; b
5 n+ V( o7 T* W& A9 r8 D4 @ '后面的24位随机生成。1 w" v6 |" |* _) D
For i = 1 To 6
& f) \, G9 V! Y+ R- L intChar = 97 + Int(Rnd() * 25)
8 j Y3 E. d, e strCode = strCode & Chr(intChar)3 ^' e8 F5 {+ d3 c
For j = 1 To 3) m8 m% z- }3 h& s9 |, j* a
intChar = 48 + Int(Rnd() * 9)
3 K1 W( Q. O5 ~8 Y0 D strCode = strCode & Chr(intChar)
]" ]# N- z" ~3 C: r2 G Next j
) J* t! g1 f3 | Next i' t! p8 x( h, e5 [: r' v, w2 E
0 f1 `, I0 E$ M
; N0 c7 k/ [9 e* Q) b
最后字符串strCode就是所要求的KEY |
|