惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

博客园 - David

TFS Server 不存在时,如何去除对应Server的Workspaces 记录:如何删除TFS Project SQL – TRUNCATE vs DELETE SQL – Character data (varchar) 又好久没写东西了! Powershell: Send mail with attachment 【Update】 - David SSIS: Execute SSIS Package in command prompt 【Update】 随感 Windows Workflow Foundation 了解 通过代码将Word 2007 template (dotx)文档转换Word 2007 (docx)文档(续) 通过代码将Word 2007 template (dotx)文档转换Word 2007 (docx)文档 创建Word2007文档而无需安装Word2007 Visual WebGUI - 如何处理MessageBox的DialogResult值 Visual WebGUI - 如何将Dialog的结果传回主窗体 Visual WebGUI Report - 导出到PDF Visual WebGUI 在 Vista IIS 7 中的配置 项目管理片语 - Schedule 在IIS 7设置ASP.NET 1.1(在Vista中使用VS2003) 给儿子的歌!
更改已有程序集中的资源
David · 2010-05-14 · via 博客园 - David

如果有源代码的话,更改程序集中的资源文件就特别简单了。

但如果没有源代码呢?重新做一个?可能已经编译过的dll里面还有些什么不知道的东东呢,那要经过编译测试,再编译再测试了。

其实更改已编译的dll里面的资源只需以下三步:

#1:反编译

用以下的命令来搞一下反编译:

ildasm /out=assembly_name.il assembly_name.dll

把assembly_name更改为你需要的文件名。

如果你反编译的dll只是一个resource集的话,那就会得到三个文件:

  1. *.resources - 二进制资源文件。
  2. assembly_name.res - 资源表。
  3. assembly_name.il - MSIL代码。

#2:更改资源文件(*.resources)

因为这个*.resources文件是二进制的,所以需要用到工具才能编辑。我用的是Resource .NET

编辑保存好之后,就可以进行第三步了。

#3: 编译

可以用以下的命令来把刚才反编译的编译成dll:

ilasm /RESOURCE=assembly_name.res /DLL assembly_name.il /OUTPUT=assembly_name.dll

把assembly_name更改为你需要的文件名。

另外,如果该DLL是有签名的话,那么就可能不行的哦。