有哪些选项可用于侦听嵌入网页中的 Flash 程序的 http 流量?
简而言之,这是我的情况:构建了一个 Flash 程序,并将其嵌入到不同的网站页面中。无法更改闪存程序,我想要一个小的附加组件(让我们将其命名为附加组件),以便它可以稍微扩展闪存程序的功能。示例:我的 Flash 程序要求主服务器提供报价,我需要显示有关所请求报价的一些附加信息。
数据由我的服务器 json 序列化返回,我可以向其中添加任何数据,但由于 Flash 程序不显示其他信息,我希望它显示在窗口、页面上的小部件或其他内容中一样。
先决条件: a) Windows 操作系统 b) Http 流量 (req/resp) 应由插件按原样读取,并且插件将进行必要的计算/操作,并且(可能)根据需要进行其他请求 c) 能够以任何方式显示计算结果,以便最终用户可以看到 d) 最好仅在触发某些请求时才调用该附加组件(例如 http://url/get/引用/1234) e) 我不想提出任何额外的要求;从 flash 程序获取的 http 响应中获取额外的数据对我来说没问题。
我相信的选项是:
- Greasemonkey 脚本。不起作用,因为除非它是主页 url,否则它可能无法读取 http 流量。
- 火狐/Chrome 插件。我了解到 Chrome 禁止访问 http 请求,但我找不到任何 API 方法 用于观察 http 流量。但我不确定 Firefox API。
- 还有其他办法吗?
Here is my situation in a nutshell: there is a flash program built and it's being embedded into different site pages. There is no ability to change the flash program and I want a small add-on (let's name it add-on) so it would extend the functionality of the flash program a little bit. Example: my flash program asks for a quote from the main server, I need to display some additional information regarding the quote requested.
The data is being returned by my server json-serialized and I can add any data to it, but as the flash program does not display additional information, I'd like it to show in a window, in a widget on the page or something alike.
Prerequisites:
a) Windows OS
b) Http traffic (req/resp) should be read as is by the addon and the addon will make necessary calculations/actions and (probably) additional requests if needed
c) The ability to show calculated results in any way so the end user could see
d) Preferably the add-on should be invoked only when certain requests are fired (for example http://url/get/quote/1234)
e) I'd prefer not doing any extra requests; getting extra data from http response being fetched by flash program is fine with me.
The options I believe are:
- Greasemonkey script. Does not work as probably it can not read http traffic unless it's the main page url.
- Firefox/Chrome addons. I read that Chrome forbids accessing the http requests, and I can not find any API methods for watching the http traffic. but I'm not sure about Firefox API.
- Any other way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Firebug 有一个网络面板,可以跟踪甚至由嵌入式 Flash 应用程序发送的 http(s) 请求。看看这是不是你想要的。它向您显示请求和响应标头 POST 内容(如果有)以及响应内容。
Firebug has a net panel which can track http(s) requests sent even by embedded Flash apps. See if that is what you want. It shows you the request and response headers POST content (if any) and the response content.