冒险解谜游戏中文网 ChinaAVG

标题: 【汉化工具】通用命令行解包器QuickBMS [打印本页]

作者: shane007    时间: 2009-4-17 11:19
标题: 【汉化工具】通用命令行解包器QuickBMS
最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。 ! }& C" `5 w  O" J4 b9 f+ D8 _% R
现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。 + x  I+ m5 D, H& y

* l: T8 \8 r  S& i----------------------------
5 L' z! }( t. Q) d2 @工具更新1
4 K# P4 q3 x# N+ W; q0 m& p----------------------------
6 k- [: ?7 X" `$ j' v% `: Pwell I have some good news. . p' w3 ^7 I0 n- L
yesterday and today I have worked on the script parser and the results are so good that my beta version already works.
6 e0 _6 l# \$ w2 p% b+ k; f
; B$ Y; o1 [: \2 e$ eI have made it compatible with the BMS scripting language so people don't need to learn 1000 languages and then it's a good language. " J3 H& c( v& g7 {' B! j% y  J
obviously the BMS support has been enhanced so it's possible to use XOR, rot13, zlib/deflate, lzo, lzss plus various new operator in the "math" command (and, or, xor, complement, not, shift and modulus) and some other things like choosing the desired endianness. % p! {# Q& ^) h- D; v
then the input BMS script no longer needs the semicolon ';' and the file number which are now optional. 8 k3 x1 H) ~% y

; p7 t/ p6 ?- b. v* q9 y# snote that the BMS guide available on http://wiki.xentax.com/index.php/BMS doesn't report some additional fields which instead already exists like the GetCT, ComType and ReverseLong or some internals variables like EXTRCNT so I have tried to find and add also these ones. 2 a0 R% [9 A- t) x6 v  q% `6 @
8 ]5 g( H3 o3 w% e
about the new commands, the following is an example of BMS script for the game Outcry (you can call it outcry.bms or outcry.txt or as you want): " J0 e9 r: \! \; j

& b$ q' u& T" w. gCode:
) B% \: T" b: w' q& z3 M. {5 l( Eidstring SBPK
  h8 b* s6 |6 t/ Fget FILES long 9 D+ ]0 ]) T$ L" c& u4 f5 U
3 \; x; ~! L! [; K9 ]
savepos NAMES_OFFSET
8 c1 c$ I3 `- F3 f! Bfor i = 1 to FILES . X6 j! B. N0 A" i# x' p( i4 y
get FNAMESZ long ; a- P: s, L9 R$ v' z$ E/ B
getdstring FNAME FNAMESZ * p1 t" H- P" X. S
get OFFSET long " x; H6 C, f( g2 X+ t( p
get SIZE long
2 B; X- a% @9 z- F* tnext i
8 h: ?% }& u; W! u
5 H0 m6 A8 y* T: ~, ^- X: Gsavepos FILES_OFFSET
& \3 l" M( x4 B  W& Xgoto NAMES_OFFSET
5 u4 P- x( k7 k: mfor i = 1 to FILES
5 l) @; s9 z7 U9 `5 {, `, iget FNAMESZ long
8 Z; p/ t) }+ Dgetdstring FNAME FNAMESZ - ~4 K1 z& O1 ?  R6 o) S
get OFFSET long
; z" H; M- x' T# s  E0 kget SIZE long
! O( B# ^' u$ s. q% W- w: D& k: Amath OFFSET += FILES_OFFSET
- \3 V9 i) b/ l2 e
  @- z5 b2 g) T7 a6 vfilexor 0xcc
0 b* q/ T% a. p9 P  k9 qlog FNAME OFFSET SIZE 0 0 ; }+ t) w! }4 v2 a+ H/ ~" e) Q) @
filexor 0 ) Q! E* {# E9 k' M: L; y/ w
next i
8 ?5 J' b; @$ H& i" u& Z) Fas visible it's files are XORed with the byte 0xcc.
8 h$ S) C9 a2 d& i1 _
; p" I* Z- s7 P0 x8 @# qnow the link to the beta version: 7 ~& |) R% C8 s8 w3 [( a) D1 q
3 h" [# Q7 z$ D/ `- a9 P: n9 q
http://aluigi.org/papers/quickbms.zip
+ g0 j( w0 R9 P  V% f+ ]5 ?! {( o2 r4 B8 D( O
obviously it needs to be tested more because 2 days are not enough for a project like this which is not so basic so anyone is invited to test it and suggest new features.
8 f0 e; l1 g: `# {- w* p1 |1 p/ a% p6 l2 f
P.S.: the usage is very simple and the following are some examples: # k+ T+ z8 T$ ~2 y, X# `  \5 o
listing the files in the archive common.spk of outcry:
3 l7 o# a6 P: S- ~" e" X0 E; jCode: & Z! @' [* |7 ~
quickbms -l outcry.bms c:\common.spk .
0 R2 |" [. \$ E7 t
7 ]; S: g: [  v7 T7 r- Aextracting the files in c:\folder: $ m( J$ w- M( O7 Y7 n/ R$ c
Code: # L5 c( j) z5 V( u( |# E
quickbms outcry.bms c:\common.spk c:\folder
  }5 D' {! k& ?. r" U
5 S1 D6 Y+ j- L$ v9 e2 @: {4 gextracing or listing only the dds files: 7 }) a: J; ]$ N: c& U: B% F
Code:
: o5 `0 O! T7 i( i  Oquickbms -f "*.dds" outcry.bms c:\common.spk c:\folder 1 N0 ]# r# ]# [+ E9 X
0 I6 z3 J1 v# z: U2 s/ h
---------------------------- , u+ k7 |: ?& C& I
工具更新2 * n7 E. U+ H9 T& a% \# B6 {
----------------------------
: z  Y; A2 x0 sif you know the size of the structure or where is located the particular value you are searching (for example some file formats have a 32bit number in the last 4 bytes which has the offset where are located the other file structures) you could use something like the following:
2 I* V5 D, t: I$ }' P' A3 U/ V* N+ f: L  i8 C0 i1 U
Code:get OFFSET asize 1 B6 ~3 p/ a6 z  [$ |
math OFFSET -= 4
. s2 |& W, a9 m; o" Bgoto OFFSET $ b  e; }9 U: }% u: b
get OFFSET long
6 v8 }4 M  H# J- b! a$ b  Xgoto OFFSET 1 o0 A9 o$ ~/ q
..."asize" is not available in the BMS guide but is supported by both multiex and my tool, it contains the total size of the file. , l+ j4 N3 U$ y/ q& l
anyway tell me a file format which has the file name table at the end, it's good to make various exercises for testing the BMS language and where is possible to enhance it. 0 ]8 z2 ~0 O2 [) r5 N" Y

" M1 L/ V8 `9 n! J( _' qoh and about the "repacking" question, no it will be not supported
; f2 u8 A/ [6 Z: B  V# h/ H+ Z' H0 U4 Q" R2 a7 R
*EDIT*: updated version to 0.1.1 and attached 3 examples of BMS files which show different operations or different types for doing the same thing (7x7m.bms and 7x7m_special.bms) 2 A& a* u( M' `. [3 d  L2 G0 G1 L
( f: P. N: x4 ]: n( U- y
----------------------------------------------------- , r- x6 X; }& ~+ z
2009.4.17 更新
9 ]7 b% A0 x1 f& ~( i# f老外发布了最新的0.1.2 版。 ! d+ M/ v: ]  g# G' g# f( u* b
-----------------------------------------------------
0 i8 U& P, D' |6 e2009.4.18 更新
' |. i2 ?& @& z1 k4 G老外发布了最新的0.1.2a 版。7 T6 W) U4 o# w/ i6 _+ t4 [7 P
----------------------------------------------------- 6 |& ?8 B1 ], I0 X
2009.5.10 更新
1 z3 [* z& I0 E8 f老外发布了最新的0.2.0 版。
$ m2 Z* k0 j/ N8 A4 r" F9 D. M8 r. O----------------------------------------------------- 7 Y: `) x: m8 A0 j6 H8 `! w
2009.5.10 更新 6 l( O7 h  C3 z- F$ l, M6 i5 B
老外发布了最新的0.2.3a版。
- y; E4 k5 i4 [/ G% [
* L- y' g9 ~% Q" ^7 X  X5 P1 q: M0 \
说明:ND20在老版本打不开。
作者: shane007    时间: 2009-4-17 23:16
2009.4.17 更新
作者: shane007    时间: 2009-4-18 07:13
2009.4.18 更新
作者: shane007    时间: 2009-5-10 09:16
2009.5.10 更新
作者: firendless    时间: 2009-5-10 11:38
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...
作者: shane007    时间: 2009-5-10 11:47
引用第4楼firendless于2009-05-10 11:38发表的  :
2 f: G# ^/ B& |' |+ T6 U+ F哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...

( ^  |# w) D& }6 J' w9 T确实是晚了
作者: firendless    时间: 2009-5-10 11:51
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....
作者: shane007    时间: 2009-5-10 12:21
引用第6楼firendless于2009-05-10 11:51发表的  :& \$ L; a2 L* F! w/ E
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....

8 L; ~) P4 j2 k7 t* b% H呵呵,人眼订阅工具
作者: firendless    时间: 2009-5-10 12:29
引用第7楼shane007于2009-05-10 12:21发表的  :% m0 y$ V8 Y. w

' ]% a5 z2 C2 H. {, K- v# H呵呵,人眼订阅工具
1 @" W4 _; k( q8 e( Q
可惜现在的论坛没有关注ID发帖功能,如果发帖,则用PHP Mail()发邮件通知帖子有更新
作者: 慕容枫叶    时间: 2009-8-3 15:39
2009年8月3日更新
作者: solidji    时间: 2010-4-9 18:12
哦,原来是一个支持 XOR, rot13, zlib/deflate, lzo, lzss plus 等等压缩加密算法的脚本解压工具& w6 S3 @+ q4 b( L( l5 X, O, z% z0 K) l, \
不错的东东- K( L- ]) z! d6 M" B
不过我习惯于直接调用EXE自己的解压算法
作者: shane007    时间: 2010-4-9 18:48
引用第10楼solidji于2010-04-09 18:12发表的 : 5 G% s$ \& k" i; o7 m+ V/ q
哦,原来是一个支持 XOR, rot13, zlib/deflate, lzo, lzss plus 等等压缩加密算法的脚本解压工具
- H2 C1 j! P' L; T2 \不错的东东 7 r( Y1 g9 H4 Y/ C3 h- r
不过我习惯于直接调用EXE自己的解压算法
) |- b  c. j# {

4 j" J/ i0 Q* _) m5 k6 F4 X直接调用EXE自己的解压算法,这难度太高,只有高手会使用。
1 S+ _& _7 v# z! Y4 T: j$ E' U目前还是属于传说级的。
作者: 深绿    时间: 2010-8-18 12:54
现在已经是ver 0.4.6a了
作者: 深绿    时间: 2010-8-18 13:13
现在已经是ver 0.4.6a 了
作者: beegame    时间: 2011-3-9 12:44
本帖最后由 beegame 于 2011-3-13 11:23 编辑 2 a  K1 z2 ]9 _. @
0 D7 M. q( w, `: b
现在已经是ver 0.4.10a  
( v0 r0 p* H3 K* b! x
1 G" {4 A$ P& Y, ~6 c5 m1 h+ F
6 o5 A2 `2 H$ Z+ p/ n" m3 ^8 X
作者: onis    时间: 2011-6-12 14:28
本帖最后由 onis 于 2011-7-17 20:04 编辑
* _. c  H7 P8 n: L
: G! a1 U  J5 @不好意思頂上來,由於在研究中,看了那兩篇教程,有個問題不太明白,既然文件偏移量和文件大小都是反向的,那麼腳本里只寫get offset long,bms能知道反向嗎?
3 }( s7 G4 F9 J* E5 @" v  B  y因為想要解包的文件已經完全瞭解結構,也試過直接將其中某個文件單獨導出,都是ok的,就是這解包程序讓我頭大了。。。。。。/ W5 L" u& w4 y2 V. N5 W9 _9 m0 W

# s! S: e, C0 y( F已解决!




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