分析教程内有QQ邮件 已经过期/ V9 B+ K. N, e% O5 r D
等FTP好了我再上传
" s7 h- ^7 c* \; a
+ @$ r3 W- ?+ C9 J1 c; ?- H# p
: w# Z+ Q$ Q! p/ b2 d上传完毕) ^5 A1 U# v* F) w
ftp好像上传了看不到下载目录..或许我的账号有误吧8 i( r" s. i2 _
1 ^9 t. H" x7 Z" g
写了那么久,值得鼓励一下吧~回帖吧~3 Q4 M( j2 J. Z
6 \/ Q( e8 Y9 r: x7 E3 i
刚刚发完就给下载了...不回帖支持~不厚道么~内附解包代码2 e8 r# }5 a- q+ Y
6 u x1 C7 t9 |- |& y
( v. l2 g6 {1 ~- E) E
" u6 U C6 ^9 w7 g
8 Y2 R( d8 z/ u4 d
) W' ^0 F5 V8 N/ s1 Y, l2 I. `0 o1 h, c; }
[strike]QQmail上传ing...[/strike]1 ^4 d/ W( C2 A$ y3 u5 j2 u
! d7 F: W7 \6 h: m教程分上下,A是准备工作和废话
# y F2 g8 [( Y3 J0 |3 v: Q B是废话+操作) a0 g/ E i' m6 f$ g5 S& K6 T, J7 L
' x5 p, t k6 H" Z5 W5 p水品有限...所以东西自然也有限,高手自觉略过吧.....
* o' s' p, x- W8 H" [& @1 @
3 j( @; F, j; m1 I' T; q' c5 Q主要代码拷贝到这里了,那个俺学习的时候,给我踩踩blog...& T& P2 ~; w7 ]8 R
, r5 i6 I- Y# s& W0 c. i: Q. `5 P
教程补充:
. f& A5 W' Y- G这个只是一个demo而已..还有太多地方该去改进,这个活交给聪明的你了。
1 k3 \& a6 R9 c7 |" z本来还有一个小工具的,可是呢,受限于信用问题,已经投稿便不能发了。。。
( g% W( y( k' ~5 b操作文件C是王道,但是使用其他工具也没有问题的,甚至是轻量脚本php' H6 D8 }- z7 t9 g( z. {) l
如果你也用VB6或者VBNET可以考虑FSO,[其实和GET PUT一样的]
: ^7 \, }& a T9 z9 Y- n6 G例子中没有告诉大家要注意资源的使用,比如初始化[虽然我有做]和8 n2 r2 `6 ~) v1 x4 e) h/ G
注销使用了的变量,我放到程序结束的时候了。9 v+ z$ D- h( ?' d; B' a
程序中没有检验传入数据,请注意,那个提取我检验过了,所以就删除掉了,
7 r/ M2 h: c/ X+ x: t: y7 k 那个indexB,的范围改成图片的数量就可以了,估计是手误吧... 8 q- D' f0 \6 l; I
前面几个字符的处理其实也简单,不停的更换前面的那个头部结构声明,然后读取
6 i0 e$ L7 |6 u看看能和什么匹配就好,或者你就跟踪程序操作文件吧,在读取文件的API处下断
3 u* L8 O9 i$ S0 U, O( O0 \我去学习了,所以去踩博客吧~呵呵~
; W3 R% L& Z* @5 S8 x/ \- Private Sub FirUnPack2()
- Dim strPathLen As Integer
- Dim strPathChar() As String * 1
- Dim strResPath As String
- Dim intSize As Integer
- Dim bData() As Byte
- Dim lngSize As Long
- Dim strFilePath As String
- Dim tmpStep As Single, lngIndex As Long, lngFileNumA As Long, lngFileNumB As Long
- strFilePath = App.Path & "\test.adv"
- lngFileNumA = FreeFile
- tmpStep = &HC + 1
- Dim lngIndexB As Long
- Open strFilePath For Binary As #lngFileNumA
-
- For lngIndexB = 0 To 1064
- Get #lngFileNumA, tmpStep, strPathLen
- ReDim strPathChar(1 To strPathLen)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, strPathChar()
- strResPath = ""
- For lngIndex = 1 To strPathLen
- strResPath = strResPath & strPathChar(lngIndex)
- Next
-
- tmpStep = tmpStep + Len(strResPath) + 2
- Get #lngFileNumA, tmpStep, intSize
-
- If intSize = 0 Then
- tmpStep = tmpStep - 2
- Get #lngFileNumA, tmpStep, intSize
-
- If intSize < 0 Then
- lngSize = 65536 + intSize
- ReDim bData(1 To lngSize)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, bData()
-
- tmpStep = tmpStep + lngSize
-
- Else
-
- ReDim bData(1 To intSize)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, bData()
-
- tmpStep = tmpStep + intSize
-
- End If
- Else
- tmpStep = tmpStep - 2
- Get #lngFileNumA, tmpStep, lngSize
- ReDim bData(1 To lngSize)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, bData()
- tmpStep = tmpStep + lngSize
- End If
-
- lngFileNumB = FreeFile
- CreateNewDirectory (Mid$(strResPath, 1, InStrRev(strResPath, "\")))
- strFilePath = strResPath
- Open strFilePath For Binary As #lngFileNumB
- Put #lngFileNumB, 1, bData()
- Close #lngFileNumB
- Next lngIndexB
- Close #lngFileNumA
- End Sub
复制代码 [/hide] |