Tool to compare .dlls and disassemble the differences? [closed]

有些话、适合烂在心里 提交于 2019-12-30 05:45:19

问题


Does anyone know a decent tool that will compare two different versions of the same dll and extract the differences?

thanks


回答1:


Reflector has a Diff tool. Note: Reflector is now paid software.




回答2:


dotPeek from JetBrains can also be used. It is also free.

  • Open the assembly up in dotPeek
  • Select the assembly
  • File --> Export to project
  • Choose a location on disk

Repeat the above for the assembly you want to compare, then open the two folders in a diff tool. I used WinMerge.

You'll notice that the vast majority of files have differences. This is because the files have a comment at the top like this

// MVID: {some guid here}

or

// Assembly location: {some path here}

You can create a filter in WinMerge to ignore it

  • Tools --> Filter...
  • Goto the "Line Filters" tab
  • Add the following filter ^// MVID:
  • Add the following filter (optional) ^// Assembly location:
  • Check the checkbox next to your new Regular Expression
  • Check the "Enable Line Filters" checkbox

When you okay the changes, it will rescan the folders and ignore any line that starts with that comment. Now you should see just the changes you're interested in.




回答3:


Why not disassemble first and then compare?




回答4:


Check http://www.red-gate.com/products/reflector/




回答5:


Use .NET Reflector (Free version is all you need) to open the dlls then right-click and choose to export them to separate directories.

Then use ExamDiff Pro to compare the directories (You can get a 30-Day free trial). You can navigate through the sub folders and open each file as necessary into a new Comparison window (Just double-click in the ExamDiff Pro Window). Works awesome!

ExamDiff Pro also has a Dump PE32 plugin that will do a comparison directly between .dll and .exe files. This is helpful to look at header changes and flags binary differences, but will not decompile it for you (so use the Reflector method above).




回答6:


The Microsoft BCL team have a tool do to this, it's called LibCheck and can be found here

http://blogs.msdn.com/b/bclteam/archive/2005/03/21/400123.aspx

This is an old tool, and I had to recompile the source using a later version of the runtime, but it works well and provide html reports on changes.



来源:https://stackoverflow.com/questions/590863/tool-to-compare-dlls-and-disassemble-the-differences

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!