冒险解谜游戏中文网 ChinaAVG

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

作者: byp100    时间: 2009-11-9 02:44
标题: paq解包脚本如何写
分析了半天还是没分析出解压脚本, c& |6 e$ D: h
苏洋的解包动画也看不到。。。。007能分析指导一下吗?
$ t3 [- U0 l2 r$ c8 _get IDSTRING long
6 D" q6 L( Z" S$ vIDSTRING "paq"
  W- u) t/ V& m( o$ \get UNK1 long 
3 q* z: k. Q4 x# R+ @  i5 _getdstring NAME 0x13
) h3 Q8 y! o; ~+ F' B$ {7 F% zget ZSIZE long / e) B; K. R. D/ n3 ?: ]8 u, f1 q
get SIZE long & h  G" h7 D! z6 ~' `6 l% x8 Q7 @
get OFFSET long , Y9 H0 {/ B7 _4 ?$ f+ i( f( ~
clog NAME OFFSET ZSIZE SIZE 
: H8 s7 q; S3 T. ^# u9 N7 [
2 U  S2 Z( l( n, E  l& z解压不出东西
作者: shane007    时间: 2009-11-9 08:29
收到,你先说说你分析出了点什么。
; U4 Y+ A1 e( W/ e1 T是如何分析出的,根据是什么。& |9 j  |. F. a) W* z9 K+ o' H

* L* z% M; ]5 y; n: H! A可以先手工试试看。offzip.
作者: sylar    时间: 2009-11-10 17:43
解到tga格式文件就出错了。。格式不一样的。。' A6 b3 W# x" r' S* {) v5 ~
IDSTRING "paq\\x00"
: A5 q2 {0 M0 L6 B/ g& }4 m9 `Math Files += 0xFFFFFF
- Z: O  l* L/ D: y; mfor i = 0 < FILES! p3 ~$ z3 o) n
savepos TEMSET
5 F! Z! [- f' H) v+ Yfindloc NAMESET STRING "\\x00"# I7 w& k# G0 p1 ]# e
math NAMESET -= TEMSET1 R( `% t: Y0 g" s8 Y
goto TEMSET
0 L. ?) \. S& L$ K4 Y/ Dgetdstring NAME NAMESET
. n" E+ J. u! ^0 l: o7 \" uget UNK1 short0 i, O( r# Q! p* L) g: j: g
get UNK2 long- X7 Z# |2 o+ o* Z, }$ u
get ZSIZE long
* _9 V( E4 V" p% iget SIZE long
& m( B) V# c6 V/ P" h& osavepos OFFSET 4 ]4 i. V' U8 m( ~) q. a! B
clog NAME OFFSET ZSIZE SIZE
$ ?; W. v/ m# X! @, X6 N# Rmath OFFSET += ZSIZE; a# \$ d, `' x% j
goto OFFSET
; R* b/ J- _& Y4 _1 Y  [/ inext i

作者: shane007    时间: 2009-11-10 17:50
http://aluigi.altervista.org/mytoolz/offzip.zip
7 `& T' F5 X* `! ~
& u3 j9 V# ^0 n9 M  X- rOffset file unzipper 0.3.3 (offzip) .image.' T% ]1 j$ K+ f+ p% d8 D, h. B+ O
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.
! ~# g, `+ f! Q. H, }2 R& s4 v5 Cit'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.$ O- b3 z0 G* I  w) w
naturally there are also other options for extracting all the zip blocks which have been found or dumping them as in their original compressed form.& K1 U9 A. s$ a# b
it'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发表的  :6 j! P2 h3 q8 W& o* y
解到tga格式文件就出错了。。格式不一样的。。

* R) x% p0 u( E% X不错,确实能解压一部分,我参考参考写法. x1 Y* ]& q+ k" K

$ |. G! h, W% Q6 A! G# g; M& l也研究研究下007提供的offzip
作者: shane007    时间: 2009-11-11 11:38
offzip.exe -S crimson.paq 1.txt 0  >log.txt  6 Y% y+ Z" y1 _( G, u" n
- I* Y2 b; u: s' B/ w- C
以上命令执行结果如下
- W+ L. g! ?% L* w6 F
( t4 `3 c* V7 z3 WOffset file unzipper 0.3.3
! D3 C$ B) }, \6 c3 c! y" Zby Luigi Auriemma; e8 ?$ p7 ?# V- M3 e
e-mail: [email protected]
/ G; ]6 Z9 w( d. D, ~web:    aluigi.org
5 E% I8 o) w' z( R" M5 P8 d( z' ^
/ z, }& q4 e" Q, O9 `5 q/ u$ L" ?- open input file:    crimson.paq
2 ^$ y3 G9 a4 s7 l% J; f( x0 c& i& A- zip data to check:  32 bytes! K! m+ ?4 U8 ~7 [- v
- zip windowBits:     15; n) Z! Y: }8 J* L
- seek offset:        0x00000000  (0)3 ^! L* C  D+ I% }+ S
% E5 D$ }3 N& o9 P1 [9 S  J% J' u
+------------+-------------+-------------------------+9 W" a! W7 J2 L7 g! j  j
| hex_offset | blocks_dots | zip_size --> unzip_size |
# O. D+ W3 Q! C+------------+-------------+-------------------------+6 J' \0 z+ D3 y8 n0 n+ m
  0x0000001f . 1084 --> 1392
& l( O/ z0 A+ J) q3 ?& q  q7 h  0x00000478 . 717 --> 911' V7 W' N* v3 g6 r9 h' K6 N; ~
  0x0000076a . 1750 --> 2235
  U. m0 e6 m# K* D- O  0x00000e64 . 1419 --> 1803) N! _; H8 r+ @8 e& l" S( Y# Z
  0x00001414 . 1435 --> 18597 G& _' B' r, W$ k0 z
  0x000019d3 . 1175 --> 1587/ W4 _  |% t( X
  0x00001e8a . 336 --> 5950 a2 @% m, B- ]' m8 }
  0x00001ff9 . 628 --> 805
* s7 K  [- X1 I& i' z& L# `  0x0000228b . 874 --> 10961 r( p4 q# ~; w& L2 `& A
  0x00002618 . 518 --> 727
2 V6 p; k7 Z8 ?& t  0x00002840 . 510 --> 717
  n, k# [+ U3 W! J8 e1 A7 L  0x00002a5d . 795 --> 10380 [- e  X0 Z  x/ H8 p0 U; Q) k
  0x00002d99 . 730 --> 1068
7 n8 Y+ s1 k; V0 u) b5 k  0x00003096 . 765 --> 1030! m: U4 ?5 d+ ^4 v$ u; M; x# _1 W
  0x000033b2 . 862 --> 1124
3 i6 R/ a9 \1 x# T  0x0000372f . 1000 --> 1162! Q* r" W$ X2 l/ R0 A
  0x00003b37 . 1564 --> 1974  `4 X& s& M: M( x6 u
  0x00004174 . 836 --> 1152& O( B/ E, o+ n+ F) W% r' p
  0x000044d9 ....... 13016 --> 30039
/ K7 d3 M& f7 v. D3 E  0x000077d1 ... 5949 --> 68607 ]* ?" ]- B6 Q& j
  0x00008f2f ...... 11007 --> 13484
4 u. L( Y9 T8 X4 Y. y* T  0x0000ba4a . 1140 --> 1395* x. J) l6 j) g7 x
  0x0000beda . 1204 --> 1490" i+ N! `6 ~  |7 T+ z) c
  0x0000c3aa . 1299 --> 1599' ~# n& g$ b; w* m% M/ E' x1 V3 r6 X
  0x0000c8d9 . 1288 --> 1575  C; ~8 i  ?! q9 q) s
  0x0000cdfd . 1790 --> 2366' h1 J4 K( k( F0 v0 s0 ]0 r
  0x0000d51a . 445 --> 692) A; O: O" R" W
  0x0000d6f5 . 448 --> 674
: f! ]* ]# b( C0 }% z/ K" G  0x0000d8d8 ....... 13638 --> 15287
" K8 a6 o! O& T  0x00010e42 .. 2438 --> 4831
/ U7 S: ?5 V" `4 a( p% r; w$ k  0x000117eb .. 2263 --> 3624
: Z/ f6 ?* Q' R- U  p; y! O  0x000120e7 .. 3339 --> 5509$ h6 W: u6 G+ d) }8 ^/ N8 ?! i4 @
  0x00012e13 . 1927 --> 3442
$ }8 t/ }6 v( k* \+ `! c' K; y2 q! W  0x000135bc .... 6722 --> 11728
0 r2 S0 P) C- C7 }# |  0x00015022 .... 6691 --> 11567" Y, g% I+ s; M1 c  O, s
  0x00016a63 .............. 28392 --> 34046
; e9 x' ^1 S: F9 B5 ~6 I1 l  0x0001d96c . 1105 --> 1390
2 l8 ?+ l4 |1 y' d  0x0001dddc ... 5061 --> 5906( @0 B( Z6 C( ]! D- {  }$ O8 k
  0x0001f1c3 . 1230 --> 1492
1 r% u7 C6 u. k9 O  0x0001f6b5 . 527 --> 742
; y: s' H* j: e5 x3 M  0x0001f8e7 ... 5383 --> 10576
- S8 h3 r1 v' @+ ]' ~  0x00020e09 ...... 11923 --> 12569
, y( h6 e; ~( y# o* q' e  0x00023cb7 ......... 16573 --> 17231
1 D; D" ]2 |" w: Z: e  0x00027d8f ........... 20913 --> 21508
5 i; K% j! L0 q4 o; c$ @5 |  0x0002cf5b ... 4584 --> 5270
# Q& V+ L& _  c& ^& U  0x0002e164 .......... 18692 --> 29425
$ t$ N8 r; l# \  0x00032a89 ........... 20813 --> 31402
% T- B% O$ i: Y  0x00037bf7 ........... 21530 --> 320913 F1 m7 T$ v6 D; J
  0x0003d032 .......... 20218 --> 30856
2 k2 u3 {9 ]8 Q  0x00041f4d ............. 24876 --> 35585' m  _2 u+ S* L9 p; @
  0x0004809a ............. 25487 --> 36286
4 o- D; J9 A; o' [1 _5 G7 J# ]  0x0004e44a ........ 14995 --> 26091
  z. `' A" [0 `  0x00051efe ........ 15273 --> 26325. m$ t5 C- v7 q' v. W
  0x00055f87 . 1116 --> 1347
2 J4 m% @5 V& x! m  0x00056bb0 .... 7441 --> 8336
6 W) \/ q( y8 R# W& \  0x000588df . 1736 --> 1944
% z) h9 V( z7 o; O( L  0x00071d94 .......... 19391 --> 201059 e+ s( \5 Q( L. d& d# t$ z
  0x0007be7d ................. 33201 --> 51406/ j4 ~2 l, d2 `
  0x0009ac56 ................................................ 97337 --> 121280
  H8 T/ M2 Y7 I( N7 `3 |/ E  0x000b28ab . 895 --> 1152
: l  G) ^4 t5 {8 J7 k0 I7 Z  0x000b2c48 .......... 19701 --> 244224 J4 e, v# H8 z8 v" F9 [! v
  0x000b795b ........ 14367 --> 17136: f) N' D- M  h
  0x000bb197 ................. 34478 --> 46125% p6 o2 V8 ]9 f1 D
  0x000c3867 . 1101 --> 1331
6 U9 E# f5 l: f: p8 d) y% V7 l1 b$ M  0x000c3cd4 ............... 28739 --> 52702
# _+ C( `- {' Y/ D# X# G  0x000cad33 .. 3841 --> 5660+ d: c& W% `! t) M  U% ^: |+ D& P4 r. t
  0x000cbc55 .............................................................................................. 190797 --> 239555- I9 z7 j( e* E( K, S; p; k
  0x000fa5c3 ............................................ 88794 --> 115842* H  P! q$ w: p7 A$ L8 h
  0x001100bb ........................ 47271 --> 63393! D2 ~" P8 U0 u# k: r" ~5 S7 }
  0x0011b97f ............................ 55292 --> 70019
: O5 \  w$ w7 E- M
/ Y( H& l% a! l5 {- w
+ E' |# L" y8 V; a% v) H- 70 valid zip blocks found
作者: shane007    时间: 2009-11-11 17:43
用这个命令可以解包到目录1下,去掉前面4个字节就是jpg图片
6 Y4 _2 Q$ M& ^5 {* X# S7 ^5 l9 Joffzip.exe -a crimson.paq 1 0  
3 N9 Y+ y# @5 g9 h0 x' A+ |: ]' q0 @% L7 q
如果要dump的话,就是,这样的话分析格式就相当简单了
% I& u! V& y$ Zoffzip.exe -A crimson.paq 1 0  9 b7 D2 t1 ^( N% `

+ d0 u. ]& ?8 ]; N* U放上一张解包后的图片
* |0 t7 N& A' \& o8 B( N: F$ z1 L [attach]14737[/attach]
作者: byp100    时间: 2009-11-13 02:33
引用第6楼shane007于2009-11-11 17:43发表的  :$ t  \8 X2 ~, K' X! C+ [1 l
用这个命令可以解包到目录1下,去掉前面4个字节就是jpg图片
4 S! ?- q2 x; ]& u7 B! joffzip.exe -a crimson.paq 1 0  ! E9 `) F1 w4 A3 `

0 X4 ?7 _; @# P) C如果要dump的话,就是,这样的话分析格式就相当简单了
4 R" X8 ^7 w# j1 woffzip.exe -A crimson.paq 1 0  . `+ v% _/ k. M  h
.......
; _7 U$ n! M  k- m9 G5 t' c
谢谢指导,我发现好像是要2次解包,这些天在弄个独立游戏,没时间试试看。




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