|
Eagle的破文:(重写)FlashGet1.65的算号器* O1 ~( o& i6 B
! v& M6 r5 q" ^* Y2 b7 p
再次声明:本破文曾发表于www.chinadfcg.com8 Z W F. i) L
声明:上次写完1.60A的算号器,LeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,所以现在针对最新的FlashGet重写了算号破文。谢谢大家的支持。其实,这个算号器算出来的号还不是正版的。只能用一段时间,因为最后的几段的算法我没有时间去找了。
: D3 I* Z% f6 U @% C. A. N0 R$ u3 z& B( l# \
【破解作者】 Eagle1 l- J' m: a( V, ^2 J5 ]* N# x
【作者邮箱】 eagle_twenty@163.com: _( f! a. k0 ?5 @* d. \
【使用工具】 OllyDbg1.097 O1 k: L4 D; A4 R, P* f/ }" f0 n
【破解平台】 WinXP: m' S. Z+ i# v8 ^4 E E1 L
【软件名称】 FlashGet1.65
K' [$ I. B0 Q% U4 a5 \8 r' P【加壳方式】 无壳0 a# C, x; L) D- Z7 u; {5 y
【破解声明】
% M4 Z2 [! `+ C8 r--------------------------------------------------------------------------------
, I& G: j' i1 @2 p0 ~/ S【破解内容】
: N2 Q' H% O; b# i a: Z$ E& A8 e" c) P* ^
4 b$ v' e l, x; Y. r8 P W4 ^
安装FlashGet1.60A并运行,输入完注册码的时候,它会提示重新启动软件来检测是否注册成功,同时用RegMoniter监视到FlashGet1.60A写入注册表项RegPass, RegName等。用PEID侦壳:无。, S* F s8 I" Y1 W
: \* U) Y9 `! b. X5 }" k9 O D h2 A1.用OD加载FlashGet1.60A,查找参考字符串,在涉及RegPass的地方下断,运行
) Y6 R' l$ V) w" A9 q( ^" l! r2.程序第一次即中断在此,从上下文来看,这段代码有大量的跳转,有很大可能是注册码验证代码
: I7 i: a7 i$ y5 Z1 N4 A7 W0041DCE6 |. 68 98E55200 PUSH flashget.0052E598 ; ASCII "RegPass"; d5 d2 L7 H9 N% m+ n. q. c
0041DCEB |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C], Y4 G# j8 u, R; C) S
0041DCEF |. 68 A0C15200 PUSH flashget.0052C1A0 ; ASCII "General") R# f' c+ g% P. d( V/ ^
0041DCF4 |. 51 PUSH ECX
! X! X) Y7 H( B8 I! t$ T0041DCF5 |. 8BCD MOV ECX,EBP
j3 B5 g/ g# Z6 Z0 N1 A;这个CALL将从注册表中读入注册码% r8 X" y: y+ [) ~! n/ C
0041DCF7 |. E8 54C70C00 CALL flashget.004EA450& s6 |" z3 Z' ~- h5 T4 b" W S
: ~ d, B) |$ Y
4 ^/ M( M) G) R f& {7 v7 ^0 `- R! K分析下面一段代码,可以发现每个条件跳转都跳向flashget.0041DE7B,可以那儿就是验证失败后的跳转方向8 t% v8 u5 ?: [3 l& g1 D
……8 [) v: k7 _- ?5 ^7 ^# c' v
0041DD27 |. 0F84 4E010000 JE flashget.0041DE7B5 T/ C5 s) `) E1 ^7 }% d6 ?" j- t
……
! y7 S8 t$ v. I" |0041DD35 |. 0F84 40010000 JE flashget.0041DE7B: q8 y& _* H! j2 ^' G
……
/ e6 A4 W6 q$ T/ F( p. @; b+ Q0041DD4F |. 0F8E 26010000 JLE flashget.0041DE7B
9 i2 K8 [+ }/ y0 f* o) s6 E……
9 Z7 r0 x/ @# P7 x; D( G1 M6 w0041DD63 |. 0F8C 12010000 JL flashget.0041DE7B& \2 T: e; X) q) N
……# a9 N, o* A9 L+ ~( u9 o) J$ Y
0041DD77 |. 0F8C FE000000 JL flashget.0041DE7B
" d4 w' R5 R, ^# s9 k5 C& n……
1 H$ s4 ^ j" ]9 H1 U) Q1 j' T9 `;下面这个CALL是计算KEY的长度的,要求的KEY的长度为0x2C,也就是44位
, g' F" m! H# i; ]0041DD86 |. E8 F4200B00 CALL flashget.004CFE7F
. {/ a1 s1 [, W) ?0041DD8B |. 8B55 00 MOV EDX,DWORD PTR SS:[EBP]
3 e0 _9 U( }; C# _- ?* q M9 _- N0041DD8E |. 8B42 F8 MOV EAX,DWORD PTR DS:[EDX-8]
6 z l6 b2 J2 B$ f/ {/ V% |0041DD91 |. 83F8 2C CMP EAX,2C6 j8 Y; O+ e+ l- N F- j
0041DD94 |. 0F85 E1000000 JNZ flashget.0041DE7B6 p& [. i6 p% e4 w' t
5 j( G% z0 L' ]& s: g;下面是验证注册码的类型的,fgc-和fgf-两种KEY的验证算法是一的,& L0 G# d6 B3 |" w* V8 [
;但用来对KEY进行解密的密钥是不一样的,我们可以看到密钥类型的标志是存入DWORD PTR SS:[ESP+10]
6 L, p# F9 V( i' [* g# J;这次破解我们用的是fgf-的类型的密钥; b# K( ~% n# p9 r* Q8 q, m
0041DD9A |. 68 B0E55200 PUSH flashget.0052E5B0 ; ASCII "fgc-"
% Q7 g; V$ m( b0041DD9F |. 8BCD MOV ECX,EBP
( M9 |' B' k, {; P n0041DDA1 |. E8 401D0B00 CALL flashget.004CFAE68 b4 H( H% s- G
0041DDA6 |. 85C0 TEST EAX,EAX
- g9 Y e# s; F; J+ o0041DDA8 |. 75 06 JNZ SHORT flashget.0041DDB0
' H7 ]0 S/ _# X% W. ]1 {- h0041DDAA |. 895C24 10 MOV DWORD PTR SS:[ESP+10],EBX
$ M6 }6 Y+ j( e0041DDAE |. EB 18 JMP SHORT flashget.0041DDC8
( C/ A% P2 k# a7 z' D) G7 k$ N0041DDB0 |> 68 A8E55200 PUSH flashget.0052E5A8 ; ASCII "fgf-"
6 T6 W$ l3 F3 _ z8 o0041DDB5 |. 8BCD MOV ECX,EBP2 E; l4 U j( l; ]; H- [/ E
0041DDB7 |. E8 2A1D0B00 CALL flashget.004CFAE6% `& k) t" \. t' t% |. ?
0041DDBC |. 85C0 TEST EAX,EAX) O) [. t0 L0 ~" \# i
0041DDBE |. 0F85 B7000000 JNZ flashget.0041DE7B
) _9 b$ Y1 A# c' N0041DDC4 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX7 H* i% F: k8 [! _
7 ?8 M! s% o% J( R) a9 u& c" t P6 V
;下面是对KEY的验证算法0 D# D3 B4 J7 h1 C3 |5 b* w/ g
0041DDC8 |> 6A 2C PUSH 2C
# [, m7 E9 p- s2 v/ R6 a0041DDCA |. 8BCD MOV ECX,EBP" e+ w% L! S3 S: G3 h
0041DDCC |. E8 7A680B00 CALL flashget.004D464B6 H: P7 j$ P: {, Z
0041DDD1 |. 8BF8 MOV EDI,EAX1 j0 l& [4 u3 r2 t
0041DDD3 |. 33C9 XOR ECX,ECX' m, p; y# ^2 e' F" x* x8 V
0041DDD5 |. 83C7 04 ADD EDI,40 t( `$ W! E/ C1 _. H
0041DDD8 |. 33F6 XOR ESI,ESI% W+ t" G: s& x% I" V- _4 T
5 M1 T8 l1 D+ Z8 v0 F" W. v; e& }# Q4 C& b) ]7 Z
分析下面一个循环,我们把每一段KEY的四们定义成ABCD,则有
5 F4 K5 _6 i, Z' Z4 k0041DDDA |> 8B07 /MOV EAX,DWORD PTR DS:[EDI]
: z/ X1 v3 {- }& A5 G" q0041DDDC |. 8BD6 |MOV EDX,ESI/ b2 B5 v$ P# g
0041DDDE |. 83C7 04 |ADD EDI,45 E- N4 K8 f1 V3 i& R$ ~( L
0041DDE1 |. 83EA 00 |SUB EDX,0 ; Switch (cases 0..2)
1 A) O S- w/ V" c. Y4 E) f6 N: ?0041DDE4 |. 894424 1C |MOV DWORD PTR SS:[ESP+1C],EAX
8 g: r7 g( i& V" e0041DDE8 |. 74 26 |JE SHORT flashget.0041DE10! V; G# v4 W" [
0041DDEA |. 4A |DEC EDX
% X. ?. F! d1 v9 d) j/ s! L0041DDEB |. 74 17 |JE SHORT flashget.0041DE04, N, a) Y6 |9 `7 W1 }
0041DDED |. 4A |DEC EDX3 k1 V; S) C- V4 i
0041DDEE |. 75 38 |JNZ SHORT flashget.0041DE28
9 c/ @. }5 L$ L; O) U1 v0 n1 N$ e# i8 h
0041DDF0 |. 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 2 of switch 0041DDE1
, ^6 x* Q5 a, x. y0041DDF5 |. 0FBED4 |MOVSX EDX,AH, _, U6 x: E, H8 M/ {+ \
0041DDF8 |. 0FAFCA |IMUL ECX,EDX
, v9 f( w. H1 R7 ~2 y" g0041DDFB |. 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]8 z1 B" [+ m5 ]& ]! G! u4 r M4 g
0041DE00 |. 03CA |ADD ECX,EDX# l3 `! @7 ~1 b) F
0041DE02 |. EB 1F |JMP SHORT flashget.0041DE23
8 K2 M% Z* ~2 ~, Z;ECX = B * C + D3 n4 J8 H* V9 K, V
W/ x5 B; h5 [( a
* d. Y* ]6 ^/ V- O4 s4 t" W0041DE04 |> 0FBE4C24 1E |MOVSX ECX,BYTE PTR SS:[ESP+1E] ; Case 1 of switch 0041DDE1; [7 u5 M2 ?2 L7 f
0041DE09 |. 0FBED4 |MOVSX EDX,AH
) H3 s' t% {, F; y! Z7 P" r( b. `0041DE0C |. 23CA |AND ECX,EDX
, ^! C2 x. ~. Q8 n( s0041DE0E |. EB 0B |JMP SHORT flashget.0041DE1B! s; W' {( z* p7 _$ ^
;ECX = C AND B
$ f& |* J9 ~ K+ O9 C" \5 V* p# M+ {$ \) t# H2 N
: U% p- w: W& |0041DE10 |> 8A4C24 1E |MOV CL,BYTE PTR SS:[ESP+1E] ; Case 0 of switch 0041DDE1
3 L2 W/ p2 }/ ?8 @0041DE14 |. 8AD4 |MOV DL,AH
7 s9 G h" N: w+ b0041DE16 |. 33CA |XOR ECX,EDX
: {1 E* _+ p; c2 o7 y& x0041DE18 |. 83E1 7F |AND ECX,7F+ D* ?% V+ `5 H5 r) B' O Q, E L
;ECX = C XOR B,不要被后面的那个AND ECX,7F迷惑了,它只不过是用来把高位屏蔽的
& r0 e: ?, i% ?, [& {2 m9 E/ T1 T! F/ \- j2 ^1 o
, f; h- a/ C& V/ \! ~0 l: H0041DE1B |> 0FBE5424 1F |MOVSX EDX,BYTE PTR SS:[ESP+1F]: h `3 V8 I, |
0041DE20 |. 0FAFCA |IMUL ECX,EDX9 e/ K8 g9 b$ q7 L! X$ v Z0 n' d
;ECX = ECX * D
2 J6 C0 _1 ]7 l$ W. f# T. g7 U U; n
" F0 y" ?3 a% r/ d% X& |# V g- i
0041DE23 |> 0FBEC0 |MOVSX EAX,AL W$ k- i- D5 r2 b
0041DE26 |. 03C8 |ADD ECX,EAX' e5 x9 K( u6 v
;ECX = ECX + A
5 b1 q1 @: D; `;处理后那些跳转,可以得到
4 T' ^, `; C0 P8 S2 {7 M2 @5 i1 l;Case 0:ECX = (C XOR B) * D + A% x6 Y" Z$ }/ {6 b5 i
;Case 1:ECX = (C AND B) * D + A2 q6 F/ r% t. r
;Case 2:ECX = B * C + D + A9 V: A! T" \# L# T
+ v. I0 f+ g5 D% Q6 N* O
R" Y( p& U- }, ?6 |+ S A8 p% }
% q1 K- K: B- G; y/ R' ~- [3 J# I;下面是用验证密钥来对算得的ECX值进行验证,我们来看它的密钥获取方法5 i6 u/ h, `/ H/ x0 W
;密钥存放在DS:[52C72B]起始的一段空间,为kevinhyx12345,
9 V7 M0 W% y/ I! L8 b. k( o: ?;如果KEY的第一段为fgf-,运算所用到的密钥是顺序从这个字符串中读取的,/ T u# K8 K ?+ X* F
;如果KEY的第一段是fgc-,运算所用到的密钥是顺序在Case 2的时候会从DS:[52C72B]中读取,即密钥的第四位: i
4 x! n: L/ _4 d" a% G: n3 O0041DE28 |> 8B4424 10 |MOV EAX,DWORD PTR SS:[ESP+10] ; Default case of switch 0041DDE1
$ d, z% z$ W. L! G0 t0041DE2C |. 85C0 |TEST EAX,EAX" O+ B( J' o/ h9 ?. w1 ]
0041DE2E |. 74 0C |JE SHORT flashget.0041DE3C
7 E) t4 o0 t, h0 a1 Y) R+ \0041DE30 |. 0FBE1D 2BC7520>|MOVSX EBX,BYTE PTR DS:[52C72B]
$ h) q" l' G6 `6 Z( ]6 W0041DE37 |. 83FE 02 |CMP ESI,28 W% n \8 V5 C/ l9 }3 z Z0 r
0041DE3A |. 74 07 |JE SHORT flashget.0041DE433 k$ P8 f$ U% Z/ k; T8 U$ F
0041DE3C |> 0FBE9E 28C7520>|MOVSX EBX,BYTE PTR DS:[ESI+52C728]6 I; ]; {7 A, N8 H& t6 T/ c
# s) M# ], |3 e* };对于运算结果的验证也很简单,只是用密钥的ASC码来除ECX中的值,余数在EDX中。6 C) u* D* m$ F& l
0041DE43 |> 8BC1 |MOV EAX,ECX
+ g$ u) t) [/ R0041DE45 |. 33D2 |XOR EDX,EDX1 |7 q2 F6 F7 P& V: T+ G* m
0041DE47 |. F7F3 |DIV EBX9 k7 S9 E R1 b7 B& ~
/ X2 Q# d1 Q, c9 ]" ?; b8 P
, `4 ?: w# H- l$ N* x/ D
5 X. I1 [% {5 e: E; [;以上是对指定段的KEY的验证运算,下面是对结果的判断4 a. i( _0 [ @: r7 u% G( t
0041DE49 |. 8BC6 |MOV EAX,ESI4 I: Y! F: b. R( m" b, {5 Q
0041DE4B |. 83E8 00 |SUB EAX,0 ; Switch (cases 0..2)
, y9 F9 x* i7 M5 V7 g) w% z0 a, _0041DE4E |. 74 13 |JE SHORT flashget.0041DE63
y1 e- t1 {/ {" ?6 l' H0041DE50 |. 48 |DEC EAX
# k! K! `$ i$ ~8 o0041DE51 |. 74 09 |JE SHORT flashget.0041DE5C
" Z( @6 h3 k* }- t3 s0041DE53 |. 48 |DEC EAX
2 t) W& y5 C8 q( u9 V0041DE54 |. 75 11 |JNZ SHORT flashget.0041DE67
5 J/ p/ u# y, m. i; e4 ~5 f- D6 ]% n2 H6 B
;余数是否为0
; [; O, b* d2 q0041DE56 |. 85D2 |TEST EDX,EDX ; Case 2 of switch 0041DE4B7 u/ e+ C) j2 y; k
0041DE58 |. 75 18 |JNZ SHORT flashget.0041DE72$ G+ I* L: g+ `2 ?( e/ r
0041DE5A |. EB 0B |JMP SHORT flashget.0041DE67
7 y2 p* w9 R6 a# e9 f
0 ?5 x E! e8 `. \" A3 v& R;余数是否为8- F+ Y6 J* P# Y
0041DE5C |> 83FA 08 |CMP EDX,8 ; Case 1 of switch 0041DE4B
: b- K6 t! [9 G: [7 Q* j8 L0041DE5F |. 75 11 |JNZ SHORT flashget.0041DE722 p5 D3 B! ^+ a
0041DE61 |. EB 04 |JMP SHORT flashget.0041DE67
0 ?: n& ?3 R8 f [+ S/ k8 A) ]) D' f! d9 s3 R
;余数是否为0
( c3 _% X/ F" r$ E0041DE63 |> 85D2 |TEST EDX,EDX ; Case 0 of switch 0041DE4B5 o! c0 h% _6 y& Y
0041DE65 |. 75 0B |JNZ SHORT flashget.0041DE724 Q5 p& C+ s, l. m& L+ y
) Y* ` p/ Q2 y& E
0041DE67 |> 46 |INC ESI ; Default case of switch 0041DE4B7 S$ V. k$ E( d/ [1 n4 Z. j# k
0041DE68 |. 83FE 03 |CMP ESI,3
# K" }" ^$ F/ E6 ]6 p3 Y; \0041DE6B |. 7D 23 |JGE SHORT flashget.0041DE90: @ U& n$ ^+ [2 X$ Y
0041DE6D |.^E9 68FFFFFF \JMP flashget.0041DDDA5 C ?, Z" u+ L. h* l/ s0 w
! y3 |4 a6 W2 ^' ~所以这三段的KEY的验证算法是:4 _. X' k5 m. y$ M7 }% y
Case 0(B XOR C) * D + A) MOD X = 0,这儿X是'k'
3 l3 G( [4 A+ c# E$ @5 DCase 1(B AND C) * D + A) MOD X = 0,这儿X是'e'9 c( _; p U( L% [+ G
Case 2B * C + D + A) MOD X = 0,对于fgf-类的KEY,这儿X是'v';对于fgc-类的KEY,这儿X是'i'
# F2 P% k' b F, D6 C5 A
9 t- k& c9 A5 ?' ILeNgHost告诉我,FlashGet会在一段时间后验证第四段KEY,于是我就在程序正常运行后在那段已经读入内存的KEY上下了内存断点,并在RegPass也下了断点。出去逛完一个下午后……中断成功了……
2 U( N) F. n/ X* x0042514C |. 8B48 10 MOV ECX,DWORD PTR DS:[EAX+10]0 ^- i- p; X4 _& |
0042514F |. 83C0 10 ADD EAX,10
$ p/ i' @/ v4 u: F8 a1 U00425152 |. 894C24 08 MOV DWORD PTR SS:[ESP+8],ECX* z) i1 t3 r6 w9 S8 z2 O
00425156 |. 6A FF PUSH -1
6 I0 L( ?( U7 Y! X3 ]4 m00425158 |. 0FBE4424 0E MOVSX EAX,BYTE PTR SS:[ESP+E]! E" W; L! w: f& A) u
0042515D |. 0FBED5 MOVSX EDX,CH
( a& r Q! d* D9 u: c( g5 W00425160 |. 0BC2 OR EAX,EDX0 u. U, |9 o( c" C" `1 W" w
00425162 |. 0FBE5424 0F MOVSX EDX,BYTE PTR SS:[ESP+F]* e0 r6 o8 f% A
00425167 |. 0FAFC2 IMUL EAX,EDX
U# [4 b/ V- ]7 L0042516A |. 0FBEC9 MOVSX ECX,CL0 S; ^6 L" ?7 K; T. ~. G
0042516D |. 03C1 ADD EAX,ECX# i$ K" O! x* S
;跟踪分析得EAX = (B OR C) * D + A
! r) H# U* D- q& H& Z2 X: C0 j! ?
3 l; s3 d$ t( O. ~) X/ Q0042516F |. 33D2 XOR EDX,EDX: I/ x5 y+ X- x1 B
- ~8 S R* V% K {! R+ y9 ` H
;验证用的密钥直接来自DS:[52C72B],哈哈,就是'i'" q' Y- ?# k3 u, b0 Z" z' Y; f
00425171 |. 0FBE0D 2BC7520>MOVSX ECX,BYTE PTR DS:[52C72B] F5 i! F6 i: @: p
00425178 |. F7F1 DIV ECX
; g$ a3 X& d8 n4 Q, _$ m0042517A |. 8BCE MOV ECX,ESI% C# R; @& @4 z
! Z8 B' t- {5 P$ @' l( n4 V0 G;判断余数是否为0
, `$ r7 y) w% B. o6 v0042517C |. 85D2 TEST EDX,EDX$ e2 B, |! G8 H z. t
0042517E |. 74 1E JE SHORT flashget.0042519E' Q) k, O3 `+ m6 P' e( t
) D( V. Z+ e/ m0 A& v
所以这一段的算法是((B OR C) * D + A) MOD X = 0,这儿X是'i'
; ^' I, Z) u7 X
( l$ z$ ]+ V. M; D: Q2 n
$ l8 A7 X% [# X k只要KEY能符合这四个条件就可以了。我用VB做出了对应的算号器代码:# @8 t0 i3 P9 \2 R+ r! r
Randomize
& `- N+ I" q& P0 f# |" k. M Dim intEbx As Integer% f1 w! y/ ^% P1 W! H: A. l5 h
Dim i As Integer, j As Integer, k As Integer, intChar As Integer! ^' s! c2 P3 \6 [, Y
Dim strCode As String
9 x% X6 ~" C& f) q- ?
8 `1 V1 z& b- u: r# ^ If fgf Then0 g- n6 S1 j( |0 Q' c( m
strCode = "fgf-"
. s5 R2 W0 w3 L4 @ intEbx = 1189 @9 b/ {. ~+ _6 g, c6 ]/ X. F
Else
. v2 E. Y9 V/ L, v strCode = "fgc-"
3 X/ }" M) U4 b/ x8 [6 C intEbx = 105
' v2 u a9 _8 F- L End If* a7 a0 h8 g" y' w/ G/ }6 c& q4 V
1 ?# Y/ J5 ]# n# v- |$ l
Do
/ w# F$ J% d S& { D intChar = 97 + Int(Rnd() * 25)
9 l4 [1 [$ L" _; q: b8 D For i = 48 To 57
* z) n) R' U1 @- | For j = 48 To 57
+ G/ Q4 s2 _# i0 o& _: j For k = 48 To 57) d& B) r1 F# ?4 e; n
If (((i Xor j) And 127) * k + intChar) Mod 107 = 0 Then
3 j: s% i/ ~/ [9 X' h% @ strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)$ h" R# l, G$ b, W4 d
Exit Do4 i7 W8 `1 z, R* u5 E" U* d" u
End If' D0 M1 P/ X0 k4 r
Next k) F, P _5 M+ n, n a& g
Next j J% J4 |# I5 W8 g6 L! B2 s
Next i
0 V9 }5 Y! ?9 |$ ~ Loop; l" Q' j0 d) R9 q$ w+ B3 }
4 P2 L5 Z5 J3 ~5 O9 c7 f7 m+ s- U' D
Do
# L, i( {6 W1 |% @7 L' n intChar = 97 + Int(Rnd() * 25)
# R6 {+ s- q5 G5 C8 Y' ~# y5 P* K For i = 48 To 57
/ S2 l; p: c, ?4 L. d1 i For j = 48 To 57
h) @( c" n$ j% |7 k For k = 48 To 57, E9 m2 S0 B- m
If ((i And j) * k + intChar) Mod 101 = 8 Then
* ~ P3 @; Q3 V( o; ~* V6 S( C9 h) m+ _1 \ strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)! w4 {- Q) i X% D8 s6 q4 j
Exit Do
* P8 R0 |: _' R! g. m End If# F. p6 l8 h. r2 z. Z0 T
Next k0 L6 F9 F5 P& Z5 I1 I- _
Next j: Z5 Y( T% b4 @; o, l0 O* \$ n
Next i
) s. u) d4 [) @, r# h5 z Loop
% P" e; u5 x0 Y& E Z / F% O4 g" T* w0 n. O
Do
" O# l, j( z7 C& W+ _ intChar = 97 + Int(Rnd() * 25)
0 u* \% p9 r3 K5 E2 f% e% I8 z For i = 48 To 57, ~5 x5 K4 c3 M: ^
For j = 48 To 57
. ^1 ~; S( L; f For k = 48 To 577 h# s0 k! Z) `( S! o
If (i * j + k + intChar) Mod intEbx = 0 Then
7 D7 l% B) S$ U/ C1 s9 l strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)9 l( q" k- L3 O& Y" }
Exit Do! ~' r+ R- K4 L, q, x2 k2 B- z
End If& Q3 \* y! l1 L5 E- |
Next k a Y- f3 \8 ^7 E. t3 U
Next j7 \) N4 a( n2 K
Next i
( l. b8 z$ ]/ X0 o; P Loop
2 g E' W4 F2 h
9 X+ T4 h- h. z0 } Do
/ K8 D; X4 r% [8 Q intChar = 97 + Int(Rnd() * 25); {! S4 q7 X- Q* G: s& u
For i = 48 To 570 @1 u# A, G: M/ n# d( O% ]. f& k( p
For j = 48 To 57
7 E9 `8 _$ a3 S' q8 ]% ` For k = 48 To 57. `" v/ j; ~* @: Q, w$ D* E
If ((i Or j) * k + intChar) Mod 105 = 0 Then
" q1 U" b6 K. Z- c3 ] strCode = strCode & Chr(intChar) & Chr(i) & Chr(j) & Chr(k)0 {" \: t y4 g. |. ?+ r( s* X$ h" U
Exit Do
4 x4 ^, _6 ?4 W End If @: n0 T* S1 X2 Y0 X
Next k
4 i' z- S6 S" _( A' f8 L4 c: z Next j1 Y8 H% C5 c# c0 i1 i1 @1 @
Next i* A: E+ N7 o. ~0 A
Loop# A4 d- [. I( J" x3 M; ~
- `$ R' ~# k6 y' k5 I0 D
! c" s+ h. H1 K9 j '后面的24位随机生成。
3 s$ c& `) \5 } For i = 1 To 6
% g7 G" i f7 P2 f% g5 S- R5 a intChar = 97 + Int(Rnd() * 25)$ _, d! x' g0 X. ^" p0 m r, `) d n
strCode = strCode & Chr(intChar)# a& e& W+ u. p! k0 Q, u
For j = 1 To 3
, V$ f$ e8 [( `. I# w* X# S# ` intChar = 48 + Int(Rnd() * 9)7 r, {( e w: |3 m
strCode = strCode & Chr(intChar)
% D/ Y' T1 @$ M Next j
: P8 z) b; b0 W: ^' `$ R Next i# ~( Q8 c8 h3 I+ A8 t( S
6 Y; w# T4 I. p& U* H- V: b
0 E H' z w, M$ U X9 ]最后字符串strCode就是所要求的KEY |
|