设为首页收藏本站官方微博

【汉化工具】通用命令行解包器QuickBMS

[复制链接]
查看: 8175|回复: 15
打印 上一主题 下一主题

【汉化工具】通用命令行解包器QuickBMS

跳转到指定楼层
楼主
发表于 2009-4-17 11:19 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

【汉化工具】通用命令行解包器QuickBMS

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。
+ \2 `- \- e, P7 }现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。
' \4 _# p; F1 {' p( @  a0 ~: F; w/ F" R$ h
----------------------------
6 I. b# }! `3 f% z* }工具更新1 2 P" j2 O( A& \: ?$ G# W9 f) X
----------------------------
# h+ \4 D" Z. s8 ^2 M( |well I have some good news. ' w* M5 o" V& L& F
yesterday and today I have worked on the script parser and the results are so good that my beta version already works. 4 ~- X# H  F! A3 d

1 ]  A) F- e4 y! ]8 MI 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.
2 K  @  f8 E) N& O6 _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.
6 C# H2 C- e* J5 D/ _then the input BMS script no longer needs the semicolon ';' and the file number which are now optional.
: q/ N, L+ ^2 R1 q. X% O, D9 @7 N# w
note 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.
+ {/ T  f& w5 k9 Z6 d! j8 Z; I
" x5 O1 ?! Z( c* [# k1 g. mabout 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):
* ]( ~) ?6 o6 a- G, d* E# \" b
8 O- b7 d; R8 {- l: uCode:
, `( A  D( R4 \' {idstring SBPK
) M  D7 @7 v& E% K0 P5 g0 l& l' O" Eget FILES long
, T" T( A, K% _3 }5 W5 a" g& {' x/ [: s3 d. G$ \8 I
savepos NAMES_OFFSET 9 H! A9 V6 _  t8 r
for i = 1 to FILES 7 R5 }2 i  i  f* h6 M& \/ C8 f1 m
get FNAMESZ long
( ~3 L! d; j  _  Y* e& lgetdstring FNAME FNAMESZ , \% m: k% Y  d) ~& u3 h5 A+ V
get OFFSET long
( Y; M" R6 I& G/ e+ |" Nget SIZE long
& D' S. H! b  V! \2 gnext i
& _$ ~6 Z6 h+ s! J: k8 B7 k  A7 H7 c' w% k
savepos FILES_OFFSET 5 e- h; W. _' U0 Z5 m  v
goto NAMES_OFFSET # u( Y4 R8 }8 G; @1 n5 E( s
for i = 1 to FILES 0 ^3 `7 N. B  v. }
get FNAMESZ long 5 ?' K% r$ o" J% [- V. v
getdstring FNAME FNAMESZ
0 J5 F' x/ ~7 {7 r3 mget OFFSET long 1 z( e. x  t  o8 X" {
get SIZE long
: _9 q7 w6 x6 M& ]math OFFSET += FILES_OFFSET
& M! e# i/ [" |$ _- v
. S. w3 p: ~5 e. mfilexor 0xcc ' k  ]% Q1 v  [# d
log FNAME OFFSET SIZE 0 0 ; V+ X1 `' Q8 z1 Z/ V7 _
filexor 0
; u( M5 f; g6 s% L% `next i 5 Q, j- t5 D$ V7 S# G/ U
as visible it's files are XORed with the byte 0xcc. + H4 p" I% ]. T- g+ z* p
, L/ M4 U1 K; N, X
now the link to the beta version: ; m2 X7 e4 X. o/ ]4 Y, D4 O

# {: F6 P8 U; L! g) [3 \, Ahttp://aluigi.org/papers/quickbms.zip ) q5 Y: r6 s. B9 [2 V+ K  r

; X. T) @% G# ^5 g. e! J: ?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. ! V/ u6 A0 H* L$ {1 h2 G9 C2 q

2 ?8 ^. @; K' N; C' Q. LP.S.: the usage is very simple and the following are some examples:
+ E7 d% R& d& e2 |3 Ylisting the files in the archive common.spk of outcry: ) V) c% Y- _/ |( T* k- w" V- \; J
Code: 6 n2 @8 i" C5 D1 m1 L7 h
quickbms -l outcry.bms c:\common.spk . $ ]  W# [' z+ z' m$ P2 q) g
* s" V7 f* [  M" x5 b" X' B
extracting the files in c:\folder:
% v2 c% n) c/ m& m8 `- j8 K9 }Code: 6 d9 |. D+ V, O- x0 r9 W% d% ^
quickbms outcry.bms c:\common.spk c:\folder ' _( y7 Y, |; Z; Y8 A
  z3 t9 o) {# w$ Y
extracing or listing only the dds files: - W6 K6 e# v  y9 {, z7 G
Code: ! H; k; Q' S$ T  R8 m) }
quickbms -f "*.dds" outcry.bms c:\common.spk c:\folder
* E% G5 w) g+ I2 }
2 z0 {' F9 [. s7 q2 l9 ?5 u----------------------------   ~: _" }3 U; D* [. `$ [* |6 a+ N
工具更新2 ' V8 l+ d  s  |* I; U% @3 D3 J
---------------------------- ; v5 d: B( F& V1 @6 j: E
if 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: . m6 Z0 i( S+ j5 g' V0 t; g
" B  O/ g  k, e; g; b; A
Code:get OFFSET asize $ `$ T- C1 t# g9 c0 \0 p
math OFFSET -= 4
3 s) n0 D4 N9 Ygoto OFFSET
' h0 W. p( i* v- y  Hget OFFSET long / F1 E# ?5 ]+ i1 F( ~1 P$ K( \0 p0 N
goto OFFSET 4 x7 d7 y$ m' f7 h: M+ }1 a/ R
..."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.   f/ g) w( X0 p2 t/ u/ x# j
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. $ l4 [/ a% u5 I2 {$ {: Y
; t2 e3 w$ e; ^/ @- o
oh and about the "repacking" question, no it will be not supported
0 ~: e, K! M9 V" }
7 n& b! G" `3 h+ c: S: f; s*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)
0 G3 v, [2 D  e# Q2 G! w! z7 ^) ^; \  i2 F
----------------------------------------------------- ! N; g& i! @5 k( i/ w
2009.4.17 更新
, j8 [% f2 d3 l+ i% H: a老外发布了最新的0.1.2 版。 6 I  h1 F: ?' ~) E* }
-----------------------------------------------------
6 F2 y: o8 t0 m. ~2 m2 b2009.4.18 更新
4 o# |5 T- H# I1 t老外发布了最新的0.1.2a 版。8 a& M$ j# b+ P( N+ n9 |
-----------------------------------------------------
- ~& s4 _# ]* ~- {2 O' `& m8 Q2009.5.10 更新 6 H8 R# M' u( s& E" l% Z
老外发布了最新的0.2.0 版。
( _5 o4 \" X  s: E----------------------------------------------------- ' [* A4 T7 D2 o& `
2009.5.10 更新 * L$ e  X, m. V/ m: T' S0 s8 y
老外发布了最新的0.2.3a版。1 Y) }6 L6 n5 E4 N7 S
1 V7 F; _8 a; \4 H

: F3 B& p3 h* h6 f$ k) a说明:ND20在老版本打不开。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 很美好很美好 很差劲很差劲
回复

使用道具 举报

16#
发表于 2011-6-12 14:28 | 只看该作者
本帖最后由 onis 于 2011-7-17 20:04 编辑
! C9 [' t" \* A4 p: f* k$ U8 i6 P5 F5 y9 `- f1 x1 {
不好意思頂上來,由於在研究中,看了那兩篇教程,有個問題不太明白,既然文件偏移量和文件大小都是反向的,那麼腳本里只寫get offset long,bms能知道反向嗎?8 d& Z; |, t7 l* Z
因為想要解包的文件已經完全瞭解結構,也試過直接將其中某個文件單獨導出,都是ok的,就是這解包程序讓我頭大了。。。。。。% g9 i1 Z4 [( K& j6 D1 e4 `

! G# A- N- w. d1 K9 _, C3 h4 \" X7 H已解决!
回复 支持 反对

使用道具 举报

15#
发表于 2011-3-9 12:44 | 只看该作者
本帖最后由 beegame 于 2011-3-13 11:23 编辑
* q( h5 v1 J* ^0 d. X! f( l; R% B. r- c& O+ N/ y
现在已经是ver 0.4.10a  8 d- d, P4 G$ E2 |& T# L- `

$ b* H0 _9 d- N/ e. R8 ~* I+ X: k: t" D' ?& x7 h
回复 支持 反对

使用道具 举报

14#
发表于 2010-8-18 13:13 | 只看该作者
现在已经是ver 0.4.6a 了
回复 支持 反对

使用道具 举报

13#
发表于 2010-8-18 12:54 | 只看该作者
现在已经是ver 0.4.6a了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

12#
 楼主| 发表于 2010-4-9 18:48 | 只看该作者
引用第10楼solidji于2010-04-09 18:12发表的 : 2 _  Y' e6 t6 h  ^7 l. W7 p, b; C
哦,原来是一个支持 XOR, rot13, zlib/deflate, lzo, lzss plus 等等压缩加密算法的脚本解压工具
* s' m* v* s; L! v- C/ a/ P# _  C不错的东东 & P4 M, S- x; H) `- D  Y) q
不过我习惯于直接调用EXE自己的解压算法
4 m+ P5 P: i9 c$ k' M0 i7 ~: F1 k& z

' G) X! L5 g2 t0 }直接调用EXE自己的解压算法,这难度太高,只有高手会使用。; Z) e9 p6 t. h, e& r; t
目前还是属于传说级的。
回复 支持 反对

使用道具 举报

11#
发表于 2010-4-9 18:12 | 只看该作者
哦,原来是一个支持 XOR, rot13, zlib/deflate, lzo, lzss plus 等等压缩加密算法的脚本解压工具
% q, h5 @; I/ F- y# ^( w不错的东东
; m' F5 P! L) Z0 }/ w不过我习惯于直接调用EXE自己的解压算法
回复 支持 反对

使用道具 举报

10#
发表于 2009-8-3 15:39 | 只看该作者
2009年8月3日更新
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :
* ^  i3 J1 x* ^: `3 y! d! T: a, k& n/ y' s; r, L7 W- O
呵呵,人眼订阅工具
- j( v8 v# M& t& n4 |: m- I$ i
可惜现在的论坛没有关注ID发帖功能,如果发帖,则用PHP Mail()发邮件通知帖子有更新
回复 支持 反对

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :
# b) Y( _3 J' x& R% w8 f0 F! f一晃的功夫...007老大又刷版了...你到底是啥订阅工具....
  J! x% l0 I; n
呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

冒险解谜游戏中文网 ChinaAVG

官方微博官方微信号小黑屋 微信玩家群  

(C) ChinaAVG 2004 - 2019 All Right Reserved. Powered by Discuz! X3.2
辽ICP备11008827号 | 桂公网安备 45010702000051号

冒险,与你同在。 冒险解谜游戏中文网ChinaAVG诞生于2004年9月9日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

快速回复 返回顶部 返回列表