对旧油漆程序进行逆向工程
我有几个非常古老的基于 MSDos 的绘画程序。 他们在调色板索引图像缓冲区上工作。 它们拥有许多令人惊叹的形状绘图工具、画笔和效果,这些在任何现代绘画程序中都不存在——尤其是在低调色板索引图像的“范围”内。 我想在现代程序中重现许多这些精彩的工具,也许可以让我自己和公众再次更容易使用它们,而无需启动像 dosbox 这样的模拟器。 但我有一个问题。
虽然很多画笔和工具都有明显的功能,但其实现应该相当简单。 但对于其他工具,它们的操作原理就不那么明显了。 我将陷入确定正确或忠实的算法来实现这些算法的困境。
如果你是我,你会采取什么方法? 是否有现成的反编译器/反汇编器可以处理这样的旧程序? 或者您会采取一些不同的方法,例如有条不紊地测试不同输入的算法以推断底层函数? 不同技术的某种组合? 就这些程序中的一行而言,这些(商业)程序的原始作者是众所周知的,并且现在是一位狂热的开源倡导者。 我应该尝试直接联系他们并询问吗? 我在逆向工程方面并不是特别有经验,所以我不知道从哪里开始。
编辑:看来“询问,你们就会收到”确实有效。
编辑2:看看http://animatorpro.org我得到的程序的源代码的来源。 豪华油漆也不错,但丹席尔瓦似乎已经从地球表面消失了。
I've got a couple of really old MSDos based paint programs. They work on palette indexed image buffers. They have a number of spectacular shape drawing tools, brushes and effects that simply do not exist in any modern paint program- Particularly not whilst staying within the "bounds" of a low color palette indexed image. I would like to reproduce many of these wonderful tools in a modern program, to perhaps make them more accessible to myself and the general public again, without having to boot up an emulator like dosbox. But I have a problem.
While a lot of these brushes and tools and things have obvious functions, whose implementation should be fairly straightforward. But with other tools, their principles of operation are not so obvious. I would be stuck determining a correct or faithful algorithm to implement those.
If you were me, what approach would you take? Are there decompilers/disassemblers readily available that can handle old programs like this? Or would you take some different approach, such as methodically testing the algorithms on different inputs to sort of infer the underlying function? Some combination of different techniques? In the case of one line of these programs, the original author of these (commercial) programs is known, and is now a rabid open source advocate. Should I just try to contact them directly and ask? I'm not particularly experienced with reverse engineering, so I'm at a loss at where to start on this.
edit: it seems that "Ask and ye shall recieve" really works.
edit 2: Have a look at http://animatorpro.org for the source code for the program that I... got the source for. Deluxe Paint would be nice too but Dan Silva seems to have vanished off the face of the earth.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IDA Pro 几乎可以处理任何二进制文件,并且是此类工作的黄金标准,尽管联系作者也可能会有所帮助。
IDA Pro handles nearly any binary, and is the gold standard for this kind of work, though contacting the author may prove helpful as well.
如果你能说服作者开源部分或全部程序,那就是最好的方法。
除此之外,反汇编和调试将成为你的朋友。 在某些情况下,如果您知道某个软件最初是用什么编译的,您也许能够反编译该软件。 但是将其反汇编,然后在调试器中运行它以查找总体结构,并查找执行实际画笔工作的明显函数。
一开始可能看起来令人畏惧,但一段时间后你会发现它出奇地容易理解。
-亚当
If you can convince the author to open source some or all of the program, that's the best method.
Beyond that, disassembly and debugging are going to be your friends. In some cases you may be able to decompile a piece of software if you know what it was compiled with originally. But disassemble it, and run it in a debugger to find the overarching structure, and look for the obvious functions that do the actual brush work.
It may seem daunting at first, but after some time you'll find it's surprisingly understandable.
-Adam