一个轻量级,可移植的C#应用程序,用于删除工作表和VBA保护

网友投稿 634 2022-11-01

一个轻量级,可移植的C#应用程序,用于删除工作表和VBA保护

一个轻量级,可移植的C#应用程序,用于删除工作表和VBA保护

Excel Unlocker Visual

This is a lightweight, portable (requires no installation) C# application that is used to remove worksheet and VBA protection from Microsoft Excel .xlsx and .xlsm files. On request from reddit users /u/doomlord12 and /u/ItsJustAnotherDay-, I have added functionality to handle .xlam files (Excel Add-Ins)

Download it here!

Methodology

Modern Excel workbooks are cleverly-hiding ZIP archives containing separate XML files for each worksheet. The worksheet XML files themselves will have a tag containing the hashed password, among other things. If this tag is removed, the worksheet will no longer be protected - not just without a password, but it will not be locked at all. As removing this protection is a consistent, reproducible procedure, it can be easily automated. So I did just that!

The Excel Unlocker, written in C#, will take a workbook, extract it into C:\Temp, remove the tag from all worksheets, and re-zip it back into the original format (.xlsx or .xlsm) in the original directory.

VBA Password Removal

The Excel Unlocker can also remove password protection from workbook-specific VBA projects. This works even if the VBA is view-locked (can't look at the code without a password). Removing VBA protection involves hex editing, and it is strongly recommended that you create a backup copy of the workbook prior to attempting. When run, the VBAProject.bin file will be read into a buffer, parsed as hex, and a set of 3 specific hex couplets will be replaced - these are what tells the VBA editor that protection is in place. After this is done, you will have to re-open the workbook - which will cause an error. This is normal! Do not panic! Open the VBA editor (ALT-F11), accept any errors that appear, save, and then finally re-open your newly freed workbook.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:netmonitor:一个Chrome扩展程序,它显示网页被加载后后台网络活动情况
下一篇:libmish是一个允许你在自己的任何程序中添加命令提示符的库
相关文章

 发表评论

暂时没有评论,来抢沙发吧~