|
Eagle的破文:(重写)FlashGet1.65的算号器8 W) l3 q+ Y; x: i0 U
) T2 q' i# F$ ^7 S' C, J再次声明:本破文曾发表于www.chinadfcg.com
) F8 c# i y: f+ B8 n6 z9 Q5 c声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。3 q( E8 m( k/ }) ^' O) c2 a2 ] p
5 }7 k; E+ V7 N- Q( u; O
【破解作者】 Eagle. H, q% K. {; {
【作者邮箱】 eagle_twenty@163.com w% k% s/ f9 n% a& O) J0 s$ g* \; e
【使用工具】 OllyDbg1.092 B5 f0 [3 j% U8 L1 i2 f" t; O8 M
【破解平台】 WinXP
/ F6 t0 g* r+ S$ m+ t5 _2 e+ R【软件名称】 FlashGet1.65+ C% a& g3 Q8 s+ Q A# J
【加壳方式】 无壳
" n4 Z; Y; F0 D, O3 E4 W【破解声明】 5 h$ C4 Z8 \% n+ v+ z
--------------------------------------------------------------------------------
! B& ?* O ~- H3 }【破解内容】8 O% X5 Z' ?6 B% z+ F
9 Y6 E% B, T% d$ J" ]; B: \
6 a) A, M+ g2 t4 _. n+ g) Z6 `安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。
5 l! u5 A+ l) R5 i
. S; m/ G% d) D1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行
! f' j# k4 q% f5 m# T5 V2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码
0 y, k% y* Y) N! t/ E5 n" A0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"; b; `" y2 r w: _' a. N) o' o
0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C]" b7 i. O. X4 d" n5 t0 _7 r3 {5 C
0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General"5 I" A- J8 }* W5 D* n
0041DCF4 |. 51 PUSH ECX
) W4 O) I7 P5 q: j0041DCF5 |. 8BCD MOV ECX,EBP5 R& q( z& @) W+ A. w1 e5 n( W
;这个CALL将从注册表中读入注册码
1 l& N+ f" N! U7 K k+ r& B0041DCF7 |. E8 54C70C00 CALL flashget.004EA450
$ v8 H7 U* H9 f8 B" I; n+ a5 ^
# X4 z) D" a( r' Y3 s+ N+ Y: i2 q, \% y7 j
分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向/ g0 h" J+ ~0 O# j/ w% C% D
……" L+ {7 s' D. N# \" a2 E5 o. Z
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B
( m. ~- A4 @+ Y7 ~……
( ~; n E! E* J8 t+ X) p7 F0041DD35 |. 0F84 40010000 JE flashget.0041DE7B
: R) J' f q9 \2 w5 |! M5 e……1 o% k: g( z2 r4 A+ {, _
0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B
" v H( Z! o/ q……
! v; j- d) {' m/ X* E6 C5 A9 W% d0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B* q* U2 F6 f" Z3 Z( v& S
……
+ y" h1 z/ T2 W: t! n0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B. _/ [, q$ r/ ~6 H
……
+ s1 T: W1 C" F0 U1 }5 G;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位
7 \. O5 ^) A9 I. U3 ^0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F5 i+ d' [: v! `
0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]
" R3 @- e1 `: x1 r/ ^' ~0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]5 [ P9 R) D# P" L" U6 T2 z/ o
0041DD91 |. 83F8 2C CMP EAX,2C
6 d# U/ h L4 @- k0 ~0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B
1 \! a( q5 q, k+ X! Z1 h8 P9 y; ^$ j% _
;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,, Y, S# b2 N, U. S
;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]
: J! {2 K% f( O! q( N;这次破解我们用的是fgf-的类型的密钥9 [; t U; o( H: q' n/ h, m! H7 s: ]
0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"' O! w1 i" H* ]( ~# |
0041DD9F |. 8BCD MOV ECX,EBP1 g) f6 k. t. g9 G9 N
0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE6
: J& P0 T% {$ s( v, V8 ^0041DDA6 |. 85C0 TEST EAX,EAX
- z5 X# |. h5 G. U5 Q6 l0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0) W h$ L3 @6 A* L$ }. x g' i: J
0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX
9 t Z4 I G6 Q7 r7 U7 A! h0041DDAE |. EB 18 JMP SHORT flashget.0041DDC8. j! e4 A: W/ ?" X; x6 ~
0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-"$ c0 r/ Z$ T& I1 G; S) Z
0041DDB5 |. 8BCD MOV ECX,EBP
: M3 {+ y& q7 ]0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE6
+ K5 q. U+ O* X0041DDBC |. 85C0 TEST EAX,EAX( ]! G5 \( @) b0 b6 G, E" p* U
0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B( B. V9 t2 T/ B" `* a
0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX H6 k( f8 o5 _6 G& E( K! `
( g' E' K+ W) k& f1 ^. [- [( A/ D
;下面是对KEY的验证算法. O, N- P Q A" a% C6 a A' m" Q! y
0041DDC8 |> 6A 2C PUSH 2C8 i! q- {" {1 \0 H/ ^9 U, O# l: U! w
0041DDCA |. 8BCD MOV ECX,EBP/ R9 m5 z2 ?" O% `$ Y0 ]# ^% o8 g- N
0041DDCC |. E8 7A680B00 CALL flashget.004D464B4 X' q9 D2 m% K2 E D
0041DDD1 |. 8BF8 MOV EDI,EAX \) T: _0 L1 Q& D
0041DDD3 |. 33C9 XOR ECX,ECX9 P1 H" X# {4 s6 j& Q. W
0041DDD5 |. 83C7 04 ADD EDI,4/ K5 `# C# y0 z! C: T
0041DDD8 |. 33F6 XOR ESI,ESI, N* `. E, h' Q: ?
& y5 c; ]0 k4 g6 W% ~ w Y: ^* I( l7 ^% N; M; M' m4 `
分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有$ Z- v1 x$ d" D( f4 I
0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]
: H; _ w K& s' X% W; _8 V0041DDDC |. 8BD6 |MOV EDX,ESI2 g3 p, K8 m+ ?1 u" ~- }# z. A" H
0041DDDE |. 83C7 04 |ADD EDI,4. ? U6 W/ y) [
0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2)4 G, z# A! ?/ V& Y( z4 r* }* ]
0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX; s( h3 ]2 p/ |" E, r) `
0041DDE8 |. 74 26 |JE SHORT flashget.0041DE10
5 y% z D; z5 [/ C- ~4 B) J6 ?0041DDEA |. 4A |DEC EDX4 A4 y$ B/ C4 }6 \+ h# D" k
0041DDEB |. 74 17 |JE SHORT flashget.0041DE04
1 i& g8 W$ F! X: [' S0041DDED |. 4A |DEC EDX
" }, E9 G! R' {4 a2 s5 t4 D: ]0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28
- x- Y \$ J" F. L& m
9 U( x7 F, [3 Q z- \$ E2 ?- J0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1( D1 p3 [) C* O
0041DDF5 |. 0FBED4 |MOVSX EDX,AH
: H1 i6 [7 {6 d) C8 ~/ r$ y0041DDF8 |. 0FAFCA |IMUL ECX,EDX
9 p2 e) i* @1 o0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]
( x9 C- l( d. y: u& U& N0041DE00 |. 03CA |ADD ECX,EDX d, a/ x+ D( t
0041DE02 |. EB 1F |JMP SHORT flashget.0041DE23
( _% V0 |4 g P5 A1 W4 o' f: j$ {# N;ECX = B * C + D( ^2 j5 [: N* \
7 V; D) K0 K: f" O! f; z) A: }/ s" H4 x; q9 ~: i. o* N
0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE1
# e3 t! P' z8 `" [" W4 F) n/ W0041DE09 |. 0FBED4 |MOVSX EDX,AH
) U1 Y' p! [& }1 w; p# ^( a0041DE0C |. 23CA |AND ECX,EDX
3 r. O5 ~, ]/ ^, i) ?& }' q0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B
; @4 l F4 |0 X4 r: ?0 ];ECX = C AND B
9 t- u* ?% E& N( B' Z. ]: g4 N$ \, Y8 c- I+ S; _* J4 T5 W
9 C0 ?# Q6 X. H0 Z$ {% i9 D! p
0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE1: X7 h) E; i! G- `* K. N
0041DE14 |. 8AD4 |MOV DL,AH2 b8 ]3 z$ _6 ?2 }; s5 m
0041DE16 |. 33CA |XOR ECX,EDX* n! A) d2 G: W$ S
0041DE18 |. 83E1 7F |AND ECX,7F+ o& z: U& T) g4 L5 j8 X) j
;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的2 c4 w# ^( o9 F2 \) R5 |4 C
* B/ ~! ~* P, r% m% _7 S
* ]% z7 o0 s: N2 ]4 T! }0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]1 l* c, G" v6 @$ n# I
0041DE20 |. 0FAFCA |IMUL ECX,EDX
& J7 X C w- K;ECX = ECX * D
5 ]' N/ t' t. D' |9 ^0 n
8 |) O" s6 K6 t m5 w: R8 Q' T. s0 v+ b. o8 E
0041DE23 |> 0FBEC0 |MOVSX EAX,AL
' l. C; ]0 m+ x6 B! B- j0041DE26 |. 03C8 |ADD ECX,EAX
- l: V/ e- r! O$ ^;ECX = ECX + A" ?& J+ X5 D" `; P
;处理后那些跳转,可以得到
: P' W3 T2 P# N4 `& _4 h$ `3 g;Case 0:ECX = (C XOR B) * D + A
, G1 G/ @- H3 g c: X6 y;Case 1:ECX = (C AND B) * D + A& P9 L; m8 R: J. J5 E) o3 T4 t
;Case 2:ECX = B * C + D + A
9 z j3 G+ w) D, f* f8 F. ` a- l6 j# S, p' c5 q- G( D( N& e
! J1 K9 t$ i. \. D# `
4 H. A1 f1 e7 a;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法
' ?1 _7 B' g ]# f;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,
* b& g0 L c9 ?0 f* c& f. g;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,7 n, F& ]/ V# {: B) I* X2 S
;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i
( H# `4 W) d S& { r0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE15 R2 D% b7 L2 ]' p* V' u
0041DE2C |. 85C0 |TEST EAX,EAX' d8 x6 t C& }; R' W# `* E
0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C
( z) d: e/ P$ W7 E3 x/ I0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]
* l# L w: ^% ?6 f4 [2 f9 M/ j6 E0041DE37 |. 83FE 02 |CMP ESI,25 s# Q5 @% M/ H$ M" M, P, _
0041DE3A |. 74 07 |JE SHORT flashget.0041DE43! x0 j! \+ ~: q$ P0 m* V, f5 T
0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]
% s% |$ N9 m2 i1 F/ u& I" z4 v* K, e. J- u* I
;对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。
2 U% o9 s$ v; K+ h/ G; Y0 Q0041DE43 |> 8BC1 |MOV EAX,ECX: \5 ^1 @7 j5 q) y) e
0041DE45 |. 33D2 |XOR EDX,EDX
. E6 Q& m/ f6 N: K0041DE47 |. F7F3 |DIV EBX8 s0 \0 t L( X5 H$ u
7 l9 v3 L6 b0 P- y% b/ m
$ G% e; ?; n: w/ E
4 P/ i* S. r) u4 B( ~
;以上是对指定段的KEY的验证运算,下面是对结果的判断
: O! u& N, W9 \7 H0 c# M0041DE49 |. 8BC6 |MOV EAX,ESI# L4 J, }) @ v+ d6 u
0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2)
6 {- f; G* l3 B9 P1 t$ P0041DE4E |. 74 13 |JE SHORT flashget.0041DE63( d( y6 Z8 H% H8 ]/ R) E
0041DE50 |. 48 |DEC EAX6 e' q; e, v0 L0 V8 Y6 r0 Y
0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C
- ^2 _* ?& w" @5 C2 q4 H0041DE53 |. 48 |DEC EAX
* ?, j7 s K7 @! Z6 |2 n0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE673 Q! I: K+ w: u6 [5 T* Q: \+ b- \
- K' n+ x; v6 r; ?9 a4 O( ]' m
;余数是否为0
# J. L3 u+ B7 y5 J! b0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B9 E8 e9 ]0 H& m# u0 i$ u9 Z' N- L
0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE72
! M" {9 E9 O2 K: c) |% ?0041DE5A |. EB 0B |JMP SHORT flashget.0041DE674 s Z. X" P& D/ F3 Y
8 z4 j) o9 B+ q;余数是否为8% O4 A' r8 E1 D0 J& O
0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B
1 n: _6 `2 d! x. ~% H0 e. Y Y0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE72
- \# e$ V4 |) A. L- P0041DE61 |. EB 04 |JMP SHORT flashget.0041DE674 F( t/ B# Z2 O _4 q2 V
! W! s7 F& N+ N1 F3 S6 D;余数是否为0
/ K4 ~6 I/ z+ g9 j& M, i0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B
2 `5 x" E: R0 K: g- V8 n1 j) `0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE72# C6 a' z- M) y# {
7 Q' q! K1 n, F v3 J0 C5 C
0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B6 `# D l) s+ s, K4 Q) t8 e2 c8 w
0041DE68 |. 83FE 03 |CMP ESI,3
$ _( ]8 l/ U5 v* f/ \8 N0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90
6 J8 v8 i0 ]4 }9 @5 I3 N0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA' l) W% M! x. K3 z }
4 B' l) J* r4 D8 e9 ?2 n: w0 @ q
所以这三段的KEY的验证算法是:
% P" B3 d; T D3 \ m$ cCase 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'. V9 Z' d1 W, j0 [) J+ u8 q
Case 1(B AND C) * D + A) MOD X = 0,这儿X是'e'! ^& z5 K# }8 W0 F0 U
Case 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'6 N- B- {/ N: q- Z& n
# u3 Y; C* z' D) d% p4 bLeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……8 {- N+ y0 ~& t! l- x
0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]
0 T- s, F- B: D0042514F |. 83C0 10 ADD EAX,10+ z: n4 W5 |, t7 b: @' H, C
00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX/ @! F/ Y# d0 a( k" n8 D
00425156 |. 6A FF PUSH -1; N- {& c5 Q8 z; j+ p
00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]
' _. D2 T7 W% d0042515D |. 0FBED5 MOVSX EDX,CH
1 f# c% I# d& T% k, @& W+ {% a00425160 |. 0BC2 OR EAX,EDX
0 f' p3 b. ~3 q; O0 D8 n00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]9 I4 w3 G8 _+ h% a, U! A* a( C+ h
00425167 |. 0FAFC2 IMUL EAX,EDX
- n2 s8 K/ j8 K1 [0042516A |. 0FBEC9 MOVSX ECX,CL4 G; R' y9 l& L# ]
0042516D |. 03C1 ADD EAX,ECX
2 h y! p) z( p% ]$ f;跟踪分析得EAX = (B OR C) * D + A% N0 A- K- f3 x+ Q5 c! q
- T6 }5 W4 y0 E0042516F |. 33D2 XOR EDX,EDX! N" H' `: S2 @6 x
% o7 E+ e6 ?* V/ Z" m% Z;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i'
) s( O5 m# i) ^5 t/ F00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B]6 R4 L$ D4 P" A) n7 ?! F4 B
00425178 |. F7F1 DIV ECX
/ J, p; i- |0 D0 Q, I. S% X. t0042517A |. 8BCE MOV ECX,ESI
6 j0 w6 G% i7 Q: I7 Z/ g9 R+ p2 N& _, }" h- a5 P: D
;判断余数是否为0. K' e# ^+ x6 J% o! O% u, Q9 q
0042517C |. 85D2 TEST EDX,EDX
/ L) {( R! G b; q- B- [0042517E |. 74 1E JE SHORT flashget.0042519E! [' z9 V4 z. w% g3 w/ ?
# k7 M! v9 u$ r. b. C7 ~; I. l
所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'' q! Z, f1 s; u1 {% U; d& F
7 b8 k3 E, w7 c" ^6 D6 a
0 |0 ]9 f2 y) g3 w. S只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:: `% @- O1 Z7 Y2 N2 S
Randomize) p( P& M5 p1 j% F
Dim intEbx As Integer
4 W2 ]# X' H! J; o& b Dim i As Integer, j As Integer, k As Integer, intChar As Integer
1 ^2 s- l# x( [) p5 C! a. ? Dim strCode As String. f4 Q, g5 A/ [5 }; W
( T1 ?1 o/ J; S% \
If fgf Then: L% D! M# f2 I R& X; E
strCode = "fgf-"& z0 `: l, X! R
intEbx = 118
8 E7 ]7 D4 h$ f Else
9 ]8 ?0 A9 ^, q( n) B strCode = "fgc-": Y+ p$ `& C. }
intEbx = 1055 B/ Z0 q7 |# Z/ E& |3 @* g
End If; N6 e$ k4 I4 C% b4 T- I6 z
3 g" w2 P) y9 ~. t9 L f
Do
3 v: \: C) `$ z0 Q. ]6 i) r3 q intChar = 97 + Int(Rnd() * 25)# L+ e o& b2 i t" x h
For i = 48 To 57( Y1 p" |8 t: B8 z. `: l
For j = 48 To 57( X. \2 e% b; |6 B8 ]5 N4 B
For k = 48 To 57 m( h( V, a7 c1 q, i: ~" g4 \$ U
If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then- x# a- R1 x6 V6 ?: K
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
* T; z- c, H) V/ K4 z- ^ Exit Do
6 i' @, L, @, G& t1 i0 u End If7 l: ~4 a0 a/ |6 _; ] i5 Q! ]
Next k k9 r& {- W# `7 E N
Next j
/ ^* w9 F9 f( f+ I8 |1 r# i Next i9 X' l3 ?0 s; R' H, P7 O7 K
Loop: N1 |" Y. p- K- U5 V8 A! t
. p8 ~ J& C: b% |/ Z5 M
Do
0 @" w+ k! G& I; s, D; Z8 Z% P intChar = 97 + Int(Rnd() * 25)4 N; s( n; N) k9 h( p) F
For i = 48 To 57
0 V; Y, @( m5 r' ]9 Z! \ For j = 48 To 57* u4 v: _+ W7 z& A
For k = 48 To 579 n) N: G* g$ X
If ((i And j) * k + intChar) Mod 101 = 8 Then$ c' c4 C. |: R% \
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
: x9 Z+ |% I' ~; J# t) ? Exit Do
0 G) P( Q$ c4 I( m: m" B# ~* x End If
' ~! f% Y+ a$ p) A5 p! T* Q Next k
& T/ W5 W! E' ^" I) N Next j4 i1 C a- G' T: [- N
Next i
% {: W: {' p& |: i Loop0 B# j1 E' _! |, e/ Z+ Q% y" \
5 ?% Y6 D, o( y: g) Q7 G8 ]' d O Do
- y" k. H( W, _0 `+ H intChar = 97 + Int(Rnd() * 25)) j: O/ e1 K% ^
For i = 48 To 57
5 n4 B( C3 B* ?/ P4 A" o' I" L For j = 48 To 57
( o: t7 Q7 o+ v3 ]" o: t% ^$ } For k = 48 To 57
2 N8 w8 P- b) t( z3 Z If (i * j + k + intChar) Mod intEbx = 0 Then
) K& f7 }2 ]) S1 Y' C0 s D% z/ y& c; j strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)8 D+ u4 d' B' j
Exit Do6 p5 ?" a( L& u/ a, j1 `
End If1 t9 [3 K) R8 x
Next k2 X! R) }/ O( b9 h
Next j ?% I; h8 N3 t' l' |" w$ K
Next i
1 Q& p5 |2 d" M p2 B& P$ w Loop3 s; g4 G6 p7 v
# D, l7 E* e% d- m0 l4 E* T Do
+ X( }, W' r( G5 _6 \ intChar = 97 + Int(Rnd() * 25)6 c' u4 a, c$ C
For i = 48 To 57
# }5 d8 h. \8 d* U+ a' |/ u5 j" k For j = 48 To 57
4 Y( \3 N& c" \! ~8 o6 e For k = 48 To 57# Y) W! H! z$ T& z7 i7 g
If ((i Or j) * k + intChar) Mod 105 = 0 Then. g0 G3 w- G& W0 l0 E4 N
strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)
5 s# r% }8 f. a Exit Do
- P; _' J; c9 |* ^' Q/ V* K; w End If
: l& T9 r ~6 B4 M D& f G Next k+ h+ D0 d/ G+ W% p3 d; I* o
Next j- f# D3 P4 [$ A( r! K- ^6 p
Next i
* `5 A" B' a: X& y( w Loop3 q2 m6 U9 w' \9 G
8 ~9 s( V d9 D J6 p6 u: P! O- k0 |& I( o
'后面的24位随机生成。
0 I, C! [' W* ?% f+ O$ ?$ k For i = 1 To 6
5 ]1 I( v) L% t: o1 ?3 z% ^# t$ K intChar = 97 + Int(Rnd() * 25)2 D+ m. n: v. x+ Y) t! |2 m) T" L
strCode = strCode & Chr(intChar)
6 k1 m7 s* J# s8 W For j = 1 To 30 c- K5 L5 b2 K/ _3 ^+ P
intChar = 48 + Int(Rnd() * 9)
* `% o4 O D) Z+ B strCode = strCode & Chr(intChar)
1 P" v2 q: f! e/ }" { Next j
6 _6 Y }4 e. p5 C Next i
* P% v0 ~" q) [4 j; T
9 H6 }7 k ?& I' @0 V( P" W t
4 I' D( `1 G' D* y最后字符串strCode就是所要求的KEY |
|