冒险解谜游戏中文网 ChinaAVG

标题: paq解包脚本如何写 [打印本页]

作者: byp100    时间: 2009-11-9 02:44
标题: paq解包脚本如何写
分析了半天还是没分析出解压脚本% A8 J8 I% p: }+ ^5 l
苏洋的解包动画也看不到。。。。007能分析指导一下吗?
5 P9 P+ `/ {# ?  A# ^" iget IDSTRING long1 E# ^# G4 P3 }: T8 M1 Q
IDSTRING "paq"$ d: m9 E4 K# `0 w
get UNK1 long  . P! M6 O2 y+ |+ y2 J4 a
getdstring NAME 0x13
0 S$ Z$ K, {$ |4 F; o; O$ bget ZSIZE long
; i! s/ p6 X+ G7 m- y9 L6 Mget SIZE long
& m' S$ ?7 L3 Eget OFFSET long ! Q+ h7 k3 d( }  i4 r
clog NAME OFFSET ZSIZE SIZE 
- S. r$ x* ]( k) E' D) L. h/ C9 N& u% c/ Y) z" e
解压不出东西
作者: shane007    时间: 2009-11-9 08:29
收到,你先说说你分析出了点什么。7 c# r- a0 [3 N5 U  H
是如何分析出的,根据是什么。
* ~6 K- A4 d2 e" B) U, I! ^- L/ X. r1 g. G) v$ Q
可以先手工试试看。offzip.
作者: sylar    时间: 2009-11-10 17:43
解到tga格式文件就出错了。。格式不一样的。。
+ }# g. t+ ^( L- x9 _7 O  @
IDSTRING "paq\\x00"
8 x" h) b3 l% CMath Files += 0xFFFFFF
7 d0 I' f3 D, x& n% C9 Afor i = 0 < FILES8 Z; O# l* Y$ p
savepos TEMSET8 E1 R* e0 d0 M& P; n$ t
findloc NAMESET STRING "\\x00") W4 \: a' s, }: O4 D( e2 c4 Y4 J
math NAMESET -= TEMSET- g2 |, b4 X7 }: z
goto TEMSET/ Z1 {" y/ Z( J1 T. _# ~! j8 g/ O; D
getdstring NAME NAMESET
' S! o# D6 |+ v+ V9 Nget UNK1 short
* G) x5 h" q7 D0 j/ O3 D8 tget UNK2 long
) R# o3 H; {# H" ^, wget ZSIZE long* e+ _8 F8 G* W. Q9 g
get SIZE long3 a, z( G% z% X/ T4 J) E/ Z, M, |
savepos OFFSET . Q+ z5 @3 x( L3 ~+ `8 X
clog NAME OFFSET ZSIZE SIZE ; B2 R8 |) A1 D
math OFFSET += ZSIZE4 V  [# t, a; D3 C; i
goto OFFSET8 @( T# F7 I3 n3 m: N
next i

作者: shane007    时间: 2009-11-10 17:50
http://aluigi.altervista.org/mytoolz/offzip.zip4 C. s# `2 V' {* ~# v* v5 B( u0 m5 A- v

7 Y5 F! {" C( M: k; SOffset file unzipper 0.3.3 (offzip) .image.
  J& E9 t# X' U; v- {a very useful tool to unpack the zip (zlib/gzip/deflate) data contained in any type of file included raw files, packets, zip archives, executables and anything else.
3 [, u2 u! I' V( R+ rit's needed only to specify the offset where the zip data starts or using the useful -S search options able to find any possible zip block contained in the provided file.
/ ?& R4 H2 H( f. I6 a  K/ m" Fnaturally there are also other options for extracting all the zip blocks which have been found or dumping them as in their original compressed form.
: [, f$ `3 |+ X9 I- Hit's also possible to choose a windowBits value for scanning both the zlib (RFC1950) and deflate (RFC1951) blocks (for example -z -15 for common zip files and so on).
作者: byp100    时间: 2009-11-10 23:33
引用第2楼sylar于2009-11-10 17:43发表的  :
0 x& j/ ]& \3 S解到tga格式文件就出错了。。格式不一样的。。

1 O( c) X8 z# N$ D9 D# B1 h不错,确实能解压一部分,我参考参考写法
' D! ^$ c' J: P8 u: ?1 N8 P9 o: x2 A% {# r
也研究研究下007提供的offzip
作者: shane007    时间: 2009-11-11 11:38
offzip.exe -S crimson.paq 1.txt 0  >log.txt  & ?: v' u. e9 G. k5 H4 n0 {
# S) u3 d, g4 n2 u# ?
以上命令执行结果如下3 F% Q7 H7 Z$ A6 _5 _/ n, i: l
  @) n- P+ Y! P, q" Z3 y
Offset file unzipper 0.3.3
0 x' ^# f& M! Hby Luigi Auriemma( s9 @0 r" \* z0 X; I$ Q4 R
e-mail: [email protected]
% L2 y" U3 q. N, i  Pweb:    aluigi.org8 S# V3 q! V4 b# V2 w8 Z

$ D5 _2 c. g4 O8 U- P0 O4 o8 \2 a- open input file:    crimson.paq3 Y' ^0 j# a) j$ F3 L
- zip data to check:  32 bytes3 l1 N% I! X' @1 G6 N- [
- zip windowBits:     15
% p" g0 Y0 H4 P4 X$ d5 w- seek offset:        0x00000000  (0)
; l: a5 d, t& B. R; F
( w6 [4 g' l9 q1 E- K+------------+-------------+-------------------------+
( ?1 O$ Z* z8 [3 ?2 r. l| hex_offset | blocks_dots | zip_size --> unzip_size |2 Y4 i" v0 @( o3 G+ Q7 A, f  ]/ n
+------------+-------------+-------------------------+
* w$ @! f. |  U( l0 X" Q' S  ]5 r: E  0x0000001f . 1084 --> 1392
$ M7 T- C. S+ G( ?  0x00000478 . 717 --> 911
: e- p1 H# C, Y% D% R8 u  0x0000076a . 1750 --> 22355 f/ k# H( T8 |5 g! E2 Y5 M
  0x00000e64 . 1419 --> 1803
0 q% D) q5 H* o: C. M) {4 T( C: f  0x00001414 . 1435 --> 1859
1 Q: e' p( l# p$ _- f0 k  0x000019d3 . 1175 --> 1587& a5 k  G+ U; u. L; m
  0x00001e8a . 336 --> 595
' Y) k# g2 H: S& [+ Y! z' h2 K" K  0x00001ff9 . 628 --> 8053 D! p% Q4 u4 H1 t4 i( h' s2 t6 z
  0x0000228b . 874 --> 1096; h; L! m2 G6 C! I4 R, s7 R
  0x00002618 . 518 --> 727
: A6 v" p  k+ L6 h8 v1 f; {  0x00002840 . 510 --> 7170 {& F! h; Y7 d" I, e
  0x00002a5d . 795 --> 10381 H+ Z. E- t; P, K
  0x00002d99 . 730 --> 10685 b! a" |7 p, x0 R
  0x00003096 . 765 --> 10306 T% z2 t5 S: n7 s
  0x000033b2 . 862 --> 1124" ~" i8 S. `# p; [' j
  0x0000372f . 1000 --> 1162
5 B7 s) V# Z9 s- q4 p3 H  0x00003b37 . 1564 --> 1974& d4 X/ H8 o8 Q: W& g; y& k" F4 S
  0x00004174 . 836 --> 1152, W3 j0 n+ t1 R! h2 K- P6 k
  0x000044d9 ....... 13016 --> 300392 \9 }+ K) T9 _# e; H* N4 v$ Z6 z
  0x000077d1 ... 5949 --> 68601 v0 Y( J% Z$ T6 f5 E7 i
  0x00008f2f ...... 11007 --> 13484, }! z1 i! v; s3 S; q4 H0 R
  0x0000ba4a . 1140 --> 1395
" b- V. y- d. A: {, h3 L3 e( j' V$ ]* k! \  0x0000beda . 1204 --> 1490+ [9 ^7 f. F* ~: P/ y  h* @
  0x0000c3aa . 1299 --> 1599& ^, j# I4 u) }* }
  0x0000c8d9 . 1288 --> 1575( f, \& @3 M* u. k* M: `
  0x0000cdfd . 1790 --> 2366
: V' f4 f0 D4 T& [7 O0 T- M  0x0000d51a . 445 --> 692; s% M( i  {  w" ?5 t
  0x0000d6f5 . 448 --> 674( {4 T7 r+ D0 X* R0 K5 C% E
  0x0000d8d8 ....... 13638 --> 152874 N9 q% R5 d7 I+ ]' G
  0x00010e42 .. 2438 --> 4831
" q3 Q6 R  @6 w* |) c8 I  0x000117eb .. 2263 --> 3624
: T4 A' l' ~  A: e0 m, i  0x000120e7 .. 3339 --> 5509
4 @3 z% b/ e, z; y; Z6 X$ j  0x00012e13 . 1927 --> 34427 k0 p# d+ I" Y
  0x000135bc .... 6722 --> 11728
5 ]6 M0 T6 x1 m6 e2 t( O( [) L  0x00015022 .... 6691 --> 115670 r+ i5 K4 c  |" Y  F
  0x00016a63 .............. 28392 --> 34046
) q% m" Z, e& o( K8 K  [  0x0001d96c . 1105 --> 1390
- X, p$ o' Z7 M( v: h! Q  0x0001dddc ... 5061 --> 5906
4 W, T" x* X, n4 x2 m# T  0x0001f1c3 . 1230 --> 1492% X! n- m" S3 _5 g$ }
  0x0001f6b5 . 527 --> 742
8 W+ ~& c- f) Y, @  0x0001f8e7 ... 5383 --> 10576$ ?) u# T+ H/ _. o5 ^" }& k
  0x00020e09 ...... 11923 --> 12569
0 h1 Z5 [$ U6 y# H8 x8 Z) \4 E  0x00023cb7 ......... 16573 --> 17231/ Y9 T. z) C' B  i, m; x
  0x00027d8f ........... 20913 --> 21508* M2 {/ W4 W, _  D
  0x0002cf5b ... 4584 --> 5270& a( J( b. N" o, I7 n7 u6 U( f3 Z5 ]
  0x0002e164 .......... 18692 --> 29425
; \) H4 d4 q8 B( Y1 h% E# P2 o  0x00032a89 ........... 20813 --> 31402
( \$ z# H/ z0 |/ t  0x00037bf7 ........... 21530 --> 320917 H4 \4 Q( s) U7 n
  0x0003d032 .......... 20218 --> 30856
5 x- o4 h, J. g4 @/ `  0x00041f4d ............. 24876 --> 355855 L% T- h: ~9 X$ P; n
  0x0004809a ............. 25487 --> 36286
) S1 t# F. y$ g  0x0004e44a ........ 14995 --> 26091
8 J! X- r- [- }2 f# ?  0x00051efe ........ 15273 --> 26325
) s- w2 F- r0 O# q. p  0x00055f87 . 1116 --> 1347
' |6 \7 R0 L+ R. G  0x00056bb0 .... 7441 --> 83366 x) H7 k/ T' c# [) ~8 O; P' [  ?
  0x000588df . 1736 --> 1944: |+ |$ J: e) f* _, z
  0x00071d94 .......... 19391 --> 20105+ Q! X5 v5 O; T
  0x0007be7d ................. 33201 --> 51406
+ w, e( B5 j' s0 s  0x0009ac56 ................................................ 97337 --> 1212804 V6 X% b6 J$ U3 U6 m. u$ ~6 m
  0x000b28ab . 895 --> 1152. l2 L7 j$ C/ q6 [+ [
  0x000b2c48 .......... 19701 --> 244224 O) l0 J; t. ~
  0x000b795b ........ 14367 --> 17136
& s) X5 G3 W; |+ ~, e: |% b- t( P  0x000bb197 ................. 34478 --> 46125  k+ A' y; `& [% @8 D3 ]- b. @
  0x000c3867 . 1101 --> 1331/ }( L, F  }+ ^+ Q1 Y# T" b* `
  0x000c3cd4 ............... 28739 --> 52702" h' o: F2 D) }
  0x000cad33 .. 3841 --> 5660: h2 J7 |- n" y/ q' G; N6 F3 ?
  0x000cbc55 .............................................................................................. 190797 --> 239555
7 c+ m+ ]0 d; G: j  0x000fa5c3 ............................................ 88794 --> 115842; H6 Q3 ]% s5 B: o' o
  0x001100bb ........................ 47271 --> 63393( P/ W" M, s$ `; w
  0x0011b97f ............................ 55292 --> 70019
+ N8 |2 B4 a- f2 n  T; `5 s# }9 \$ h' X; |( Y( D
8 I. k/ d" E( f  U
- 70 valid zip blocks found
作者: shane007    时间: 2009-11-11 17:43
用这个命令可以解包到目录1下,去掉前面4个字节就是jpg图片2 V7 p- J7 A. U9 [( C
offzip.exe -a crimson.paq 1 0  
+ ~. l$ Y! o* S( R$ n2 z  S8 l  D$ N3 d5 V* S6 ]) w# g- Q
如果要dump的话,就是,这样的话分析格式就相当简单了
; O- F7 M- e' o8 |) soffzip.exe -A crimson.paq 1 0  
4 }0 W+ C. R  W/ m1 M& W- b4 D" i% n; `6 n
( M8 r& h& S: ]* y! H+ L  N* t* u/ U放上一张解包后的图片" H  X4 H5 E3 L7 b
[attach]14737[/attach]
作者: byp100    时间: 2009-11-13 02:33
引用第6楼shane007于2009-11-11 17:43发表的  :" j  _" V/ Q0 Z! O4 ]/ g: I# p
用这个命令可以解包到目录1下,去掉前面4个字节就是jpg图片9 n8 [9 Q3 l8 ?
offzip.exe -a crimson.paq 1 0  / H% Y7 @. N- W( {1 c
) L2 i* ~2 \( P& g! r( ]
如果要dump的话,就是,这样的话分析格式就相当简单了
- a  b7 H2 x: U) Q9 b6 f0 J8 ^offzip.exe -A crimson.paq 1 0  & `$ `$ R9 @' R2 R) D
.......

6 `* U( t2 M  [7 c. H* `谢谢指导,我发现好像是要2次解包,这些天在弄个独立游戏,没时间试试看。




欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/) Powered by Discuz! X3.2