英文:
How to create code for existing .exe file without knowing source code?
问题
以下是翻译好的部分:
假设我想要创建一段代码,能够在Thinkorswim桌面应用上自动交易股票,我该如何查找股票、设置交易参数并执行操作,而无需了解这些函数是什么,甚至无法访问这些函数?
或者说,我想要创建一段代码,能够执行自动的谷歌搜索,这样就可以在我的代码中执行新建标签页和填入URL字段等功能?
再或者,假设我在Bluestacks(安卓模拟器)上玩一个手机游戏,并且想要根据特定算法创建一个能够玩游戏的机器人。
在不了解所需操作的.exe文件的源代码的情况下,该如何处理这些事情?我知道有人经常做类似的事情,那么他们的方法是什么呢?
英文:
What is the general approach to something like the following:
Lets say I wanted to create code that would automatically trade stocks on the Thinkorswim desktop app, how can I look up stocks, set trade parameters, and execute without knowing what the functions are or even having access to those functions?
Or say I want to create code that would perform automatic google searches so functions like new tab and filling in the url field can be carried out in my own code?
Or suppose I had a mobile game on Bluestacks (Android Emulator) and I wanted to create a bot that played the game based on a certain algorithm.
How would one go about these things without knowing the source code to the .exe they want to manipulate? I know people do things like this regularly, so what is their approach?
答案1
得分: 2
一些你所询问的示例被称为逆向工程,这是一个非常复杂的过程,虽然不是不可能,但你正试图实现一些比自己创建更耗时的东西。
你可能想要实现的一个示例:
https://github.com/zeldaret/mm
你可以在这里看到仍有许多任务要完成……而且这个游戏是来自2000年。
如果你想要控制软件本身,在一个自定义的GUI中且没有API,这会是一个问题。
你可能能够创建一个机器人来控制鼠标,并在给定分辨率上与你的GUI进行交互。
如果你正在寻找一个Web应用程序解决方案,你可以使用Selenium和其他软件创建自动化机器人与浏览器上的DOM进行交互,同时开发人员可能会更改页面,导致你的机器人失效。
玩得开心,编写这些程序吧。
英文:
some examples that you are asking is called reverse engineering and it's a very complicated process, its not impossible but you are trying to achieve something that will require more time than creating it by your own.
An example of what you might want to achieve:
https://github.com/zeldaret/mm
You can see here that there are still lot of tasks to work on... and this game is from 2000.
https://trello.com/b/ruxw9n6m/majoras-mask-decompilation
Also if you want to control software itself, in a custom GUI and there is no api, its gonna be a problem.
What you might be able to create is a bot to control the mouse and interact with your GUI on a given resolution.
If you are looking for a webapp solution, you can create automation bots with Selenium and other software to interact with the DOM on a browser, also developers might change the page and your bot will break.
Have fun programming those.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论