冒险解谜游戏中文网 ChinaAVG

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

作者: byp100    时间: 2009-11-9 02:44
标题: paq解包脚本如何写
分析了半天还是没分析出解压脚本
/ p7 T7 E, K  _/ s: d* j苏洋的解包动画也看不到。。。。007能分析指导一下吗?
# i( F( @9 |7 P' H4 E& p' ?* D% Aget IDSTRING long
. ^" ~) \' r; j& h  X+ {# YIDSTRING "paq"; y) \4 l: P) B
get UNK1 long  3 e$ {% V& J5 ^. k7 Z
getdstring NAME 0x13
, E" p1 \% M& J+ t/ D9 O$ Yget ZSIZE long 4 b; J2 N9 ^* W+ C+ l
get SIZE long
7 w; g( j' m! g: ]  Sget OFFSET long
' _5 w. q- \, h* U- `; ~clog NAME OFFSET ZSIZE SIZE  - V; n$ U. n4 k& D3 h

7 a- X5 U* @, m* ]# D# `* J* V解压不出东西
作者: shane007    时间: 2009-11-9 08:29
收到,你先说说你分析出了点什么。
5 B4 \1 o; _: v9 g是如何分析出的,根据是什么。# N' u7 q6 z8 o

8 i& @; J' O( ?; l- }5 {( X9 w3 }可以先手工试试看。offzip.
作者: sylar    时间: 2009-11-10 17:43
解到tga格式文件就出错了。。格式不一样的。。0 f- B$ b2 l2 b1 l5 X" y
IDSTRING "paq\\x00"! d( j4 Y! B- {5 I5 ^
Math Files += 0xFFFFFF
- \1 _) l" _* G5 t: G( _for i = 0 < FILES
: L  r0 r: \1 S% b& \6 Lsavepos TEMSET
; i* i) S+ P1 A1 @- Pfindloc NAMESET STRING "\\x00"
9 u8 I9 J2 t& }* ]math NAMESET -= TEMSET
* Z5 n1 e" M0 @+ j+ dgoto TEMSET
! R8 I- `3 w! |! tgetdstring NAME NAMESET
9 a- r: Z4 x% A* j1 wget UNK1 short
! Z* {5 \6 f# [7 sget UNK2 long* z1 E& }, f2 G: H# U6 e
get ZSIZE long' f) K4 C& t# d" }2 q
get SIZE long" f. w) S  u' w
savepos OFFSET
% w! F, Y, q' d: I$ Iclog NAME OFFSET ZSIZE SIZE
0 @- q5 S2 q) j, F% Z1 `+ F: Fmath OFFSET += ZSIZE* Z( b. h8 U* Z5 ]8 L) i
goto OFFSET+ X; c% U1 g4 _4 K$ Z# `4 [
next i

作者: shane007    时间: 2009-11-10 17:50
http://aluigi.altervista.org/mytoolz/offzip.zip! \, U, f7 @. g, b9 q% S( X
7 \) S2 P( g6 c2 T$ g
Offset file unzipper 0.3.3 (offzip) .image.5 p& {. V5 r6 i+ [
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.
7 w; b, X* s% \it'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.
8 a! ]/ N6 @5 [! {' Cnaturally there are also other options for extracting all the zip blocks which have been found or dumping them as in their original compressed form.& [- h( w3 `( f+ J, D0 u7 |
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发表的  :4 R$ L; ?$ S- B  H, x6 ^
解到tga格式文件就出错了。。格式不一样的。。

/ S3 i) N+ b- Q/ ]8 @不错,确实能解压一部分,我参考参考写法
" F5 \* Z8 K3 n# ?
/ f  E7 }& M' f! T+ Y也研究研究下007提供的offzip
作者: shane007    时间: 2009-11-11 11:38
offzip.exe -S crimson.paq 1.txt 0  >log.txt  0 ]" O' |9 R- z4 Q3 E/ y' C

) n' z  v; R; i& Y以上命令执行结果如下$ M/ N! O8 ^+ y6 N, t- m" |  }, u

6 M! q4 P- p4 R7 Y* \' Q: mOffset file unzipper 0.3.3( b8 _9 d* ~; H. |; f0 J$ [# v# }4 g
by Luigi Auriemma
1 |7 y9 f" q& [1 ?# O( Re-mail: [email protected]
8 Y' y. b# }+ `* R' V" g  g( dweb:    aluigi.org& Q7 w+ I- \8 \, G* m

% Y/ N2 V6 A! V# |1 X- open input file:    crimson.paq+ U: Z" l+ a" n9 v+ G' u
- zip data to check:  32 bytes( h* h3 c9 y9 R# S
- zip windowBits:     15
* h; m& u$ e: F% `- seek offset:        0x00000000  (0)
. T: p- W- ]2 ]) S: u7 I" g6 K7 w5 d8 |9 R! a9 h% C
+------------+-------------+-------------------------+" J# M) ?( l* ?
| hex_offset | blocks_dots | zip_size --> unzip_size |" Z9 O* [3 Y% N8 d
+------------+-------------+-------------------------+
; c* Q" k/ Y! ~" p: n  0x0000001f . 1084 --> 1392
1 a% M4 e" s7 a$ F  0x00000478 . 717 --> 911
1 c* X% a& V2 l0 G& n% `! T  0x0000076a . 1750 --> 2235" p1 G) N! c) o3 j* {$ q
  0x00000e64 . 1419 --> 1803
& W- t5 ]/ Y/ r* G% |  0x00001414 . 1435 --> 1859  p9 I4 c; k& f  `+ R  Q( `4 u
  0x000019d3 . 1175 --> 15879 W. @" v4 u8 g4 D
  0x00001e8a . 336 --> 595
0 v, _4 \" _8 m$ g, }; k0 R  0x00001ff9 . 628 --> 805
5 T" L; a' f( f  0x0000228b . 874 --> 1096
5 {5 F7 C8 w5 q2 h7 M. y  0x00002618 . 518 --> 7274 ~. M" `% ?4 U5 f, J: Y
  0x00002840 . 510 --> 717
* o2 r: V' y8 ?, D! q  0x00002a5d . 795 --> 1038: J  e/ M% E3 S. a: ~
  0x00002d99 . 730 --> 10680 c, @3 `# \- u" U% t* R, u, u
  0x00003096 . 765 --> 1030
) B/ m* m/ W) I' }  0x000033b2 . 862 --> 1124# @1 \( n1 Y0 F- e7 A
  0x0000372f . 1000 --> 1162
, A9 q3 Z5 g. E: R( H  0x00003b37 . 1564 --> 1974
9 W* b  A" t8 U6 D  0x00004174 . 836 --> 1152* Y8 J% a1 R3 s( ^, Y, H
  0x000044d9 ....... 13016 --> 300392 C& q. V+ Z* f' k
  0x000077d1 ... 5949 --> 6860( U# w9 C& N5 l
  0x00008f2f ...... 11007 --> 134843 b; ^! z7 q8 Y* C
  0x0000ba4a . 1140 --> 1395
- z0 r6 T. P. J' p& X  0x0000beda . 1204 --> 1490
  ]  E" z$ ]2 R! ^( K, L5 E5 G4 n9 e  0x0000c3aa . 1299 --> 1599
' Z; ^1 H+ Y0 ]  0x0000c8d9 . 1288 --> 1575
1 h* O6 x; _, k3 I- u) c  0x0000cdfd . 1790 --> 23662 j  S. D! J# t- H
  0x0000d51a . 445 --> 692
0 V# j- K5 S' y  0x0000d6f5 . 448 --> 674
2 c) Q9 i* l$ u  0x0000d8d8 ....... 13638 --> 15287; H1 V7 {- ^& L: N- m
  0x00010e42 .. 2438 --> 4831& d; c8 h1 W6 Y. n/ d* v
  0x000117eb .. 2263 --> 3624; L$ i9 }4 J. L/ ~. T: o  N( j
  0x000120e7 .. 3339 --> 55090 b8 h8 x6 [. X7 H* e
  0x00012e13 . 1927 --> 3442
' x7 I5 y$ _9 V% A9 y; J1 ?  0x000135bc .... 6722 --> 11728
! [! i" t1 D" r9 C% K) `  0x00015022 .... 6691 --> 11567
# v+ o& z( ?/ I3 t  0x00016a63 .............. 28392 --> 34046- E: W+ e( C  l/ w5 d; Y- P" @# T
  0x0001d96c . 1105 --> 1390. j- {9 u3 C) M- j7 B
  0x0001dddc ... 5061 --> 5906) p+ k4 y# k" w3 W
  0x0001f1c3 . 1230 --> 1492
& Q( Q  d6 C, l3 X6 J  0x0001f6b5 . 527 --> 742/ `' a) v3 ?0 B1 I
  0x0001f8e7 ... 5383 --> 10576
7 }# _4 O- y* M* h  0x00020e09 ...... 11923 --> 12569/ a2 V8 k" @  F, I# C/ _" L2 |- x
  0x00023cb7 ......... 16573 --> 172319 r$ h( @$ n+ k* e6 B
  0x00027d8f ........... 20913 --> 21508
  y/ s: |( |. {7 |" a  0x0002cf5b ... 4584 --> 5270& x% A* A5 q3 M2 B# J
  0x0002e164 .......... 18692 --> 29425
0 ~: W( g& ]8 o3 z  0x00032a89 ........... 20813 --> 31402
5 m/ P0 s9 \* c8 A  0x00037bf7 ........... 21530 --> 32091' o' g; E7 Y) W! D: L  H7 f) v
  0x0003d032 .......... 20218 --> 30856
$ A+ a6 w. K8 Z2 T  0x00041f4d ............. 24876 --> 35585
& A' }/ b- A6 i$ e7 z  0x0004809a ............. 25487 --> 36286
# t, f) {$ ]& U+ _  0x0004e44a ........ 14995 --> 26091
/ L% E- j1 W  \) d! \3 Y& W: `4 c6 E; C  0x00051efe ........ 15273 --> 26325
8 r5 F' ~' F" m) o  0x00055f87 . 1116 --> 1347( z" m- }4 Q; f1 ]. p
  0x00056bb0 .... 7441 --> 8336
9 i; B) K! G# {# X7 E# h  0x000588df . 1736 --> 19443 W8 `% z) {4 c0 ?6 I3 t3 m* P
  0x00071d94 .......... 19391 --> 20105& [) |5 i  x+ o; G! x
  0x0007be7d ................. 33201 --> 51406
" R4 f* Y5 l% t/ C  s  0x0009ac56 ................................................ 97337 --> 121280$ v! W" ?# c( _2 L" r
  0x000b28ab . 895 --> 1152+ }2 q5 e2 R& b2 ]; Y
  0x000b2c48 .......... 19701 --> 24422; V9 E$ D. I* `2 ^) \$ y' p
  0x000b795b ........ 14367 --> 17136* t( v. n( ]7 D2 \* u8 \
  0x000bb197 ................. 34478 --> 46125) {9 I/ x$ M( d: N9 f
  0x000c3867 . 1101 --> 13311 ~" ~# x" {1 B9 b! U) u4 g( S
  0x000c3cd4 ............... 28739 --> 52702
: Z2 y# m- f/ u7 e7 [  0x000cad33 .. 3841 --> 5660# [/ H7 C* u3 w' k
  0x000cbc55 .............................................................................................. 190797 --> 239555
, A2 Y+ W3 ~# H, O: j1 a  B- C* M  G  0x000fa5c3 ............................................ 88794 --> 1158429 {( u+ W* T4 J( l. j( @5 f3 v
  0x001100bb ........................ 47271 --> 63393
) F* J7 b' B9 x  |  p# x) u$ R, ^' A' S  0x0011b97f ............................ 55292 --> 700190 s" }9 N: e$ S! O1 L6 v5 u

. v. I5 j: @, f8 z8 Q# n8 Z! G0 _# Z
- 70 valid zip blocks found
作者: shane007    时间: 2009-11-11 17:43
用这个命令可以解包到目录1下,去掉前面4个字节就是jpg图片
* ^9 w3 u; |5 {. @0 z& a1 ]6 Doffzip.exe -a crimson.paq 1 0  
4 X4 n* I0 c# Y% Z& [
/ {+ ^3 N9 q. ^. ]7 p& r9 w& ?如果要dump的话,就是,这样的话分析格式就相当简单了$ u# N  `: H0 M  D2 x8 o- g, s
offzip.exe -A crimson.paq 1 0  
+ J8 \- V! B9 T& q! D
  Z# R# e. L+ X7 J1 n" }放上一张解包后的图片. T" I! u5 a# E- ?
[attach]14737[/attach]
作者: byp100    时间: 2009-11-13 02:33
引用第6楼shane007于2009-11-11 17:43发表的  :
* |& b& I. h: g7 b+ y- n. j用这个命令可以解包到目录1下,去掉前面4个字节就是jpg图片
! d2 q2 ~- L2 e( v2 t6 g/ _offzip.exe -a crimson.paq 1 0 
' r1 r2 Y- I2 f9 q/ I0 Z0 J+ y) T7 _. f' N* x( k
如果要dump的话,就是,这样的话分析格式就相当简单了
$ r! o3 R# Z+ H) H. N2 P$ Eoffzip.exe -A crimson.paq 1 0 
6 H" X6 M+ U  s/ D$ w.......

: h6 Y' y) ]$ G4 O9 N. Y$ I0 q谢谢指导,我发现好像是要2次解包,这些天在弄个独立游戏,没时间试试看。




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