分析教程内有QQ邮件 已经过期3 w) l5 U3 u4 G1 X( F3 N
等FTP好了我再上传
7 L7 f1 _2 L: R( G* u' Z6 k. e+ |" y7 w
9 Z4 e4 C% V1 |+ }- F) Y上传完毕
2 Z7 \) _- i9 Kftp好像上传了看不到下载目录..或许我的账号有误吧
$ l, L+ G6 \& M x# g ]8 m. w& i1 r- m8 u/ h. ^4 y
写了那么久,值得鼓励一下吧~回帖吧~
) T3 u% G8 f; t0 N
8 v/ X* Y- Y: T' a0 D刚刚发完就给下载了...不回帖支持~不厚道么~内附解包代码
6 ]3 N9 A7 z7 P/ \ q) i5 F: s1 r: h( Q2 P# o y }
1 g# x0 n+ L% E
5 O* T+ g* |" h5 H- v8 o4 D' E, `& S" g, \
5 W! |' k' x( ]5 I# U( |3 d% \9 q6 z7 {3 d0 L5 D% P
[strike]QQmail上传ing...[/strike]: x: B' K+ P# m# s, Q8 e& K
: T9 e. C# k7 }$ Z5 k2 i
教程分上下,A是准备工作和废话
* ^* k5 C) S- n, y, K: f) ?; p B是废话+操作
) v( _. t: F3 Q- f6 ?
f# V9 x) Z- m3 K- ^水品有限...所以东西自然也有限,高手自觉略过吧.....6 l$ g9 T/ [* [
' H8 t$ d( R. V% \( x- W8 {. ]% j
主要代码拷贝到这里了,那个俺学习的时候,给我踩踩blog...& k8 e# |* N8 E
3 q' |. t9 J) [+ B6 ?$ i6 F
教程补充:
) u9 w9 I! `" n; \# @, c; d& w这个只是一个demo而已..还有太多地方该去改进,这个活交给聪明的你了。 , r8 j* z8 |2 P6 h0 U \! @% g
本来还有一个小工具的,可是呢,受限于信用问题,已经投稿便不能发了。。。
8 }, [1 ^. W4 s# V, v6 a3 M4 s操作文件C是王道,但是使用其他工具也没有问题的,甚至是轻量脚本php
0 A- v" W' m9 M, _/ a, \如果你也用VB6或者VBNET可以考虑FSO,[其实和GET PUT一样的]) p8 [! I( y2 t8 d! _) z$ `2 F/ L
例子中没有告诉大家要注意资源的使用,比如初始化[虽然我有做]和- o N6 C, h0 K* N
注销使用了的变量,我放到程序结束的时候了。4 e/ L3 j4 @4 |7 M! ]" N
程序中没有检验传入数据,请注意,那个提取我检验过了,所以就删除掉了,
2 ~) y+ Q/ d' [- C& ] 那个indexB,的范围改成图片的数量就可以了,估计是手误吧... 5 N8 m: W. R1 v8 w( q Z
前面几个字符的处理其实也简单,不停的更换前面的那个头部结构声明,然后读取) r) _7 u& L& U" {
看看能和什么匹配就好,或者你就跟踪程序操作文件吧,在读取文件的API处下断7 U- Q b- X2 f |( {, _" U
我去学习了,所以去踩博客吧~呵呵~
. I& O( ^# B8 k! N- 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] |