任何熟悉NSIS反编译器的人(谷歌不是:-))
谢谢,
Ë
最佳答案
如何访问NSIS安装程序脚本?
好的,这是该帖子的主题。
http://netcologne.dl.sourceforge.net/project/nsis/NSIS%202/2.09/nsis-2.09-src.tar.bz2
nsis-2.09-src \ Source \ exehead \ fileform.c
nsis-2.09-src \ Source \ exehead \ fileform.h
#define FH_SIG 0xDEADBEEF
// neato surprise signature that goes in firstheader. :)
#define FH_INT1 0x6C6C754E // 'Null'
#define FH_INT2 0x74666F73 // 'soft'
#define FH_INT3 0x74736E49 // 'Inst'
typedef struct
{
int flags; // FH_FLAGS_*
int siginfo; // FH_SIG
int nsinst[3]; // FH_INT1,FH_INT2,FH_INT3
// these point to the header+sections+entries+stringtable in the datablock
int length_of_header;
// this specifies the length of all the data (including the firstheader and CRC)
int length_of_all_following_data;
} firstheader;
数据样本:
$ ==> 00000000 ....
$+4 DEADBEEF
$+8 6C6C754E Null
$+C 74666F73 soft
$+10 74736E49 Inst
$+14 000268E2 157 922 length_of_header (inside <<Compressed Data>>)
$+18 011947CB 18 433 995 length_of_all_following_data
<<Compressed Data>>
$+011947CB CRC32
未压缩的获取《压缩数据》
好吧,这些数据被写入%temp%
但是使用ShareMode = None并且Attributes = DELETE_ON_CLOSE,因此您将无法访问它。
Fix:
Inside 'NSIS Setup.exe'
Replace
68 00 01 00 04 with
68 00 00 00 00
To avoid that this tempfile get's create with DELETE_ON_CLOSE
Background:
00402E56 |. 68 00010004 PUSH 4000100 ; |Attributes = TEMPORARY|DELETE_ON_CLOSE
^^^^^^^^^^^-Patch Target
00402E5B |. 6A 02 PUSH 2 ; |Mode = CREATE_ALWAYS
00402E5D |. 53 PUSH EBX ; |pSecurity
00402E5E |. 53 PUSH EBX ; |ShareMode
00402E65 |. 68 000000C0 PUSH C0000000 ; |Access = GENERIC_READ|GENERIC_WRITE
00402E6A |. 50 PUSH EAX ; |FileName
00402E6B |. FF15 90704000 CALL [<&KERNEL32.CreateFileA>] ; \CreateFileA
好的,大的<>未压缩临时文件是这样开始的:
00000000 E2 68 02 00 A0 00 00 00 2C 01 00 00 08 00 00 00 2C âh , ,
E2 68 02 00-> 000268E2 157922 header_of_header(在<>内)
只需切出此数据块,然后将NSIS脚本作为未压缩的Raw
其余数据是7z将为您提取的数据文件。
更新:获取Universal Extractor
它用
cmdTotal 1.02 (c) 2006/2007 KaKeeware, http://www.kakeeware.com
带有插件:InstExpl.wcx
或多或少成功地提取了Nullsoft Setup.exe。
请注意,不要对提取的文件过于信任-某些文件已损坏。
(为此,最好使用7zip。)
但是,该程序的主要目的是
script.bin
那是我测试的3-4个示例中状态良好的示例。 :)
好的更新:
这是我的真正早期版本
NullsoftDecompiler 1.2 alpha
目前,它仍在大量开发中,但这是它的第一个未完成的版本。
更新(大约一年后):
NullsoftDecompiler 3
最后,我添加了减压支持。
关于windows-installer - NSIS反编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3431254/