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

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos 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是有签名的话,那么就可能不行的哦。